added my_logolas.R

This commit is contained in:
Tanushree Tunstall 2022-01-24 13:46:50 +00:00
parent febb8f0f7f
commit 9aa62b33b1
5 changed files with 1423 additions and 93 deletions

View file

@ -1,32 +1,29 @@
#source("~/git/LSHTM_analysis/config/gid.R")
#source("~/git/LSHTM_analysis/config/pnca.R") # YES
source("~/git/LSHTM_analysis/config/embb.R")
#---------------------------------------------------
# FIXME
# source("~/git/LSHTM_analysis/config/alr.R")
# source("~/git/LSHTM_analysis/config/embb.R")
# source("~/git/LSHTM_analysis/config/katg.R")
# source("~/git/LSHTM_analysis/config/rpob.R")
source("~/git/LSHTM_analysis/config/pnca.R") # YES
#source("~/git/LSHTM_analysis/config/embb.R")
#source("~/git/LSHTM_analysis/config/katg.R")
#source("~/git/LSHTM_analysis/config/alr.R")
#source("~/git/LSHTM_analysis/config/rpob.R")
#---------------------------------------------------
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
#
# ################################
# # Logo plot with custom Y axis
# # mainly OR
# # script: logoP.R
# ################################
################################
# Logo plot with custom Y axis
# mainly OR
# script: logoP.R
################################
# LogoPlotCustomH (plot_df = merged_df3
# , x_axis_colname = "position"
# , y_axis_colname = "or_mychisq"
# , symbol_colname = "mutant_type"
# , y_axis_log = F
# , y_axis_log = T
# , log_value = log10
# , y_axis_increment = 5
# , rm_empty_y = F
# , y_axis_increment = 100
# , rm_empty_y = T
# , my_logo_col = 'chemistry'
# , x_lab = "Wild-type position"
# , y_lab = "Odds Ratio"
# , x_ats = 12 # text size
# , x_ats = 10 # text size
# , x_tangle = 90 # text angle
# , y_ats = 22
# , y_tangle = 0
@ -38,24 +35,24 @@ source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
# , leg_ts = 15 # leg text size
# , leg_tts = 16 # leg title size
# )
#
#
# # ########################################
# # # Logo plot showing nsSNPs by positions
# # # wild-type and mutant aa
# # # script: logoP_snp.R
# # ########################################
########################################
# Logo plot showing nsSNPs by positions
# wild-type and mutant aa
# script: logoP_snp.R
########################################
# LogoPlotSnps(plot_df = merged_df3
# , x_axis_colname = "position"
# , symbol_mut_colname = "mutant_type"
# , symbol_wt_colname = "wild_type"
# , omit_snp_count = c(0)# can be 1, 2, etc.
# , omit_snp_count = c(1)# can be 0,1, 2, etc.
# , my_logo_col = "chemistry"
# , x_lab = "Wild-type position"
# , y_lab = ""
# , x_ats = 13 # text size
# , y_lab = "nsSNP count"
# , x_ats = 10 # text size
# , x_tangle = 90 # text angle
# , y_ats = 20
# , y_ats = 18
# , y_tangle = 0
# , x_tts = 18 # title size
# , y_tts = 18
@ -65,7 +62,6 @@ source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
# , leg_tts = 16 # leg title size
# )
#
#
########################################
# Logo plot MSA
@ -76,23 +72,49 @@ source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
# To plot entire MSA, simply don't specify {plot_positions}
# script: logoP_msa.R
# TODO perhaps: ED logo from Logolas
########################################
# LogoPlotMSA(msaSeq_mut = msa_seq
# , msaSeq_wt = wt_seq
# , msa_method = 'bits' # or probability
# , my_logo_col = "taylor"
# , plot_positions = active_aa_pos
# , x_lab = "nsSNP position"
# , y_lab = ""
# , x_ats = 10 # text size
# , x_tangle = 90 # text angle
# , x_axis_offset = 0.05
# , y_ats = 15
# , y_tangle = 0
# , x_tts = 13 # title size
# , y_tts = 15
# , leg_pos = "top" # can be top, left, right and bottom or c(0.8, 0.9)
# , leg_dir = "horizontal" #can be vertical or horizontal
# , leg_ts = 16 # leg text size
# , leg_tts = 16 # leg title size
# )
########################################
LogoPlotMSA(msaSeq_mut = msa_seq
# ED Logo plot MSA
# Mutant and wild-type
########################################
LogoPlotED(msaSeq_mut = msa_seq
, msaSeq_wt = wt_seq
, msa_method = 'bits' # or probability
, my_logo_col = "taylor"
#, plot_positions = c(24, 54, 48, 58, 44, 80, 87, 1000:1008)
, plot_positions = active_aa_pos
, x_lab = "nsSNP position"
, y_lab = ""
, x_ats = 10 # text size
, x_tangle = 90 # text angle
, y_ats = 13
, x_axis_offset = 0.05
, y_ats = 15
, y_tangle = 0
, x_tts = 13 # title size
, y_tts = 13
, y_tts = 15
, leg_pos = "top" # can be top, left, right and bottom or c(0.8, 0.9)
, leg_dir = "horizontal" #can be vertical or horizontal
, leg_ts = 16 # leg text size
, leg_tts = 16 # leg title size
)
)