create_plots: Create plots in a folder in streamlined approach

View source: R/create_plots.R

create_plotsR Documentation

Create plots in a folder in streamlined approach

Description

Create plots in a folder in streamlined approach

Usage

create_plots(
  ds,
  rowAnns = 1,
  colAnns = NA,
  out_dir = ".",
  labels = "Sub1",
  var_colors = NULL,
  gradient_palette = NULL,
  corr_method = "pearson",
  pval.test = "t.test",
  pval.label = "p.signif",
  boxplot_log10_y = 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,
  also.complete = F
)

Arguments

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)

out_dir

The output directory where the plot will be saved, default is current working directory.

labels

A character vector of at least length 1 that will be collapsed for file name/plot titles.

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 stat_compare_means. Allowed values are "t.test" and "wilcox.test".

pval.label

How to display p-values? String corresponding to "label" parameter in stat_compare_means. Allowed values are "p.signif" (stars) and "p.format" (number).

boxplot_log10_y

Log10 the values on y axis for boxplots and patient paired slopegraphs? Logical (T/F). Default is FALSE.

also.complete

Logical indicating whether to also make "complete cores" plots as a seperate folder, default FALSE.


kazeera/hourglass documentation built on April 5, 2025, 7:18 a.m.