rarefyRepSeqExp: down-sampling to have the same library size.

Description Usage Arguments Value Examples

Description

function resamples counts to a lower same library size. Two resampling methods is proposed: with or without replacement.

Usage

1
2
3
4
5
6
7
rarefyRepSeqExp(
  x,
  sample.size = min(sData(x)$nReads),
  rngseed = FALSE,
  replace = TRUE,
  verbose = TRUE
)

Arguments

x

an object of class RepSeqExperiment.

sample.size

an integer indicate the final library size for all samples. The default is the smallest library size among all samples of the data set.

rngseed

a integer used as seed for a reproducible result.

replace

a boolean if TRUE the resampling is drawn with replacement.

verbose

a boolean if TRUE the detail of computation step will be shown.

Value

an object of class RepSeqExperiment

Examples

1
2
3
4
5
6
7
## Not run: 
# The package RepSeqData contains example datasets 
library(RepSeqData)
RepSeqDataDownSampling <- rarefyRepSeqExp(x = RepSeqData, rngseed = 1234)
RepSeqDataDownSampling

## End(Not run)

ph-pham/RepSeq documentation built on Dec. 22, 2021, 7:47 a.m.