SampleUMI: Sample UMI

Description Usage Arguments Value Examples

View source: R/preprocessing.R

Description

Downsample each cell to a specified number of UMIs. Includes an option to upsample cells below specified UMI as well.

Usage

1
SampleUMI(data, max.umi = 1000, upsample = FALSE, verbose = FALSE)

Arguments

data

Matrix with the raw count data

max.umi

Number of UMIs to sample to

upsample

Upsamples all cells with fewer than max.umi

verbose

Display the progress bar

Value

Matrix with downsampled data

Examples

1
2
3
4
data("pbmc_small")
counts = as.matrix(x = GetAssayData(object = pbmc_small, assay = "RNA", slot = "counts"))
downsampled = SampleUMI(data = counts)
head(x = downsampled)

ibseq/scs-analysis documentation built on Feb. 27, 2021, 12:35 a.m.