differentialExpression: Differential expression for cell subpopulations using MAST

Description Usage Arguments Value Examples

Description

Uses MAST to find differentially expressed features for specified cell subpopulations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
differentialExpression(x, ...)

## S4 method for signature 'SingleCellExperiment'
differentialExpression(
  x,
  useAssay = "counts",
  altExpName = "featureSubset",
  c1,
  c2 = NULL,
  onlyPos = FALSE,
  log2fcThreshold = NULL,
  fdrThreshold = 1
)

## S4 method for signature 'matrix'
differentialExpression(
  x,
  celdaMod,
  c1,
  c2 = NULL,
  onlyPos = FALSE,
  log2fcThreshold = NULL,
  fdrThreshold = 1
)

Arguments

x

A numeric matrix of counts or a SingleCellExperiment with the matrix located in the assay slot under useAssay. Rows represent features and columns represent cells. Must contain cluster labels in celdaClusters(x, altExpName = altExpName) if x is a SingleCellExperiment object.

...

Ignored. Placeholder to prevent check warning.

useAssay

A string specifying which assay slot to use if x is a SingleCellExperiment object. Default "counts".

altExpName

The name for the altExp slot to use. Default "featureSubset".

c1

Integer vector. Cell populations to include in group 1 for the differential expression analysis.

c2

Integer vector. Cell populations to include in group 2 for the differential expression analysis. If NULL, the clusters in the c1 group are compared to all other clusters. Default NULL.

onlyPos

Logical. Whether to only return markers with positive log2 fold change. Default FALSE.

log2fcThreshold

Numeric. A number greater than 0 that specifies the absolute log2 fold change threshold. Only features with absolute value above this threshold will be returned. If NULL, this filter will not be applied. Default NULL.

fdrThreshold

Numeric. A number between 0 and 1 that specifies the false discovery rate (FDR) threshold. Only features below this threshold will be returned. Default 1.

celdaMod

Celda object of class 'celda_C' or 'celda_CG'.

Value

Data frame containing MAST results including statistics such as p-value, log2 fold change, and FDR.

Examples

1
2
3
4
5
6
data(sceCeldaCG)
clusterDiffexpRes <- differentialExpression(sceCeldaCG, c1 = c(1, 2))
data(celdaCGSim, celdaCGMod)
clusterDiffexpRes <- differentialExpression(celdaCGSim$counts,
  celdaCGMod,
  c1 = c(1, 2))

celda documentation built on Nov. 8, 2020, 8:24 p.m.