added function for position_count_bp.R

This commit is contained in:
Tanushree Tunstall 2021-06-10 14:46:11 +01:00
parent cbb3749a21
commit b9d176afa4
3 changed files with 164 additions and 25 deletions

View file

@ -1,27 +1,41 @@
#=================
setwd("~/git/LSHTM_analysis/scripts/plotting/functions")
getwd()
# =================
# Test function
#==================
#source("../plotting_data.R")
#infile = "/home/tanu/git/Data/streptomycin/output/gid_comb_stab_struc_params.csv"
#pd_df = plotting_data(infile)
#my_df = pd_df[[1]]
#my_df_u = pd_df[[2]]
#my_df_u_lig = pd_df[[3]]
#dup_muts = pd_df[[4]]
# ==================
source("../plotting_data.R")
infile = "/home/tanu/git/Data/streptomycin/output/gid_comb_stab_struc_params.csv"
pd_df = plotting_data(infile)
my_df = pd_df[[1]]
my_df_u = pd_df[[2]]
my_df_u_lig = pd_df[[3]]
dup_muts = pd_df[[4]]
#------------------------------
# ------------------------------
# barplot for mscm stability
#------------------------------
#stability_count_bp(plotdf = my_df
# , df_colname = "duet_outcome"
# , leg_title = "DUET outcome")
# ------------------------------
stability_count_bp(plotdf = my_df_u
, df_colname = "duet_outcome"
, leg_title = "DUET outcome")
#------------------------------
# ------------------------------
# barplot for ligand affinity
#------------------------------
#stability_count_bp(plotdf = my_df_u
# , df_colname = "ligand_outcome"
# , leg_title = "Ligand outcome"
# , bp_plot_title = "Sites < 10 Ang of ligand"
#)
# ------------------------------
stability_count_bp(plotdf = my_df_u_lig
, df_colname = "ligand_outcome"
, leg_title = "Ligand outcome"
, bp_plot_title = "Sites < 10 Ang of ligand"
)
# ------------------------------
# barplot for nssnp site count: all
# ------------------------------
site_snp_count_bp(plotdf = my_df_u
, df_colname = "position")
# ------------------------------
# barplot for nssnp site count: within 10 Ang
# ------------------------------
site_snp_count_bp(plotdf = my_df_u_lig
, df_colname = "position")