added placeholder defaults for functions in R to make sure that R shiny layput works with a data set for meeting tomorrow

This commit is contained in:
Tanushree Tunstall 2022-02-14 19:33:00 +00:00
parent 0460ca1708
commit d38521e03a
11 changed files with 120 additions and 83 deletions

View file

@ -4,9 +4,9 @@ library(ggplot2)
library(tidyverse)
library(cowplot)
library(gridExtra)
source("consurf_plot_func.R")
source("~/git/LSHTM_analysis/scripts/functions/consurfP.R")
# ###########################################################################
############################################################################
# merged_df3 = read.csv("~/git/Data/cycloserine/output/alr_all_params.csv"); source("~/git/LSHTM_analysis/config/alr.R")
# if ( tolower(gene) == "alr") {
# aa_pos_lig1 = NULL
@ -15,13 +15,13 @@ source("consurf_plot_func.R")
# p_title = gene
# }
###########################################################################
# merged_df3 = read.csv("~/git/Data/ethambutol/output/embb_all_params.csv"); source("~/git/LSHTM_analysis/config/embb.R")
# if ( tolower(gene) == "embb") {
# aa_pos_lig1 = aa_pos_ca
# aa_pos_lig2 = aa_pos_cdl
# aa_pos_lig3 = aa_pos_dsl
# p_title = gene
# }
merged_df3 = read.csv("~/git/Data/ethambutol/output/embb_all_params.csv"); source("~/git/LSHTM_analysis/config/embb.R")
if ( tolower(gene) == "embb") {
aa_pos_lig1 = aa_pos_ca
aa_pos_lig2 = aa_pos_cdl
aa_pos_lig3 = aa_pos_dsl
p_title = gene
}
###########################################################################
# merged_df3 = read.csv("~/git/Data/streptomycin/output/gid_all_params.csv"); source("~/git/LSHTM_analysis/config/gid.R")
# if ( tolower(gene) == "gid") {
@ -47,13 +47,13 @@ source("consurf_plot_func.R")
# p_title = gene
# }
###########################################################################
merged_df3 = read.csv("~/git/Data/rifampicin/output/rpob_all_params.csv"); source("~/git/LSHTM_analysis/config/rpob.R")
if ( tolower(gene) == "rpob") {
aa_pos_lig1 = NULL
aa_pos_lig2 = NULL
aa_pos_lig3 = NULL
p_title = gene
}
# merged_df3 = read.csv("~/git/Data/rifampicin/output/rpob_all_params.csv"); source("~/git/LSHTM_analysis/config/rpob.R")
# if ( tolower(gene) == "rpob") {
# aa_pos_lig1 = NULL
# aa_pos_lig2 = NULL
# aa_pos_lig3 = NULL
# p_title = gene
# }
#########################################################################
consurf_palette1 = c("0" = "yellow2"
@ -84,21 +84,21 @@ consurf_palette2 = c("0" = "yellow2"
aa_pos_hbond = c(2, 4)
aa_pos_other = c(3, 4, 14, 10)
wideP_point (plotdf = merged_df3
wideP_consurf(plotdf = merged_df3
, xvar_colname = "position"
, yvar_colname = "consurf_score"
, yvar_colourN_colname = "consurf_colour_rev"
, ylab = "Consurf score"
, plot_error_bars = F
, plot_error_bars = T
, upper_EB_colname = "consurf_ci_upper"
, lower_EB_colname = "consurf_ci_lower"
, plot_type = "point"
, point_colours = consurf_palette2
, leg_title1 = "Consurf"
, leg_labels = c("0"="Insufficient Data"
, "1"= "Variable"
, "1" = "Variable"
, "2", "3", "4", "5", "6", "7", "8"
, "9"= "Conserved")
, "9" = "Conserved")
# axes title and label sizes
, x_axts = 8