Learn R Programming

RUVcorr (version 1.4.2)

simulateGEdata: Simulate gene expression data.

Description

simulateGEdata returns simulated noisy gene expression values of specified size and its underlying gene-gene correlation.

Usage

simulateGEdata(n, m, k, size.alpha, corr.strength, g = NULL,
  Sigma.eps = 0.1, nc, ne, intercept = TRUE, check.input = FALSE)

Arguments

n
An integer setting the number of genes.
m
An integer setting the number of arrays.
k
An integer setting number of dimensions of noise term, controls dimension of $W$ and $\alpha$.
size.alpha
A numeric scalar giving the maximal and minimal absolute value of $\alpha$.
g
An integer value between [1, min(k, corr.strength)) giving the correlation between $X$ and $W$ or NULL for independence.
corr.strength
An integer controlling the dimension of $X$ and $\beta$.
Sigma.eps
A numeric scalar setting the amount of random variation in $\epsilon$; Sigma.eps $>0$.
nc
An integer setting the number of negative controls.
ne
An integer setting the number of strongly expressed genes.
intercept
An logical value indicating whether the systematic noise has an intercept.
check.input
A logical scalar; if TRUE all input is checked (not advisable for large simulations).

Value

  • simulateGEdata returns output of the class simulateGEdata. An object of class simulateGEdata is a list with the following components:
    • Truth
    { A matrix containing the values of $X\beta$.}
  • YA matrix containing the values in $Y$.
  • NoiseA matrix containing the values in $W\alpha$.
  • SigmaA matrix containing the true gene-gene correlations, as defined by $X\beta$.
  • InfoA matrix containing some of the general information about the simulation.

Details

This function generates log2-transformed expression values of n genes in m arrays. The expression values consist of true expression and noise: $$Y=X\beta+W\alpha+\epsilon$$ The dimensions of the matrices $X$ and $\beta$ are used to control the size of the correlation between the genes. It is possible to simualte three different classes of genes:
  • correlated genes expressed with true log2-transformed values from 0 to 16
  • correlated genes expressed with true log2-transformed values with mean 0
  • uncorrelated genes with true log2-transformed expression equal to 0 (negative controls)
The negative control are always the last nc genes in the data, whereas the strongly expressed genes are always the first ne genes in the data. The parameter intercept controls whether the systematic noise has an offset or not. Note that the intercept is one dimension of $W$. It is possible to either simulate data where $W$ and $X$ are independent by setting g to NULL, or increasing correlation $bWX$ between $W$ and $X$ by increasing g.

References

Jacob L., Gagnon-Bartsch J., Speed T. Correcting gene expression data when neither the unwanted variation nor the factor of interest are observed. Berkley Technical Reports (2012).

Examples

Run this code
Y<-simulateGEdata(500, 500, 10, 2, 5, g=NULL, Sigma.eps=0.1,
250, 100, intercept=TRUE, check.input=TRUE)
Y
Y<-simulateGEdata(500, 500, 10, 2, 5, g=3, Sigma.eps=0.1,
250, 100, intercept=TRUE, check.input=TRUE)
Y

Run the code above in your browser using DataLab