added corr data to get_plotting_dfs.R and generate corr plots
This commit is contained in:
parent
639ccf1cd7
commit
b614962e45
4 changed files with 252 additions and 19 deletions
|
@ -61,12 +61,6 @@ all_plot_dfs = combining_dfs_plotting(my_df_u
|
|||
, lig_dist_colname = 'ligand_distance'
|
||||
, lig_dist_cutoff = 10)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cat(paste0("Directories imported:"
|
||||
, "\ndatadir:", datadir
|
||||
, "\nindir:", indir
|
||||
|
@ -110,7 +104,6 @@ df_lig = merged_df2_lig
|
|||
#======================
|
||||
# adding log cols
|
||||
#======================
|
||||
|
||||
df_ps$log10_or_mychisq = log10(df_ps$or_mychisq)
|
||||
df_ps$neglog_pval_fisher = -log10(df_ps$pval_fisher)
|
||||
|
||||
|
@ -119,9 +112,9 @@ df_ps$neglog_pwald_kin = -log10(df_ps$pwald_kin)
|
|||
|
||||
#df_ps$mutation_info_labels = ifelse(df_ps$mutation_info == dr_muts_col, 1, 0)
|
||||
|
||||
#===========================
|
||||
#===============================
|
||||
# Data for Correlation plots:PS
|
||||
#===========================
|
||||
#===============================
|
||||
# subset data to generate pairwise correlations
|
||||
cols_to_select = c("mutationinformation"
|
||||
, "duet_scaled"
|
||||
|
@ -136,7 +129,7 @@ cols_to_select = c("mutationinformation"
|
|||
, "or_kin"
|
||||
, "neglog_pwald_kin"
|
||||
, "af"
|
||||
, "af_kin"
|
||||
#, "af_kin"
|
||||
, "duet_outcome"
|
||||
, drug)
|
||||
|
||||
|
@ -176,9 +169,9 @@ offset = 1
|
|||
corr_ps_df2 = corr_data_ps[start:end]
|
||||
head(corr_ps_df2)
|
||||
|
||||
#-----------------
|
||||
#--------------------------
|
||||
# short_df ps: merged_df3
|
||||
#-----------------
|
||||
#--------------------------
|
||||
corr_ps_df3 = corr_ps_df2[!duplicated(corr_ps_df2$Mutation),]
|
||||
|
||||
na_or = sum(is.na(corr_ps_df3$`Log (OR)`))
|
||||
|
@ -194,9 +187,9 @@ check2 = nrow(corr_ps_df3) - na_adj_or
|
|||
#}
|
||||
|
||||
################################################################################################
|
||||
#===========================
|
||||
#=================================
|
||||
# Data for Correlation plots: LIG
|
||||
#===========================
|
||||
#=================================
|
||||
table(df_lig$ligand_outcome)
|
||||
|
||||
df_lig$log10_or_mychisq = log10(df_lig$or_mychisq)
|
||||
|
@ -258,7 +251,6 @@ offset = 1
|
|||
corr_lig_df2 = corr_data_lig[start:end]
|
||||
head(corr_lig_df2)
|
||||
|
||||
|
||||
#-----------------
|
||||
# short_df lig: merged_df3_lig
|
||||
#-----------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue