run_paired_analysis: Makes plots to look at subgroup differences within the same...

View source: R/paired.R

run_paired_analysisR Documentation

Makes plots to look at subgroup differences within the same patient

Description

Makes plots to look at subgroup differences within the same patient

Usage

run_paired_analysis(
  ds,
  rowAnns,
  colAnns = NA,
  out_dir = ".",
  var_colors = NULL,
  pair_id = 1,
  pval.test = "t.test",
  pval.label = "p.signif",
  log10_y = 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.

var_colors

A named vector with colors as values and annotations/groups as names.

pair_id

Name or index of column in ds$rowAnn that count as patients or groups to pair by, i.e. which ID to average over, e.g. patient ID (if there are multiple rows per patient)

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).


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