View source: R/run_comparisons.R
run_comparison | R Documentation |
Create the plots for each comparison. Run the same analysis on dataset object (ds parameter) and transformed values (ds.imp parameter, optional).
run_comparison(
ds,
rowAnns,
colAnns = NA,
output_folder = ".",
ds.imp = NULL,
feat_sets = NULL,
var_colors = NULL,
gradient_palette = "RdBu",
corr_method = "pearson",
pval.test = "t.test",
pval.label = "p.signif",
boxplot_log10_y = F,
FC.method = "divide",
paired_analysis_column = NA,
do_paired_analysis = F,
make.QC.param = F,
make.QC.feature = F,
make.feat.plots = F,
discrete_stacked_params = NULL,
make.het.plot = F,
make.indiv.boxplot = F,
make.overview.boxplot = F,
make.heatmap = F,
make.corrplot = F,
make.overview.corrscatt = F,
make.indiv.corrscatt = F,
make.barplot = F,
make.FC.pval.plot = F,
save_table = F
)
ds |
A dataset object (a list with vals, rowAnn, colAnn, comparison, name). |
rowAnns |
A character vector of 1-2 column names in ds$rowAnn. c(MainComparison, Subgroup) |
colAnns |
A character vector of 1-2 column names in ds$colAnn. c(Parameter, Feature/Stain/Gene) |
output_folder |
The main output folder for all custom analysis plots and boxplots for by.parameter and by.feature analysis |
ds.imp |
A dataset object similar to ds with imputed or another transformation values. |
feat_sets |
A list of 2 data frames for feature sets and parameters. |
var_colors |
A named vector with colors as values and annotations/groups as names. |
gradient_palette |
RColorBrewer palette name for gradients (e.g. heatmap, correlation plots). See RColorBrewer::display.brewer.all() for all options. |
corr_method |
Method for correlation (one of "pearson","spearman","kendall"). |
pval.test |
Which two-samples testing should be used? String corresponding to "method" parameter in |
pval.label |
How to display p-values? String corresponding to "label" parameter in |
boxplot_log10_y |
Log10 the values on y axis for boxplots and patient paired slopegraphs? Logical (T/F). Default is FALSE. |
FC.method |
Fold change computation method to use, either "divide" (for non-transformed values) or "subtract" (for log2-transformed values) |
paired_analysis_column |
column name in ds$rowAnn to create paired analysis plots for, e.g. PatientID if ds is data for all cores |
do_paired_analysis |
makes plots to look at subgroup differences within the same patient. Will only run if paired_analysis_column is specified. |
make.QC.param , make.QC.feature , make.feat.plots , make.het.plot , make.indiv.boxplot , make.overview.boxplot , make.heatmap , make.corrplot , make.overview.corrscatt , make.indiv.corrscatt , make.barplot , make.FC.pval.plot |
Logicals (TRUE/FALSE) indicating whether to make these plots. Note: make.indiv.corrscatt = T takes a long time. |
discrete_stacked_params |
parameter names to search for in colAnn1 to make discrete stacked barplots, e.g. "Het.Score" |
save_table |
Print MainComparison + ID data to csv file. |
run |
A one row data frame or list object with logicals for what to run, names: make.boxplots, make.paired.boxplots, make.heatmaps, make.surv.curve |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.