SNP -> SAV for thesis plots

This commit is contained in:
Tanushree Tunstall 2023-02-19 17:43:22 +00:00
parent 777d3765cf
commit db7e2912e1
31 changed files with 145 additions and 145 deletions

View file

@ -1,6 +1,6 @@
########################################
# Lineage barplot
# Lineage and nsSNP count barplot
# Lineage and SAV count barplot
# Lineage Diversity barplot
########################################
@ -28,7 +28,7 @@ lin_count_bp <- function( lf_data = lin_lf
, leg_location = "top"
, y_log10 = FALSE
, y_scale_percent = FALSE
, y_label = c("Count", "SNP diversity")
, y_label = c("Count", "SAV diversity")
, ...
#, y_label = c("Count")
) {

View file

@ -1,6 +1,6 @@
########################################
# Lineage barplot
# Lineage and nsSNP count barplot
# Lineage and SAV count barplot
# Lineage Diversity barplot
########################################
@ -29,8 +29,8 @@ lin_count_bp_diversity <- function( lf_data = lin_wf
, leg_location = "top"
, y_log10 = FALSE
, y_scale_percent = FALSE
#, y_label = c("Count", "SNP diversity")
, y_label = c("SNP diversity")
#, y_label = c("Count", "SAV diversity")
, y_label = c("SAV diversity")
, bp_plot_title = ""
, title_colour = "chocolate4"
, subtitle_text = NULL

View file

@ -47,7 +47,7 @@ bp_stability_hmap <- function(plot_df = merged_df3
my_yaxts = 10, # y-axis text size
my_pts = 10 # plot-title size
, my_xlab = "Position"
, my_ylab = "No. of nsSNPs"
, my_ylab = "No. of SAVs"
# Custom 2: x-axis: geom tiles ~ lig distance
#, A_xvar_lig = T
@ -75,8 +75,8 @@ bp_stability_hmap <- function(plot_df = merged_df3
# stability values isolated to help with generating column called: 'group'
my_grp = plot_df[[stability_colname]]
# cat( "\nLength of nsSNPs:", length(my_grp)
# , "\nLength of unique values for nsSNPs:", length(unique(my_grp)) )
# cat( "\nLength of SAVs:", length(my_grp)
# , "\nLength of unique values for SAVs:", length(unique(my_grp)) )
#
# Add col: 'group'
plot_df$group = paste0(plot_df[[stability_outcome_colname]], "_", my_grp, sep = "")

View file

@ -40,7 +40,7 @@ DataED_PFM <- function(msaSeq_mut
dash_control <- modifyList(dash_control_default, dash_control)
############################################
# Data processing for logo plot for nsSNPS
# Data processing for logo plot for SAVS
###########################################
cat("\nLength of MSA", length(msaSeq_mut))

View file

@ -13,8 +13,8 @@
# For my case, this is called "lineage_labels"
# This column has short labels like L1, L2, L3, etc.
# if this is left empty, then the lineage_column_name will be used
# id_colname : sample-id column. Used to calculate SNP count
# snp_colname : SNP column. Used to calculate SNP diversity
# id_colname : sample-id column. Used to calculate SAV count
# snp_colname : SAV column. Used to calculate SAV diversity
# RETURNS: List
# WF and LF data for lineage-wise snp count and snp diversity
@ -142,7 +142,7 @@ lineage_plot_data <- function(plot_df
lin_wf
#----------------------
# Add SNP diversity
# Add SAV diversity
#----------------------
lin_wf$snp_diversity = lin_wf$num_snps_u/lin_wf$total_samples
lin_wf
@ -150,7 +150,7 @@ lineage_plot_data <- function(plot_df
#----------------------
# Add some formatting
#----------------------
# SNP diversity
# SAV diversity
lin_wf$snp_diversity_f = round( (lin_wf$snp_diversity * 100), digits = 0)
lin_wf$snp_diversity_f = paste0(lin_wf$snp_diversity_f, "%")

View file

@ -366,7 +366,7 @@ LogoPlotMSA <- function(# unified_msa # <- not needed any more because we have '
}
#####################################
# Generating logo plots for nsSNPs
# Generating logo plots for SAVs
#####################################
PlotlogolasL <- list()

View file

@ -14,8 +14,8 @@
# ...other params
# Returns: Logo plot from combined data containing all nsSNPs per position.
# Helps to see the overview of SNP diversity
# Returns: Logo plot from combined data containing all SAVs per position.
# Helps to see the overview of SAV diversity
# TODO: SHINY
# select/drop down: omit_snp_count
@ -37,7 +37,7 @@ LogoPlotSnps <- function(plot_df
, omit_snp_count = c(0) # can be 1, 2, etc.
, my_logo_col = "chemistry"
, x_lab = "Position"
, y_lab = "nsSNP Count"
, y_lab = "SAV Count"
, x_ats = 6 # text size
, x_tangle = 90 # text angle
, y_ats = 10
@ -63,7 +63,7 @@ LogoPlotSnps <- function(plot_df
omit_snp_count <- as.numeric(unlist(str_extract_all(omit_snp_count, regex("[0-9]+"))))
}
############################################
# Data processing for logo plot for nsSNPS
# Data processing for logo plot for SAVS
############################################
# Generate "ligand distance" colour map
@ -84,7 +84,7 @@ LogoPlotSnps <- function(plot_df
max_mut = max(table(mutable_df[[x_axis_colname]]))
# Subset Data as specified by user
cat("\nDisplaying nsSNP position frequency:\n")
cat("\nDisplaying SAV position frequency:\n")
print(table(mutable_df$mut_pos_occurrence))
if ( (length(omit_snp_count) ==1) && (omit_snp_count == 0) ){
@ -93,8 +93,8 @@ LogoPlotSnps <- function(plot_df
max_mult_mut = max(table(my_data_snp[[x_axis_colname]]))
if (debug) {
cat("\nNo filtering requested:"
, "\nTotal no. of nsSNPs:", sum(table(mutable_df$mut_pos_occurrence))
, "\nTotal no. of nsSNPs omitted:", sum(table(mutable_df$mut_pos_occurrence)[omit_snp_count])
, "\nTotal no. of SAVs:", sum(table(mutable_df$mut_pos_occurrence))
, "\nTotal no. of SAVs omitted:", sum(table(mutable_df$mut_pos_occurrence)[omit_snp_count])
, "\nDim of data:", dim(my_data_snp)
, "\nNo. of positions:", length(u)
, "\nMax no. of muts at any position:", max_mult_mut)
@ -109,15 +109,15 @@ LogoPlotSnps <- function(plot_df
max_mult_mut = max(table(my_data_snp[[x_axis_colname]]))
if (debug) {
if (got_rows == exp_nrows) {
cat("\nPass: Position with the stated nsSNP frequency filtered:", omit_snp_count
, "\nTotal no. of nsSNPs:", sum(table(mutable_df$mut_pos_occurrence))
, "\nTotal no. of nsSNPs omitted:", sum(table(mutable_df$mut_pos_occurrence)[omit_snp_count])
cat("\nPass: Position with the stated SAV frequency filtered:", omit_snp_count
, "\nTotal no. of SAVs:", sum(table(mutable_df$mut_pos_occurrence))
, "\nTotal no. of SAVs omitted:", sum(table(mutable_df$mut_pos_occurrence)[omit_snp_count])
, "\nDim of subsetted data:", dim(my_data_snp)
, "\nNo. of positions:", length(u)
, "\nMax no. of muts at any position:", max_mult_mut)
} else {
cat("\nFAIL:Position with the stated nsSNP frequency COULD NOT be filtered..."
cat("\nFAIL:Position with the stated SAV frequency COULD NOT be filtered..."
, "\nExpected:",exp_nrows
, "\nGot:", got_rows )
}
@ -212,7 +212,7 @@ LogoPlotSnps <- function(plot_df
position_mt = as.numeric(colnames(tab_mt))
position_wt = as.numeric(colnames(tab_wt))
#####################################
# Generating logo plots for nsSNPs
# Generating logo plots for SAVs
#####################################
#-------------------
# Mutant logo plot

View file

@ -1,7 +1,7 @@
#!/usr/bin/env Rscript
#########################################################
# TASK: function for barplot showing no. of sites with nsSNP
# TASK: function for barplot showing no. of sites with SAV
# count
#########################################################
# load libraries and functions
@ -11,7 +11,7 @@ library(dplyr)
theme_set(theme_grey())
#=================================================================
# site_snp_count_bp(): barplots for no. of sites and nsSNP count
# site_snp_count_bp(): barplots for no. of sites and SAV count
# input args
## df containing data to plot
## df column name containing site/position numbers
@ -31,7 +31,7 @@ site_snp_count_bp <- function (plotdf,
axis_label_size = 10,#22
subtitle_size = 10,#20
geom_ls = 10,
xaxis_title = "Number of nsSNPs",
xaxis_title = "Number of SAVs",
yaxis_title = "Number of Sites",
title_colour = "chocolate4",
subtitle_text = NULL,
@ -82,7 +82,7 @@ site_snp_count_bp <- function (plotdf,
# sanity check
if(tot_muts == nrow(plotdf)){
cat("\nPASS: total number of mutations match"
, "\nTotal no. of nsSNPs:", tot_muts)
, "\nTotal no. of SAVs:", tot_muts)
} else{
cat("\nWARNING: total no. of muts = ", tot_muts
, "\nExpected = ", nrow(plotdf))
@ -106,13 +106,13 @@ site_snp_count_bp <- function (plotdf,
, table(snpsBYpos_df$snpsBYpos)
, "\n")
# calculating total no. of sites associated with nsSNPs
# calculating total no. of sites associated with SAVs
tot_sites = sum(table(snpsBYpos_df$snpsBYpos))
# sanity check
if(tot_sites == length(unique(plotdf$position))){
cat("\nPASS: total number of mutation sites match"
, "\nTotal no. of sites with nsSNPs:", tot_sites)
, "\nTotal no. of sites with SAVs:", tot_sites)
} else{
cat("WARNING: total no. of sites = ", tot_sites
, "\nExpected = ", length(unique(plotdf$position)))
@ -121,7 +121,7 @@ site_snp_count_bp <- function (plotdf,
# FIXME: should really be legend title
# but atm being using as plot title
#my_leg_title
bp_plot_title = paste0("Total nsSNPs: ", tot_muts
bp_plot_title = paste0("Total SAVs: ", tot_muts
, "\nTotal sites: ", tot_sites)
#-------------

View file

@ -22,7 +22,7 @@ stability_count_bp <- function(plotdf
, lts = 10#20 # legend text size
, ltis = 11#22 # label title size
, geom_ls = 10 # geom_label size
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, bp_plot_title = ""
, label_categories #= c("LEVEL1", "LEVEL2")
, title_colour = "chocolate4"

View file

@ -62,7 +62,7 @@ lig_dist = 10
stability_count_bp(plotdf = my_df_u_lig
, df_colname = "ligand_outcome"
, leg_title = "Ligand outcome"
, yaxis_title = paste0("Number of nsSNPs\nLigand dist: <", lig_dist, "\u212b")
, yaxis_title = paste0("Number of SAVs\nLigand dist: <", lig_dist, "\u212b")
#, bp_plot_title = "Sites < 10 Ang of ligand"
)

View file

@ -4,7 +4,7 @@ source ('get_plotting_dfs.R')
source("../functions/bp_lineage.R")
#########################################
# Lineage and SNP count: lineage lf data
# Lineage and SAV count: lineage lf data
#########################################
#=========================
# Data: All lineages or
@ -35,7 +35,7 @@ lin_count_bp(lin_lf_plot = lin_lf
, y_label = "Count")
###############################################
# Lineage SNP diversity count: lineage wf data
# Lineage SAV diversity count: lineage wf data
###############################################
#=========================
# Data: All lineages or
@ -59,4 +59,4 @@ lin_count_bp(lin_wf_plot = lin_wf
, x_lab_angle = 90
, my_xats = 20
, y_scale_percent = T
, y_label = "SNP diversity")
, y_label = "SAV diversity")

View file

@ -37,7 +37,7 @@ LP1<- LogoPlotCustomH (plot_df = merged_df3
)
########################################
# Logo plot showing nsSNPs by positions
# Logo plot showing SAVs by positions
# wild-type and mutant aa
# script: logoP_snp.R
########################################
@ -48,7 +48,7 @@ LP2<- LogoPlotSnps(plot_df = merged_df3
, omit_snp_count = c(0)# can be 0,1, 2, etc.# DD
, my_logo_col = "chemistry" #DD
, x_lab = "Wild-type position"
, y_lab = "nsSNP count"
, y_lab = "SAV count"
, x_ats = 10
, x_tangle = 90
, y_ats = 15
@ -87,7 +87,7 @@ LP3<- LogoPlotMSA(unified_msa
, x_axis_offset_filtered = 0.05
, y_axis_offset = 0.05
#, y_breaks = c(0, 2, 4, 6, 8, 10, 12)
, x_lab_mut = "nsSNP-position"
, x_lab_mut = "SAV-position"
#, y_lab_mut
, x_ats = 10
, x_tangle = 90

View file

@ -85,7 +85,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -76,7 +76,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -41,7 +41,7 @@ my_yals = 13 # y axis label size
my_lls = 13 # legend label size
d_lab_size = 5
#===============================
# lineage sample and SNP count
# lineage sample and SAV count
#===============================
lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, all_lineages = F
@ -58,7 +58,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, my_xals = my_xals # x axis label size
, my_yals = my_yals # y axis label size
, my_lls = my_lls # legend label size
, bar_col_labels = c("nsSNPs", "Total Samples")
, bar_col_labels = c("SAVs", "Total Samples")
, bar_col_values = c("grey50", "gray75")
, bar_leg_name = ""
, leg_location = "top"
@ -68,7 +68,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
)
lin_countP
#===============================
# lineage SNP diversity count
# lineage SAV diversity count
#===============================
lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, x_categ = "sel_lineages"
@ -87,8 +87,8 @@ lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, y_log10 = F
, y_scale_percent = F
, leg_location = "top"
, y_label = "Percent" #"SNP diversity"
, bp_plot_title = "nsSNP diversity"
, y_label = "Percent" #"SAV diversity"
, bp_plot_title = "SAV diversity"
, title_colour = "black" #"chocolate4"
, subtitle_text = NULL
, sts = 10

View file

@ -1,5 +1,5 @@
#!/usr/bin/env Rscript
source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/alr/alr_lineage_bp_dist.R")
source("/home/sethp/git/LSHTM_analysis/scripts/plotting/plotting_thesis/alr/alr_lineage_bp_dist.R")
###########################################
# TASK: generate plots for lineage

View file

@ -65,7 +65,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -113,7 +113,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -138,7 +138,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -162,7 +162,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -180,7 +180,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -199,7 +199,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -217,7 +217,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -233,7 +233,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours_no_isd # from globals
@ -262,7 +262,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -331,7 +331,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -68,7 +68,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -116,7 +116,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -141,7 +141,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -165,7 +165,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -183,7 +183,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -202,7 +202,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -220,7 +220,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -235,7 +235,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -264,7 +264,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -333,7 +333,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -78,7 +78,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -67,7 +67,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -115,7 +115,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -140,7 +140,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -164,7 +164,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -182,7 +182,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -201,7 +201,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -219,7 +219,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -234,7 +234,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -263,7 +263,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -332,7 +332,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -76,7 +76,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -68,7 +68,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -116,7 +116,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -141,7 +141,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -165,7 +165,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -183,7 +183,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -202,7 +202,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -220,7 +220,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -235,7 +235,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -264,7 +264,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -333,7 +333,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -78,7 +78,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -41,7 +41,7 @@ my_yals = 8 # y axis label size
my_lls = 8 # legend label size
d_lab_size = 2.3
#===============================
# lineage sample and SNP count
# lineage sample and SAV count
#===============================
lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, all_lineages = F
@ -58,7 +58,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, my_xals = my_xals # x axis label size
, my_yals = my_yals # y axis label size
, my_lls = my_lls # legend label size
, bar_col_labels = c("nsSNPs", "Total Samples")
, bar_col_labels = c("SAVs", "Total Samples")
, bar_col_values = c("grey50", "gray75")
, bar_leg_name = ""
, leg_location = "top"
@ -68,7 +68,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
)
lin_countP
#===============================
# lineage SNP diversity count
# lineage SAV diversity count
#===============================
lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, x_categ = "sel_lineages"
@ -87,8 +87,8 @@ lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, y_log10 = F
, y_scale_percent = F
, leg_location = "top"
, y_label = "Percent" #"SNP diversity"
, bp_plot_title = "nsSNP diversity"
, y_label = "Percent" #"SAV diversity"
, bp_plot_title = "SAV diversity"
, title_colour = "black" #"chocolate4"
, subtitle_text = NULL
, sts = 10

View file

@ -68,7 +68,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -116,7 +116,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -141,7 +141,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -165,7 +165,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -183,7 +183,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -202,7 +202,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -220,7 +220,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -238,7 +238,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours_no_isd # from globals
@ -267,7 +267,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -336,7 +336,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -41,7 +41,7 @@ my_yals = 8 # y axis label size
my_lls = 8 # legend label size
d_lab_size = 2.3
#===============================
# lineage sample and SNP count
# lineage sample and SAV count
#===============================
lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, all_lineages = F
@ -58,7 +58,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
, my_xals = my_xals # x axis label size
, my_yals = my_yals # y axis label size
, my_lls = my_lls # legend label size
, bar_col_labels = c("nsSNPs", "Total Samples")
, bar_col_labels = c("SAVs", "Total Samples")
, bar_col_values = c("grey50", "gray75")
, bar_leg_name = ""
, leg_location = "top"
@ -68,7 +68,7 @@ lin_countP = lin_count_bp(lf_data = lineage_dfL[['lin_lf']]
)
lin_countP
#===============================
# lineage SNP diversity count
# lineage SAV diversity count
#===============================
lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, x_categ = "sel_lineages"
@ -87,8 +87,8 @@ lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
, y_log10 = F
, y_scale_percent = F
, leg_location = "top"
, y_label = "Percent" #"SNP diversity"
, bp_plot_title = "nsSNP diversity"
, y_label = "Percent" #"SAV diversity"
, bp_plot_title = "SAV diversity"
, title_colour = "black" #"chocolate4"
, subtitle_text = NULL
, sts = 10

View file

@ -68,7 +68,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nLig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -116,7 +116,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nPPI2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -141,7 +141,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM\nNA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -165,7 +165,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -183,7 +183,7 @@ posC_lig
if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -202,7 +202,7 @@ if (tolower(gene)%in%geneL_ppi2){
if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -220,7 +220,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -235,7 +235,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -264,7 +264,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -333,7 +333,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -79,7 +79,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]

View file

@ -11,7 +11,7 @@
# , lts = 20 # legend text size
# , ltis = 22 # label title size
# , geom_ls = 10 # geom_label size
# , yaxis_title = "Number of nsSNPs"
# , yaxis_title = "Number of SAVs"
# , bp_plot_title = ""
# , label_categories = c("Destabilising", "Stabilising")
# , title_colour = "chocolate4"
@ -94,7 +94,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-lig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -141,7 +141,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-ppi2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -167,7 +167,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-NA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -191,7 +191,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -210,7 +210,7 @@ if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -230,7 +230,7 @@ if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -248,7 +248,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -263,7 +263,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -286,7 +286,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -359,7 +359,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -60,7 +60,7 @@ mLigP = stability_count_bp(plotdf = df3_lig
, df_colname = "ligand_outcome"
#, leg_title = "mCSM-lig"
#, bp_plot_title = paste(common_bp_title, "ligand")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-lig"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -107,7 +107,7 @@ if (tolower(gene)%in%geneL_ppi2){
#, label_categories = labels_ppi2
#, bp_plot_title = paste(common_bp_title, "PP-interface")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-ppi2"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -133,7 +133,7 @@ if (tolower(gene)%in%geneL_na){
#, label_categories =
#, bp_plot_title = paste(common_bp_title, "Dist to NA")
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-NA"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -157,7 +157,7 @@ common_bp_title = paste0("Sites <", DistCutOff, angstroms_symbol)
posC_lig = site_snp_count_bp(plotdf = df3_lig
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -176,7 +176,7 @@ if (tolower(gene)%in%geneL_ppi2){
posC_ppi2 = site_snp_count_bp(plotdf = df3_ppi2
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -196,7 +196,7 @@ if (tolower(gene)%in%geneL_na){
posC_nca = site_snp_count_bp(plotdf = df3_na
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = ""
@ -214,7 +214,7 @@ if (tolower(gene)%in%geneL_na){
#------------------------------
posC_all = site_snp_count_bp(plotdf = df3
, df_colname = "position"
, xaxis_title = "Number of nsSNPs"
, xaxis_title = "Number of SAVs"
, yaxis_title = "Number of Sites"
, subtitle_colour = "chocolate4"
, subtitle_text = "All mutations sites"
@ -229,7 +229,7 @@ consurfP = stability_count_bp(plotdf = df3
, df_colname = "consurf_outcome"
#, leg_title = "ConSurf"
#, label_categories = labels_consurf
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "top"
, subtitle_text = "ConSurf"
, bar_fill_values = consurf_colours # from globals
@ -252,7 +252,7 @@ duetP = stability_count_bp(plotdf = df3
, df_colname = "duet_outcome"
, leg_title = "mCSM-DUET"
#, label_categories = labels_duet
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none"
, subtitle_text = "mCSM-DUET"
, bar_fill_values = c("#F8766D", "#00BFC4")
@ -325,7 +325,7 @@ proveanP = stability_count_bp(plotdf = df3
, df_colname = "provean_outcome"
#, leg_title = "PROVEAN"
#, label_categories = labels_provean
, yaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of SAVs"
, leg_position = "none" # top
, subtitle_text = "PROVEAN"
, bar_fill_values = c("#D01C8B", "#F1B6DA") # light pink and deep

View file

@ -85,7 +85,7 @@ foo2 = foo[foo$ligand_distance<10,]
table(foo2$ligand_outcome)
#############################
# wide plots SNP
# wide plots SAV
# DRUG
length(aa_pos_drug); aa_pos_drug
drug = foo[foo$position%in%aa_pos_drug,]