npSeq.Simu.Data: Simulate sequencing data

Description Usage Arguments Details Value Author(s) References Examples

View source: R/npSeq.simu.R

Description

Simulate sequencing data with two class, multiclass, quantitative or survival outcomes.

Usage

1
npSeq.Simu.Data(dat, seed=10)

Arguments

dat

a list with elements (the first three are required):
type: "twoclass", "multiclass", "quant", or "survi".
option: "1" for Poisson, "2" for negative binomial with dispersion 0.25, "3" for Poisson with outliers, "4" for negative binomial with outliers.
NSAM: number of samples. an integer for quant and survi, and a vector of integers for twoclass and multiclass.
NGENE: number of genes. default value 20000.
psig: percentage of significant genes. default value 0.3.
up.perc: in the significant genes, how many percent are up-regulated. Default value: 0.8.

seed

random seed

Details

This function generate all simulated data for the paper. Different outcome type: two class, multiple class, quantitative, or survival. Different distribution: Poisson, negative binomial, with/without outliers.

Value

a list with all elements in the input dat, and

rmean

gene expression levels.

cmean

sequencing depths.

mu

means of Poission/negative binomial distribution.

y

the outcome vector.

fold.change

the log fold change.

n

the count matrix

delta

TRUE/FALSE indicating whether a gene is differentially expressed.

gamma

for survival data. observed (1) or censored (0).

Author(s)

Jun Li

References

Jun Li and Robert Tibshirani (2011). Finding consistent patterns: a nonparametric approach for identifying differential expression in RNA-Seq data. To appear, Statistical Methods in Medical Research.

Jun Li, Daniela M. Witten, Iain Johnstone, Robert Tibshirani (2011). Normalization, testing, and false discovery rate estimation for RNA-sequencing data. To appear, Biostatistics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## two class Poisson-distributed data with 12 samples in each class
dat <- npSeq.Simu.Data(list(type='twoclass', option=1, NSAM=c(12, 12)))

## two class negative binomial-distributed data with outliers,
## 12 samples in each class
dat <- npSeq.Simu.Data(list(type='twoclass', option=4, NSAM=c(12, 12)))

## 4 class Poisson-distributed data with outliers,
## 6 samples in each class
dat <- npSeq.Simu.Data(list(type='multiclass', option=3, NSAM=c(6, 6, 6, 6)))

## quantitative negative binomial-distributed data with outliers,
## 24 samples totally
dat <- npSeq.Simu.Data(list(type='quant', option=4, NSAM=24))

## survival negative binomial-distributed data with outliers,
## 24 samples totally
dat <- npSeq.Simu.Data(list(type='survi', option=4, NSAM=24))

joey711/npSeq documentation built on May 19, 2019, 3:01 p.m.