This function simulates a set of small modules. The primary purpose is to add a submodule structure to
the main module structure simulated by simulateDatExpr
.
simulateSmallLayer(
order,
nSamples,
minCor = 0.3, maxCor = 0.5, corPower = 1,
averageModuleSize,
averageExpr,
moduleSpacing,
verbose = 4, indent = 0)
a vector giving the simulation order for vectors. See details.
integer giving the number of samples to be simulated.
a multiple of maxCor
(see below) giving the minimum correlation of module genes
with the corresponding eigengene. See details.
maximum correlation of module genes with the corresponding eigengene. See details.
controls the dropoff of gene-eigengene correlation. See details.
average number of genes in a module. See details.
average strength of module expression vectors.
a number giving module spacing: this multiple of the module size will lie between the module and the next one.
integer level of verbosity. Zero means silent, higher values make the output progressively more and more verbose.
indentation for diagnostic messages. Zero means no indentation, each unit adds two spaces.
A matrix of simulated gene expressions, with dimension (nSamples, length(order))
.
Module eigenvectors are chosen randomly and independently. Module sizes are chosen randomly from an
exponential distribution with mean equal averageModuleSize
. Two thirds of genes in
each module are simulated
as proper module genes and one third as near-module genes (see simulateModule
for details).
Between each successive pairs of
modules a number of genes given by moduleSpacing
will be left unsimulated (zero expression).
Module expression, that is the
expected standard deviation of the module expression vectors, is chosen randomly from an exponential
distribution with mean equal averageExpr
. The expression profiles are chosen such that their
correlations with the eigengene run from just below maxCor
to minCor * maxCor
(hence minCor must be
between 0 and 1, not including the bounds). The parameter corPower
can be chosen to control the
behaviour of the simulated correlation with the gene index; values higher than 1 will result in the
correlation approaching minCor * maxCor
faster and lower than 1 slower.
The simulated genes will be returned in the order given in order
.
simulateModule
for simulation of individual modules;
simulateDatExpr
for the main gene expression simulation function.