subjectMetaData {aggregateBioVar} | R Documentation

## Collate metadata variation

### Description

Identify single cell experiment metadata variables that are identical within subject (e.g. genotype, treatment, cell line, sample preparation). Effectively excludes metadata variables containing between cell variation. Used as the design matrix for differential expression analysis.

### Usage

    subjectMetaData(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

Tibble data frame of metadata variables without intrasubject variation from single cell experiment metadata. Rows correspond to aggregated cells (i.e. subject / biological replicate) and columns to metadata attribute variables (e.g. genotype, treatment, cell line).

### Examples

    ## Return experiment metadata sans intrasubject variation.
    subjectMetaData(scExp=small_airway, subjectVar="orig.ident")

[Package aggregateBioVar version 1.0.0 Index]