Learn R Programming

metaRNASeq (version 1.0.7)

sim.function: Simulation of multiple RNA-seq experiments

Description

Simulate data arising from multiple independent RNA-seq experiments

Usage

sim.function(param, dispFuncs, nrep = 4, classes = NULL, inter.sd = 0.3)

Arguments

param

Mean expression levels: param must be a data frame containing at least two columns named "mucond1" and "mucond2" and one row per gene.

dispFuncs

List of length equal to the number of studies to be simulated, containing the gamma regression parameters describing the mean-dispersion relationship for each one; these are the mean-dispersion functions linking mean and intra-study variability for each independent experiment.

nrep

Number of replicates to be simulated in each condition in each study. Ignored if classes is filled.

classes

List of class memberships, one per study (maximum 20 studies). Each vector or factor of the list can only contain two levels which correspond to the two conditions studied. If NULL, classes is built as a list of two vectors with nrep labels 1 (for condition 1) and nrep labels 2 (for condition 2).

inter.sd

Inter-study variability. By default, inter.sd is set to 0.3, which corresponds to a moderate inter-study variability in the case where param and dispFuncs parameters are used to simulate data.

Value

A matrix with simulated expression levels, one row per gene and one column per replicate. Names of studies are given in the column names of the matrix.

Details

Details about the simulation procedure are given in the following paper:

References

A. Rau, G. Marot and F. Jaffrezic (2014). Differential meta-analysis of RNA-seq data. BMC Bioinformatics 15:91

See Also

metaRNASeq

Examples

Run this code
# NOT RUN {
## Load simulation parameters
data(param)
data(dispFuncs)

## Simulate data
matsim <- sim.function(param = param, dispFuncs = dispFuncs)
sim.conds <- colnames(matsim)
rownames(matsim) <-paste("tag", 1:dim(matsim)[1],sep="")

# extract simulated data from one study
simstudy1 <- extractfromsim(matsim,"study1")
head(simstudy1$study)
simstudy1$pheno
# }

Run the code above in your browser using DataLab