Description Usage Arguments Value Examples
View source: R/summarize_counts.R
Given an input sparse count matrix and corresponding column metadata, aggregate gene counts by subject level. Metadata variables with only inter-subject variation are retained; any variables with cell-level variation within a subject are dropped (e.g. feature / RNA count by cell).
1 | summarizedCounts(scExp, subjectVar)
|
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. |
SummarizedExperiment object with feature counts aggregated by subject and summarized inter-subject metadata.
1 2 3 4 5 | ## Construct SummarizedExperiment object with gene-by-subject count matrix
## and column metadata summarized to exclude intrasubject variation.
## See `SummarizedExperiment` accessor functions `assay()` and `colData()`
## to access the count matrix and column metadata for downstream analyses.
summarizedCounts(scExp=small_airway, subjectVar="orig.ident")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.