playing with MSA plots to allow filtering of positions, arghhh
This commit is contained in:
parent
08bd8a2ee5
commit
00094f036a
6 changed files with 209 additions and 46 deletions
|
@ -110,9 +110,16 @@ merged_df3_comp = all_plot_dfs[[4]]
|
|||
####################################################################
|
||||
|
||||
#source(paste0(plot_script_path, "logo_data.R"))
|
||||
|
||||
#s1 = c("\nSuccessfully sourced logo_data.R")
|
||||
#cat(s1)
|
||||
# input data is merged_df3
|
||||
# so repurposed it into a function so params can be passed instead to generate
|
||||
# data required for plotting.
|
||||
# Moved "logo_data.R" to redundant/
|
||||
|
||||
source(paste0(plot_script_path, "logo_data_msa.R"))
|
||||
s1 = c("\nSuccessfully sourced logo_data_msa.R")
|
||||
cat(s1)
|
||||
|
||||
####################################################################
|
||||
# Data for DM OM Plots: Long format dfs
|
||||
|
@ -173,4 +180,4 @@ rm(c1
|
|||
, vars0
|
||||
, vars1
|
||||
, vars2
|
||||
, vars3)
|
||||
, vars3)
|
||||
|
|
49
scripts/plotting/logo_data_msa.R
Normal file
49
scripts/plotting/logo_data_msa.R
Normal file
|
@ -0,0 +1,49 @@
|
|||
#=================================================
|
||||
# Data for Logo MSA plots
|
||||
#=================================================
|
||||
cat("\n=========================================="
|
||||
, "\nLogo MSA Plots Data: ALL params"
|
||||
, "\n=========================================")
|
||||
|
||||
#msa1 = read.csv("/home/tanu/git/Data/cycloserine/output/gid_msa.csv", header = F)
|
||||
#head(msa1)
|
||||
#msa_seq= msa1$V1
|
||||
#head(msa_seq)
|
||||
|
||||
#msa2 = read.csv("/home/tanu/git/Data/cycloserine/input/gid.1fasta", header = F)
|
||||
#head(msa2)
|
||||
#wt_seq = msa2$V1
|
||||
#head(wt_seq)
|
||||
|
||||
# BOTH WORK
|
||||
#LogoPlotMSA(msa_seq, wt_seq)
|
||||
#LogoPlotMSA(msa1, msa2)
|
||||
#####################################
|
||||
|
||||
#================
|
||||
# MSA file: muts
|
||||
#================
|
||||
|
||||
in_filename_msa = paste0(tolower(gene), "_msa.csv")
|
||||
infile_msa = paste0(outdir, "/", in_filename_msa)
|
||||
cat("\nInput file for MSA plots: ", infile_msa, "\n")
|
||||
|
||||
msa1 = read.csv(infile_msa, header = F)
|
||||
head(msa1)
|
||||
cat("\nLength of MSA:", nrow(msa1))
|
||||
msa_seq = msa1$V1
|
||||
head(msa_seq)
|
||||
|
||||
#================
|
||||
# fasta file: wt
|
||||
#================
|
||||
|
||||
in_filename_fasta = paste0(tolower(gene), ".1fasta")
|
||||
infile_fasta = paste0(indir, "/", in_filename_fasta)
|
||||
cat("\nInput fasta file for WT: ", infile_fasta, "\n")
|
||||
|
||||
msa2 = read.csv(infile_fasta, header = F)
|
||||
head(msa2)
|
||||
cat("\nLength of WT fasta:", nrow(msa2))
|
||||
wt_seq = msa2$V1
|
||||
head(wt_seq)
|
Loading…
Add table
Add a link
Reference in a new issue