Aggregate cells to samples
Source:R/AllGenerics.R
, R/aggregateCellsToSamples-methods.R
aggregateCellsToSamples.Rd
Utilty function that factilites cell-to-sample aggregation. By default, this function will sum the counts across cells to sample level.
Usage
aggregateCellsToSamples(x, ...)
# S4 method for SingleCellExperiment
aggregateCellsToSamples(x)
Details
Internally this function automatically obtains the cell-to-sample groupings
and then performs a sum aggregation with the aggregate()
function.
Examples
data(SingleCellExperiment_lanesplit, package = "AcidTest")
## SingleCellExperiment ====
x <- SingleCellExperiment_lanesplit
x <- aggregateCellsToSamples(x)
print(x)
#> class: RangedSummarizedExperiment
#> dim: 100 8
#> metadata(2): aggregate aggregateCols
#> assays(1): counts
#> rownames(100): gene001 gene002 ... gene099 gene100
#> rowData names(10): broadClass description ... ncbiGeneId seqCoordSystem
#> colnames(8): sample_1_L001 sample_1_L002 ... sample_2_L003
#> sample_2_L004
#> colData names(0):