Seurat (version 2.3.4)

SampleUMI: Sample UMI

Description

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

Usage

SampleUMI(data, max.umi = 1000, upsample = FALSE, progress.bar = 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

progress.bar

Display the progress bar

Value

Matrix with downsampled data

Examples

Run this code
# NOT RUN {
raw_data = as.matrix(x = pbmc_small@raw.data)
downsampled = SampleUMI(data = raw_data)
head(x = downsampled)

# }

Run the code above in your browser using DataCamp Workspace