From bf432cd054485d63d9b1f9a722ef5f0893b8af2c Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Tue, 14 Sep 2021 18:20:12 +0100 Subject: [PATCH] more updates to pairs_panels to take colnames for plotting --- scripts/functions/my_pairs_panel.R | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/functions/my_pairs_panel.R b/scripts/functions/my_pairs_panel.R index eb0268a..8968111 100644 --- a/scripts/functions/my_pairs_panel.R +++ b/scripts/functions/my_pairs_panel.R @@ -1,17 +1,17 @@ my_corr_pairs <- function (corr_data_all - , corr_data_range = 1:length(corr_data_all) + , corr_cols = colnames(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 + , ats = 1.5 + , corr_lab_size = 3 , corr_value_size = 1) { - corr_data_df = corr_data_all[corr_data_range] + corr_data_df = corr_data_all[corr_cols] my_bg = categ_colour[corr_data_all[[colour_categ_col]] ] OutPlot_corr = pairs.panels(corr_data_df @@ -38,6 +38,14 @@ my_corr_pairs <- function (corr_data_all } +c_plot <- my_corr_pairs(corrplot_df + + , dot_size = 1.6 + , ats = 1.5 + , corr_lab_size = 1.5 + , corr_value_size = 1) + + ###################################################################### my_pp = function (x, smooth = TRUE, scale = FALSE, density = TRUE, ellipses = TRUE, digits = 2, method = "pearson", pch = 20, lm = FALSE, cor = TRUE,