added plotting_colnames.R in scripts/plotting
This commit is contained in:
parent
1b08080078
commit
d6766d9d9c
1 changed files with 138 additions and 0 deletions
138
scripts/plotting/plotting_colnames.R
Normal file
138
scripts/plotting/plotting_colnames.R
Normal file
|
@ -0,0 +1,138 @@
|
|||
geneL_normal = c("pnca")
|
||||
geneL_na = c("gid", "rpob")
|
||||
geneL_ppi2 = c("alr", "embb", "katg", "rpob")
|
||||
|
||||
# LigDist_colname # from globals used
|
||||
# ppi2Dist_colname #from globals used
|
||||
# naDist_colname #from globals used
|
||||
|
||||
common_cols = c("mutationinformation"
|
||||
, "id"
|
||||
, drug, "drug_name"
|
||||
, "mutation", "mutation_info"
|
||||
, "wild_type", "mutant_type", "position"
|
||||
, "pos_count"
|
||||
, "snp_frequency"
|
||||
, "total_id_ucount"
|
||||
, "drtype", "drtype_mode", "drtype_max"
|
||||
, "dst", "dst_mode"
|
||||
, "mutation_info_labels", "sensitivity"
|
||||
, "lineage", "lineage_labels", "lineage_count_all", "lineage_count_unique"
|
||||
, "ligand_id", LigDist_colname
|
||||
, "duet_stability_change", "duet_scaled", "duet_outcome"
|
||||
, "foldx_scaled_signC"
|
||||
, "ddg_foldx", "foldx_scaled", "foldx_outcome"
|
||||
, "deepddg", "deepddg_outcome", "deepddg_scaled"
|
||||
, "ddg_dynamut2", "ddg_dynamut2_scaled", "ddg_dynamut2_outcome"
|
||||
, "avg_stability", "avg_stability_outcome", "avg_stability_scaled"
|
||||
, "ligand_affinity_change", "ligand_outcome", "affinity_scaled"
|
||||
, "mmcsm_lig", "mmcsm_lig_scaled", "mmcsm_lig_outcome"
|
||||
, "avg_lig_affinity", "avg_lig_affinity_outcome", "avg_lig_affinity_scaled"
|
||||
, "consurf_score", "consurf_scaled", "consurf_outcome"
|
||||
, "consurf_colour_rev"
|
||||
, "provean_score", "provean_outcome", "provean_scaled"
|
||||
, "snap2_score", "snap2_scaled", "snap2_accuracy_pc", "snap2_outcome"
|
||||
, "asa", "rsa", "ss", "ss_class", "kd_values", "rd_values"
|
||||
, "maf" #, "af"
|
||||
, "or_logistic", "pval_logistic"
|
||||
, "or_mychisq", "log10_or_mychisq"
|
||||
, "or_fisher", "pval_fisher", "neglog_pval_fisher"
|
||||
, "consurf_colour", "consurf_ci_upper", "consurf_ci_lower"
|
||||
, "consurf_ci_colour", "consurf_msa_data", "consurf_aa_variety"
|
||||
, "wild_pos", "chain", "wild_chain_pos"
|
||||
, "wt_3upper", "mut_3upper"
|
||||
, "gene_name", "seq_offset4pdb", "pdb_file"
|
||||
)
|
||||
|
||||
##################################################################
|
||||
#========================
|
||||
# Common: affinity cols
|
||||
#========================
|
||||
common_raw_affinity_cols = c("ligand_affinity_change"
|
||||
, "mmcsm_lig"
|
||||
, "avg_lig_affinity")
|
||||
|
||||
common_scaled_affinity_cols = c("affinity_scaled"
|
||||
, "mmcsm_lig_scaled"
|
||||
, "avg_lig_affinity_scaled")
|
||||
|
||||
common_outcome_affinity_cols = c( "ligand_outcome"
|
||||
, "mmcsm_lig_outcome"
|
||||
, "avg_lig_affinity_outcome")
|
||||
|
||||
#======================================================
|
||||
# Plotting cols + affinity cols: conditional on gene
|
||||
#======================================================
|
||||
if (tolower(gene)%in%geneL_normal){
|
||||
plotting_cols = common_cols
|
||||
|
||||
raw_affinity_cols = common_raw_affinity_cols
|
||||
scaled_affinity_cols = common_scaled_affinity_cols
|
||||
outcome_affinity_cols = common_outcome_affinity_cols
|
||||
affinity_dist_colnames = LigDist_colname
|
||||
|
||||
}
|
||||
# ppi2 genes
|
||||
if (tolower(gene)%in%geneL_ppi2){
|
||||
plotting_cols = c(common_cols,
|
||||
ppi2Dist_colname,
|
||||
"mcsm_ppi2_affinity", "mcsm_ppi2_scaled", "mcsm_ppi2_outcome")
|
||||
|
||||
raw_affinity_cols = c(common_raw_affinity_cols , "mcsm_ppi2_affinity")
|
||||
scaled_affinity_cols = c(common_scaled_affinity_cols , "mcsm_ppi2_scaled" )
|
||||
outcome_affinity_cols = c(common_outcome_affinity_cols , "mcsm_ppi2_outcome")
|
||||
affinity_dist_colnames = c(LigDist_colname, ppi2Dist_colname)
|
||||
|
||||
|
||||
}
|
||||
|
||||
#na_genes
|
||||
if (tolower(gene)%in%geneL_na){
|
||||
plotting_cols = c(common_cols,
|
||||
naDist_colname,
|
||||
"mcsm_na_affinity", "mcsm_na_scaled", "mcsm_na_outcome")
|
||||
|
||||
raw_affinity_cols = c(common_raw_affinity_cols , "mcsm_na_affinity")
|
||||
scaled_affinity_cols = c(common_scaled_affinity_cols , "mcsm_na_scaled")
|
||||
outcome_affinity_cols = c(common_outcome_affinity_cols , "mcsm_na_outcome")
|
||||
affinity_dist_colnames = c(LigDist_colname, ppi2Dist_colname, naDist_colname)
|
||||
|
||||
}
|
||||
|
||||
if (tolower(gene)%in%c("rpob")){
|
||||
plotting_cols = c(plotting_cols, "X5uhc_position","X5uhc_offset")
|
||||
}
|
||||
#=======================================
|
||||
# All: affinity cols: based on above confition
|
||||
#========================================
|
||||
|
||||
all_affinity_cols = c(raw_affinity_cols
|
||||
, scaled_affinity_cols
|
||||
, outcome_affinity_cols)
|
||||
|
||||
#=======================================
|
||||
# All: stability cols
|
||||
# these are common, no condition on gene
|
||||
#========================================
|
||||
raw_stability_cols = c("duet_stability_change"
|
||||
, "deepddg"
|
||||
, "ddg_dynamut2"
|
||||
, "ddg_foldx"
|
||||
, "avg_stability")
|
||||
|
||||
scaled_stability_cols = c("duet_scaled"
|
||||
, "deepddg_scaled"
|
||||
, "ddg_dynamut2_scaled"
|
||||
, "foldx_scaled"
|
||||
, "foldx_scaled_signC" # needed to get avg stability
|
||||
, "avg_stability_scaled")
|
||||
|
||||
outcome_stability_cols = c("duet_outcome"
|
||||
, "deepddg_outcome"
|
||||
, "ddg_dynamut2_outcome"
|
||||
, "foldx_outcome"
|
||||
, "avg_stability_outcome")
|
||||
|
||||
all_stability_cols = c(raw_stability_cols
|
||||
, scaled_stability_cols
|
||||
, outcome_stability_cols)
|
Loading…
Add table
Add a link
Reference in a new issue