countsSampling: countsSampling: Downsampling the read counts in a cell

View source: R/countsSampling.R

countsSamplingR Documentation

countsSampling: Downsampling the read counts in a cell

Description

This function is used to downsample the read counts in a cell for single-cell RNA-seq (scRNA-seq) data. It takes a non-negative vector of scRNA-seq raw read counts of a cell as input.

Usage

countsSampling(counts, fraction = 0.1)

Arguments

counts

A cell's raw read counts for each gene, could be a vector or a SingleCellExperiment object.

fraction

Fraction of reads to be downsampled, should be between 0-1, default is 0.1.

Value

A vector of the downsampled read counts of each gene in the cell.

Author(s)

Zhun Miao.

See Also

scRecover, for imputation of single-cell RNA-seq data.

estDropoutNum, for estimating dropout gene number in a cell.

normalization, for normalization of single-cell RNA-seq data.

scRecoverTest, a test dataset for scRecover.

Examples

# Load test data
data(scRecoverTest)

# Downsample the read counts in oneCell
oneCell.down <- countsSampling(counts = oneCell, fraction = 0.1)



miaozhun/ImputeSingle documentation built on Jan. 12, 2023, 8:06 p.m.