DESetup: Setup options for RNA-seq count simulations.

Description Usage Arguments Value Author(s) Examples

Description

This function generates a set of differential expressed gene IDs with associated fold changes for a given number of genes, simulations and fraction of DE genes.

Usage

1
DESetup(ngenes, nsims=25, p.DE=0.1, LFC, sim.seed)

Arguments

ngenes

Number of genes to be simulated.

nsims

Number of simulations to run. Default is 25.

p.DE

Percentage of genes being differentially expressed (DE). Default is 10%.

LFC

The log2 fold change for DE genes. This can be: (1) a constant, e.g. 2; (2) a vector of values with length being number of DE genes. If the input is a vector and the length is not the number of DE genes, it will be sampled with replacement to generate log-fold change; (3) a function that takes an integer n, and generates a vector of length n, e.g. function(x) rnorm(x, mean=0, sd=1.5).

sim.seed

Simulation seed.

Value

A list with the following entries:

ngenes

An integer for number of genes.

nsims

An integer for number of simulations.

sim.seed

The specified simulation seed.

p.DE

Percentage of DE genes.

DEid

A list (length=nsims) of vectors (length=ngenes*p.DE) for the IDs of DE genes.

lfc

A list (length=nsims) of vectors (length=ngenes) for log fold change of all genes, ie nonDE=0 and DE=lfc.

design

Two group comparison

Author(s)

Beate Vieth

Examples

1
2
3
4
5
6
7
## Not run: 
desettings <- DESetup(ngenes=10000,
nsims=25,
p.DE=0.2,
LFC=function(x) sample(c(-1,1), size=x,replace=TRUE)*rgamma(x, 3, 3))

## End(Not run)

bvieth/powsim documentation built on May 13, 2019, 9:04 a.m.