countsByCell {aggregateBioVar} | R Documentation |
Given a vector of unique cell types, calculate a gene-by-subject matrix and inter-subject metadata for a differential expression design matrix.
countsByCell(scExp, subjectVar, cellVar)
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. |
List of gene-by-subject and design matrices for each cell type.
summarizedCounts
for aggregate counts and metadata
SummarizedExperiment object.
## 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" )