countsByCell: Within cell type gene-by-subject matrices

Description Usage Arguments Value See Also Examples

View source: R/aggregate_bio_var.R

Description

Given a vector of unique cell types, calculate a gene-by-subject matrix and inter-subject metadata for a differential expression design matrix.

Usage

1
countsByCell(scExp, subjectVar, cellVar)

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.

cellVar

Metadata column name assigning cell type. Used for aggregating gene-by-subject count matrices by cell type.

Value

List of gene-by-subject and design matrices for each cell type.

See Also

summarizedCounts for aggregate counts and metadata SummarizedExperiment object.

Examples

1
2
3
4
5
6
## Return list of `SummarizedExperiments` with gene-by-subject count matrices
## and subject metadata for each unique `SingleCellExperiment` cell type.
countsByCell(
    scExp=small_airway,
    subjectVar="orig.ident", cellVar="celltype"
)

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