generated lineage barplots and corr plots for conservation
This commit is contained in:
parent
424c1d184d
commit
14f8f5d6d4
3 changed files with 52 additions and 9 deletions
|
@ -137,6 +137,46 @@ my_corr_pairs(corr_data_all = corr_df_ppi2
|
|||
, corr_value_size = 1)
|
||||
|
||||
dev.off()
|
||||
|
||||
# FIXME: ADD distance
|
||||
#==================
|
||||
# mCSSM-NA affinity
|
||||
#==================
|
||||
|
||||
|
||||
|
||||
|
||||
# FIXME: ADD PROVEAN
|
||||
####################################################
|
||||
# CONSERVATION
|
||||
####################################################
|
||||
corr_df_cons = corr_plotdf[, corr_conservation_cols]
|
||||
|
||||
color_coln = which(colnames(corr_df_cons) == "dst_mode")
|
||||
end = which(colnames(corr_df_cons) == drug)
|
||||
ncol_omit = 2
|
||||
corr_end = end-ncol_omit
|
||||
|
||||
#---------------------------
|
||||
# Output: Conservation corrP
|
||||
#----------------------------
|
||||
corr_consP = paste0(outdir_images
|
||||
,tolower(gene)
|
||||
,"_corr_ppi2.svg" )
|
||||
|
||||
cat("Corr plot conservation coloured dots:", corr_consP)
|
||||
svg(corr_consP, width = 10, height = 10)
|
||||
|
||||
my_corr_pairs(corr_data_all = corr_df_cons
|
||||
, corr_cols = colnames(corr_df_cons[1:corr_end])
|
||||
, corr_method = "spearman" # other options: "pearson" or "kendall"
|
||||
, colour_categ_col = colnames(corr_df_cons[color_coln]) #"dst_mode"
|
||||
, categ_colour = c("red", "blue")
|
||||
, density_show = F
|
||||
, hist_col = "coral4"
|
||||
, dot_size = 2
|
||||
, ats = 1.5
|
||||
, corr_lab_size = 3
|
||||
, corr_value_size = 1)
|
||||
|
||||
dev.off()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# get plotting_dfs()
|
||||
# using dfs [lf and wf] from lineage_dfL
|
||||
# FIXME: add SNP diversity as the title
|
||||
#===============================
|
||||
# lineage sample and SNP count
|
||||
#===============================
|
||||
|
@ -54,7 +55,7 @@ lin_diversityP = lin_count_bp_diversity(lf_data = lineage_dfL[['lin_wf']]
|
|||
#=============================================
|
||||
lineage_bp_CL = paste0(outdir_images
|
||||
,tolower(gene)
|
||||
,"_lineage_bp_CL.svg")
|
||||
,"_lineage_bp_CL_Tall.svg")
|
||||
|
||||
cat("Lineage barplots:", lineage_bp_CL)
|
||||
svg(lineage_bp_CL, width = 8, height = 15)
|
||||
|
@ -62,6 +63,7 @@ svg(lineage_bp_CL, width = 8, height = 15)
|
|||
cowplot::plot_grid(lin_countP, lin_diversityP
|
||||
#, labels = c("(a)", "(b)", "(c)", "(d)")
|
||||
, nrow = 2
|
||||
# , ncols = 2
|
||||
, labels = "AUTO"
|
||||
, label_size = 25)
|
||||
|
||||
|
|
|
@ -235,11 +235,12 @@ corr_ppi2_colnames = c("mCSM-PPI2"
|
|||
, "dst_mode"
|
||||
, drug)
|
||||
|
||||
|
||||
corr_conservation = c("Consurf"
|
||||
#FIXME: Add provean
|
||||
corr_conservation_cols = c("Consurf"
|
||||
, "SNAP2"
|
||||
, "MAF"
|
||||
, "Log (OR)"
|
||||
, "-Log (P)"
|
||||
, "interface_dist"
|
||||
, "dst_mode"
|
||||
, drug)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue