Provides tools to create a CancerEngine with block correlation structure. Also makes it possible to simulate paired clinical and gene expression data with this block structure.
BlockHyperParameters(nExtraBlocks = 100,
meanBlockSize = 100,
sigmaBlockSize = 30,
minBlockSize = 5,
mu0 = 6,
sigma0 = 1.5,
rate = 28.11,
shape = 44.25,
p.cor = 0.6,
wt.cor = 5)
makeBlockStructure(cm, hyperp, xform = normalOffset, ...)
The BlockHyperParameters
generator returns an object of class
BlockHyperParameters
.
The function makeBlockStructure
returns an object of the
CancerEngine
class.
object of class CancerModel
object of class BlockHypeParameters
integer scalar specifying number of blocks not
involved in the "hit" structure defined by the CancerModel
numeric scalar specifying mean number of genes in a correlated block
numeric scalar specifying standard deviation of the number of genes in a correlated block
integer scalar specifying minimal number of genes in a correlated block
numeric scalar specifying expected mean expression level of a gene on the log scale
numeric scalar specifying standard deviation of the mean expression level of a gene on the log scale
numeric scalar specifying one of the gamma parameters
numeric scalar specifying one of the gamma parameters
numeric scalar specifying expected correlation within each block
numeric scalar specifying weight given to the expected block correlation
A function that will be passed to the alterMean
method
extra arguments that wil be passed back to the
xform
function
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
BlockHyperParameters
generator function.
nExtraBlocks
:An integer; the number of blocks not involved in
the "hit" structure defined by the CancerModel
.
meanBlockSize
:A real number; the mean number of genes in a correlated block.
sigmaBlockSize
:A real number; standard deviation of the number of genes in a correlated block.
minBlockSize
:An integer; the minimal number of genes in a correlated block.
mu0
:A real number; the expected mean expression level of a gene on the log scale.
sigma0
:A real number; the standard deviation of the mean expression level of a gene on the log scale.
rate
:Gamma parameter; see details.
shape
:Gamma parameter; see details.
p.cor
:A real number; the expected correlation within each block.
wt.cor
:A real number; the weight given to the expected block correlation.
There are no special methods defind for this class.
Kevin R. Coombes krc@silicovore.com,
Our standard model for gene expression in a homogeneous sample assumes
that the overall correlation matrix is block diagonal. Correlation
between genes in different blocks is assumed to be zero. Correlation
for genes in the same block is assumed to be a constant, but different
correlation constants can be used in different blocks. The actual
correlations are assumed to arise from a beta distribution of the form
Beta(pw, (1-p)w), where p=p.cor
and w=wt.cor
are two of the
hyperparameters.
The number of blocks is determined jointly by the CancerModel
,
cm
, and the hyperparameter nExtraBlocks
. The size of a
block is assumed to arise from a normal distribution with mean given
by meanBlockSize
and standard deviaion given by
sigmaBlockSize
. To avoid accidentally assigning non-postive
block sizes, this distribution is truncated below by
minBlockSize
.
The expression of each gene is assumed to come from a log-normal
distribution with parameters describing the per-gene mean (\(\mu_g\))
and standard deviation (\(\sigma_g\)) n the log scale. These
parameters, in turn, are assumed to come from hyperdistributions.
Specifically, we assume that \(\mu_g\) comes from a normal distribution
with mean mu0
and standard deviation sigma0
. We also
assume that \(\sigma_g\) comes from an inverse gamma distribution with
parameters rate
and shape
.
The BlockHyperParameters
class simply bundles the parameters for
this model into a single structure. The default values are consistent
with data we have seen from several Affymetrix microarray studies.
The makeBlockStructure
function takes a CancerModel
and
a BlockHyperParameters
object as arguments and produces a
CancerEngine
object. The rand
method for
this class can be used to generate matched clinical data (with the
structure defined by the CancerModel
object) and gene
expression data with the specified block correlation structure.
CancerModel
,
CancerEngine
showClass("BlockHyperParameters")
sm <- SurvivalModel(baseHazard = 1/3, units = 52, unitName = "weeks")
cm <- CancerModel("myModel", nPossible = 10, nPattern = 5,
survivalModel = sm)
hyper <- BlockHyperParameters()
engine <- makeBlockStructure(cm, hyper)
outcome <- rand(engine, 100)
summary(outcome$clinical)
dim(outcome$data)
Run the code above in your browser using DataLab