aggregateBioVar: Aggregate subject-level biological variation

Description Usage Arguments Value Examples

View source: R/aggregate_bio_var.R

Description

Given an input gene-by-cell count matrix from a SingleCellExperiment object, sum within-subject gene counts into an aggregate gene-by-subject count matrix. Column metadata accessed by colData are collated by subjectMetaData to remove variables with inter-cell intrasubject variation, effectively retaining between-subject variation. The summary operations are performed across all cell types and within each cell type. A list of SummarizedExperiment objects is returned each with aggregate gene-by-subject count matrix and inter-subject metadata.

Usage

1
aggregateBioVar(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 SummarizedExperiment objects with gene-by-subject count matrices and variable inter-subject column metadata across and within cell types.

Examples

1
2
3
4
5
## Aggregate gene-by-subject count matrix and inter-subject metadata
aggregateBioVar(
    scExp=small_airway,
    subjectVar="orig.ident", cellVar="celltype"
)

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