subCamera: limma/voom camera gene set analysis visualization

Description Usage Arguments Value References Examples

View source: R/subCamera.R

Description

Wrapper function to perform camera Gene Set Analysis (GSA) and visualize results in barplot (two classes) or heatmap (>2 classes).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
subCamera(
  emat,
  class,
  keepN = TRUE,
  batch = NULL,
  geneList = NULL,
  xKey = NULL,
  pValue = 0.01,
  topN = 15,
  allowNegCor = FALSE,
  interGeneCor = 0.01,
  doPlot = TRUE,
  doVoom = FALSE,
  normMethod = "quantile",
  pMax = 10,
  rowCluster = TRUE,
  classCol = getOption("subClassCol"),
  heatCol = NULL,
  cexText = 1,
  legendAdd = TRUE,
  ...
)

Arguments

emat

numeric matrix with row features and sample columns.

class

a factor vector specifying sample classes length(class)==ncol(emat).

keepN

a logical or numeric vector specifying which samples to keep (defaults to all).

batch

a factor vector specifying additional level in design matrix.

geneList

a named list. where each item is a gene set consisting of a character vector of genes belonging to that set.

xKey

a character vector matching emat with geneList identifiers. length(xKey)==nrow(emat). Leave blank if rownames(emat) and geneList uses same identifiers.

pValue

a p-value (number) indicating minimum gene set significance included in plot.

topN

integer, number of gene sets to include in the plot. (for K>2, lowest p-value for each class is included).

allowNegCor

logical, passed to limma::camera as allow.neg.cor parameter.

interGeneCor

a number, passed to limma::camera as inter.gene.cor parameter.

doPlot

a logical, indicating whether to return plot (TRUE) or significance values (FALSE) of results.

doVoom

a logical, indicating whether emat is untransformed sequencing count data and voom should be used for modeling.

normMethod

a character, only used if doVoom=TRUE and passed to calcNormFactors if element in c("TMM","RLE", "upperquartile","none") or voom ("scale", "quantile", "cyclicloess").

pMax

a numeric, log10(-pValue) for color scale.

rowCluster

logical, indicating whether heatmap rows should be clustered.

classCol

a character vector specifying class colors.

heatCol

a character vector specifying heatmap colors.

cexText

numeric, text scaling factor.

legendAdd

a logical, whether to add legend to barplot.

...

additional arguments passed to image or in case of levels(class)==2 barplot.

Value

a barplot/heatmap and camera output (list, invisible). For two-classes comparison, gene sets are ranked by significance and bars are colored according to relative up-regulation. In heatmap with default heatCol, red and blue indicates relative up- and down-regulation respectively. Color intensity reflects significance. Nominal 'camera' p-values are used as input for visualization.

References

Ritchie ME, Phipson B, Wu D, Hu Y, Law CW, Shi W, et al. limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucl. Acids Res. 2015;gkv007.

Robinson MD, McCarthy DJ, Smyth GK. edgeR: a Bioconductor package for differential expression analysis of digital gene expression data. Bioinformatics. 2010;26:139-40.

Law CW, Chen Y, Shi W, Smyth GK. voom: precision weights unlock linear model analysis tools for RNA-seq read counts. Genome Biology. 2014;15:R29.

Wu D, Smyth GK. Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Res. 2012;gks461.

Examples

1
2
3
4
# sample subset for reduced run-time
subset <- 25:75
cam <- subCamera(emat=crcTCGAsubset, class=crcTCGAsubset$CMS,
    rowCluster=FALSE, doVoom=TRUE, keepN=subset)

peterawe/CMScaller documentation built on June 13, 2020, 4:49 a.m.