This commit is contained in:
Tanushree Tunstall 2022-08-05 12:45:16 +01:00
parent 14f8f5d6d4
commit c0f59bc9c9
5 changed files with 74 additions and 12 deletions

View file

@ -37,6 +37,11 @@
#1) df to choose (merged_df3 or merged_df2)
#2)
##################################################################
DistCutOff = 10
LigDist_colname # = "ligand_distance" # from globals
ppi2Dist_colname = "interface_dist"
naDist_colname = "TBC"
dm_om_wf_lf_data <- function(df
, gene_name = gene # from globals
, colnames_to_extract
@ -51,6 +56,15 @@ dm_om_wf_lf_data <- function(df
, dr_other_muts_labels = c("DM", "OM") # only used if ^^ = ""
, categ_cols_to_factor){
df = as.data.frame(df)
df['sensitivity'] = ifelse(df['dst_mode'] == 1, "R", "S")
table(df['sensitivity'])
df[[mut_info_label_colname]] = ifelse(df[[mut_info_label_colname]] == "DM", "R", "S")
table(df[[mut_info_label_colname]])
# Initialise the required dfs based on gene name
geneL_normal = c("pnca")
#geneL_na_dy = c("gid")
@ -124,6 +138,7 @@ dm_om_wf_lf_data <- function(df
, mut_colname, mut_info_colname, mut_info_label_colname
, aa_pos_colname
, LigDist_colname
, ppi2Dist_colname, naDist_colname
, "duet_stability_change" , "duet_scaled" , "duet_outcome"
, "ligand_affinity_change", "affinity_scaled" , "ligand_outcome"
, "ddg_foldx" , "foldx_scaled" , "foldx_outcome"