downsampleCounts: Downsample read counts

View source: R/sim.R

downsampleCountsR Documentation

Downsample read counts

Description

This function downsamples the library sizes of a read counts table to the lowest library size, according to the methdology used in (Soneson and Delorenzi, BMC Bioinformatics, 2013).

Usage

    downsampleCounts(counts)

Arguments

counts

the read counts table which is subjected to downsampling.

Details

The downsampling process involves random sampling. For guaranteed reproducibility, be sure to use set.seed before downsampling. By default, when the metaseqR2 package is loaded, the seed is set to 42.

Value

The downsampled counts matrix.

Author(s)

Panagiotis Moulos

Examples

dataMatrix <- metaseqR2:::exampleCountData(5000)
D <- downsampleCounts(dataMatrix)

pmoulos/metaseqR2 documentation built on May 20, 2024, 5:48 a.m.