NBsimu: Generate synthetic RNA-seq data.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Simulate a count table follows negative binomial or Poisson distribution.

Usage

1
NBsimu(mle1, null = F, nsamp = 3, lfc, sdd = 0.3631473, norm = TRUE)

Arguments

mle1

A matrix of two columns. The mean (1st column) and dispersions(2nd column) for the baseline group.

nsamp

Number of samples per group.

lfc

The log2 fold change used to determine the mean of second group.

null

Logical, whether the second group is equal to the first.

sdd

A scalar vector. The normalizing factor is assumed to be distributed as exp(Norm(0, sdd)). The default value is estimated from the Montgomery data.

norm

Whether to generate artificial normalizing factors.

Details

Given a matrix of parameters, we generate the first group of negative binomial distributed synthetic RNA-seq data with the mean equal to the first column of mle, and the dispersion equals to the second column of mle. The second group shares same dispersions but the mean is calculated so that the log2 fold change is equal to lfc. When the entries in the second group is smaller or equal to zero. A Poisson distributed data will be generated instead.

Value

cd

A numeric matrix of synthetic RNA-seq data

cond

Vector or factors giving the experimental group/condition.

Author(s)

Yilun Zhang, David Rocke

See Also

ran.poi, ran.nb, sample.nb

Examples

1
2
3
mle = matrix(c(1:10,rep(1,10)), ncol=2)
lfc = rnorm(10, mean=0, sd = 0.5)
NBsimu(mle,lfc=lfc)

lunge111/intSEQ documentation built on May 20, 2019, 9:38 a.m.