countsSampling: countsSampling: Downsampling the read counts in a cell

Description Usage Arguments Value Author(s) See Also Examples

View source: R/countsSampling.R

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

1
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

1
2
3
4
5
# Load test data
data(scRecoverTest)

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

scRecover documentation built on Nov. 8, 2020, 5:03 p.m.