updated my_pairs_panel.R to make the dots coloured

This commit is contained in:
Tanushree Tunstall 2021-09-14 15:36:05 +01:00
parent 1249a08fb9
commit 036cc14e40

View file

@ -1,24 +1,40 @@
my_corr_pairs <- function (corr_data){ my_corr_pairs <- function (corr_data_all
, corr_data_range = 1:length(corr_data_all)
, corr_method = "spearman" # other options: "pearson" or "kendall"
, colour_categ_col = "mutation_info_labels"
, categ_colour = c("#E69F00", "#999999")
, density_show = F
, hist_col = "coral4"
, dot_size = 1.6
, ats = 1
, corr_lab_size = 1
, corr_value_size = 1)
{
OutPlot_corr = pairs.panels(corr_data corr_data_df = corr_data_all[corr_data_range]
, method = "spearman" # correlation method my_bg = categ_colour[corr_data_all[[colour_categ_col]] ]
, hist.col = "grey" ##00AFBB
, density = TRUE # show density plots OutPlot_corr = pairs.panels(corr_data_df
, ellipses = F # show correlation ellipses , method = corr_method
, hist.col = hist_col
, density = density_show
, ellipses = F
, smooth = F
, stars = T , stars = T
, rug = F , rug = F
, breaks = "Sturges" , breaks = "Sturges"
, show.points = T , show.points = T
#, bg = c("#f8766d", "#00bfc4")[unclass(factor(corr_ps$duet_outcome))] # foldx colours are reveresed #, bg = c("#f8766d", "#00bfc4")[unclass(factor(corr_data$duet_outcome))] # foldx colours are reveresed
#, pch = 21 # for bg , bg = my_bg
, jitter = T , pch = 21
, alpha = 1 , alpha = 1
, cex = 1.8 , cex = dot_size
, cex.axis = 2 , cex.axis = ats
, cex.labels = 3.5 , cex.labels = corr_lab_size
, cex.cor = 1 , cex.cor = corr_value_size
, smooth = F) )
return(OutPlot_corr) return(OutPlot_corr)
#return (my_bg)
} }