playing with MSA plots to allow filtering of positions, arghhh

This commit is contained in:
Tanushree Tunstall 2022-01-18 15:30:41 +00:00
parent 08bd8a2ee5
commit 00094f036a
6 changed files with 209 additions and 46 deletions

View file

@ -2,10 +2,10 @@ source("~/git/LSHTM_analysis/config/gid.R")
#source("~/git/LSHTM_analysis/config/pnca.R") # YES
#---------------------------------------------------
# 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/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/scripts/plotting/get_plotting_dfs.R")
@ -72,16 +72,25 @@ LogoPlotSnps(plot_df = merged_df3
# wild-type and mutant aa
# script: logoP_msa.R
########################################
# msa1 = read.csv("/home/tanu/git/Data/cycloserine/output/alr_msa.csv", header = F)
# head(msa1)
# msa_seq= msa1$V1
# head(msa_seq)
#
# msa2 = read.csv("/home/tanu/git/Data/cycloserine/input/alr.1fasta", header = F)
# head(msa2)
# wt_seq = msa2$V1
# head(wt_seq)
#
# # BOTH WORK
# LogoPlotMSA(msa_seq, wt_seq)
# LogoPlotMSA(msa1, msa2)
# BOTH WORK
#LogoPlotMSA(msa_seq, wt_seq)
LogoPlotMSA(msaSeq_mut = msa_seq
, msaSeq_wt = wt_seq
, msa_method = 'bits' # or probability
, my_logo_col = "chemistry"
#, plot_positions = active_aa_pos
, plot_positions
, x_lab = "Wild-type position"
, y_lab = ""
, x_ats = 13 # text size
, x_tangle = 90 # text angle
, y_ats = 13
, y_tangle = 0
, x_tts = 13 # title size
, y_tts = 13
, 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
)