countsBySubject: Gene-by-subject count matrix

Description Usage Arguments Value See Also Examples

View source: R/summarize_counts.R

Description

Convert gene-by-cell count matrix to gene-by-subject count matrix. Row sums are calculated for each feature (i.e. gene) across cells by subject.

Usage

1
countsBySubject(scExp, subjectVar)

Arguments

scExp

SingleCellExperiment object containing (at minimum) gene counts and column metadata describing sample identifiers and cell types.

subjectVar

Metadata column name assigning biological sample identity to aggregate within-subject feature counts.

Value

S4 DataFrame of gene-by-subject count sums.

See Also

scSubjects for subjects values.

Examples

1
2
## Return cell count matrix aggregated by subject.
countsBySubject(scExp=small_airway, subjectVar="orig.ident")

aggregateBioVar documentation built on Nov. 8, 2020, 7:46 p.m.