added corr plot TODO for lineage counts
This commit is contained in:
parent
0e777108a9
commit
f194b5ea4f
2 changed files with 30 additions and 7 deletions
|
@ -18,9 +18,12 @@
|
|||
# RETURNS: DF
|
||||
# containing all the columns required for generating downstream correlation plots
|
||||
|
||||
# TO DO: SHINY
|
||||
#1) Corr type?
|
||||
#2)
|
||||
# TODO: ADD
|
||||
#lineage_count_all
|
||||
#lineage_count_unique
|
||||
#my_df['lineage_proportion'] = my_df['lineage_count_unique']/my_df['lineage_count_all']
|
||||
#my_df['dist_lineage_proportion'] = my_df['lineage_count_unique']/total_mtblineage_uc
|
||||
|
||||
##################################################################
|
||||
# LigDist_colname #from globals: plotting_globals.R
|
||||
# ppi2Dist_colname #from globals: plotting_globals.R
|
||||
|
|
|
@ -1,10 +1,30 @@
|
|||
#!/usr/bin/env Rscript
|
||||
#source("~/git/LSHTM_analysis/config/alr.R")
|
||||
source("~/git/LSHTM_analysis/config/embb.R")
|
||||
#source("~/git/LSHTM_analysis/config/katg.R")
|
||||
#source("~/git/LSHTM_analysis/config/gid.R")
|
||||
#source("~/git/LSHTM_analysis/config/pnca.R")
|
||||
#source("~/git/LSHTM_analysis/config/rpob.R")
|
||||
|
||||
# get plottting dfs
|
||||
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
####################################################
|
||||
#=======
|
||||
# output
|
||||
#=======
|
||||
outdir_images = paste0("~/git/Writing/thesis/images/results/", tolower(gene), "/")
|
||||
|
||||
#=======
|
||||
# Input
|
||||
#=======
|
||||
merged_df3 = as.data.frame(merged_df3)
|
||||
corr_plotdf = corr_data_extract(merged_df3
|
||||
, gene = gene
|
||||
, drug = drug
|
||||
, extract_scaled_cols = F)
|
||||
colnames(corr_plotdf)
|
||||
|
||||
colnames(corr_df_m3_f)
|
||||
corr_plotdf = corr_df_m3_f # for downstream code
|
||||
#================
|
||||
# stability
|
||||
#================
|
||||
|
@ -179,7 +199,7 @@ corr_end = end-ncol_omit
|
|||
#----------------------------
|
||||
corr_consP = paste0(outdir_images
|
||||
,tolower(gene)
|
||||
,"_corr_ppi2.svg" )
|
||||
,"_corr_conservation.svg" )
|
||||
|
||||
cat("Corr plot conservation coloured dots:", corr_consP)
|
||||
svg(corr_consP, width = 10, height = 10)
|
||||
|
@ -191,9 +211,9 @@ my_corr_pairs(corr_data_all = corr_df_cons
|
|||
, categ_colour = c("red", "blue")
|
||||
, density_show = F
|
||||
, hist_col = "coral4"
|
||||
, dot_size = 2
|
||||
, dot_size =1.1
|
||||
, ats = 1.5
|
||||
, corr_lab_size = 3
|
||||
, corr_lab_size = 2.5
|
||||
, corr_value_size = 1)
|
||||
|
||||
dev.off()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue