pbFlatten {muscat} | R Documentation

## pbFlatten Flatten pseudobulk SCE

### Description

Flattens a pseudobulk `SingleCellExperiment` as returned by `aggregateData` such that all cell subpopulations are represented as a single assay.

### Usage

    pbFlatten(pb, normalize = TRUE)

### Arguments

`pb` | a pseudobulk `SingleCellExperiment` as returned by `aggregateData`, with different subpopulations as assays.
`normalize` | logical specifying whether to compute a `logcpm` assay.

### Value

a `SingleCellExperiment`.

### Examples

    data(example_sce)
    library(SingleCellExperiment)
    pb_stack <- aggregateData(example_sce)
    (pb_flat <- pbFlatten(pb_stack))
    ncol(pb_flat) == ncol(pb_stack)*length(assays(pb_stack))

[Package muscat version 1.6.0 Index]