Title: | XDE: a Bayesian hierarchical model for cross-study analysis of differential gene expression |
---|---|
Description: | Multi-level model for cross-study detection of differential gene expression. |
Authors: | R.B. Scharpf, G. Parmigiani, A.B. Nobel, and H. Tjelmeland |
Maintainer: | Robert Scharpf <[email protected]> |
License: | LGPL-2 |
Version: | 2.53.0 |
Built: | 2024-11-27 05:11:33 UTC |
Source: | https://github.com/bioc/XDE |
When TRUE
, log files from MCMC chains are not written to file.
When FALSE
, log files are written for every parameter by default.
burnin(object)
burnin(object)
object |
An object of class |
logical
R. Scharpf
## Not run: data(expressionSetList) params <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) ##the replacement method for burnin is called for its side effect of ##providing default values of storing MCMC chains output(params)[2:22] burnin(params) <- FALSE output(params)[2:22] burnin(params) <- TRUE output(params)[2:22] ## End(Not run)
## Not run: data(expressionSetList) params <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) ##the replacement method for burnin is called for its side effect of ##providing default values of storing MCMC chains output(params)[2:22] burnin(params) <- FALSE output(params)[2:22] burnin(params) <- TRUE output(params)[2:22] ## End(Not run)
This function calculates the posterior average for indicators of concordant and discordant differential expression from the saved log files. See details.
calculatePosteriorAvg(object, NCONC=2, NDIFF=1, burnin=0)
calculatePosteriorAvg(object, NCONC=2, NDIFF=1, burnin=0)
object |
Object of class |
NCONC |
Integer: number of studies for which the gene must be differentially expressed (in the same direction) to be classified as concordant differential expression |
NDIFF |
Integer: number of studies for which a gene must be up- or down-regulated to be classified as differentially expressed. It is the union of concordant and discordant differential expression. |
burnin |
Integer: number of MCMC iterations for the burnin. Posterior means are computed from the MCMC samples following burnin. |
For each iteration,
1. calculate the sign of delta * Delta
2. For each gene, compute the number of positive signs (P) and the number of negative signs (N) (a G x 2 matrix, where G is the number of genes in common across all studies). P + N is <= S, where S is the number of studies.
3. for a given gene, the discordant indicator is simply when P * N is nonzero.
4. The concordant indicator requires P * N = 0 AND P + N >= NCONC, where NCONC is specified by the user.
5. differential expression is simply | P | + | N | >= NDIFF. By default, NDIFF is 1 but can be user-specified.
The posterior average is then computed from the mean over all MCMC iterations.
A G x 3 matrix.
RS
Empirical starting values for the MCMC are based on data in objects of
class ExpressionSetList
empiricalStart(object, zeroNu = FALSE, phenotypeLabel, one.delta=FALSE, T_THRESH=4)
empiricalStart(object, zeroNu = FALSE, phenotypeLabel, one.delta=FALSE, T_THRESH=4)
object |
An object of class |
zeroNu |
Logical: if TRUE, the nu in the Bayesian model are not modeled – set to zero and not updated in the MCMC. Setting zeroNu to TRUE should be regarded as experimental |
phenotypeLabel |
character: binary phenotype. phenotypeLabel must be in the varLabels of each ExpressionSet object |
one.delta |
delta in the Bayesian model is a gene-specific indicator for differential expression. If one.delta is FALSE, we assume that a gene can be differentially expressed in a subset of studies. When TRUE, we assume that a gene is differentially expressed in all studies or in none. |
T_THRESH |
A threshold of t-statistics (calculated row-wise for each study) for determining starting values of the differential expression indicator, delta. |
A list containing starting values for the MCMC that are derived from empirical estimates of the data.
R. Scharpf
zeroNu
, XdeParameter-class
,
ExpressionSetList-class
library(XDE) data(expressionSetList) eList <- studyCenter(expressionSetList) empirical <- empiricalStart(eList, phenotypeLabel="adenoVsquamous", T_THRESH=3) ##By default, initial values for the MCMC are sampled from the prior ##when initializing an object of class XdeParamater params <- new("XdeParameter", esetList=eList, phenotypeLabel="adenoVsquamous", one.delta=FALSE, burnin=TRUE) ##The initial values can be replaced by empirical values as follows: firstMcmc(params) <- empirical
library(XDE) data(expressionSetList) eList <- studyCenter(expressionSetList) empirical <- empiricalStart(eList, phenotypeLabel="adenoVsquamous", T_THRESH=3) ##By default, initial values for the MCMC are sampled from the prior ##when initializing an object of class XdeParamater params <- new("XdeParameter", esetList=eList, phenotypeLabel="adenoVsquamous", one.delta=FALSE, burnin=TRUE) ##The initial values can be replaced by empirical values as follows: firstMcmc(params) <- empirical
Object of class ExpressionSetList
containing three
studies. Each element in the list is an ExpressionSet
data(expressionSetList)
data(expressionSetList)
Parmigiani et al. (2004) performed a cross-study analysis of three
lung cancer studies. The studies used in this analysis were merged by
UniGene identifiers to obtain a set of 3,171 gene. The R experiment
data package lungExpression
that was developed to facilitate
the reproducibility of this analysis contains the three studies as
ExpressionSets. Here, we take a random sample of 500 features from
one study (the "stanford" study), and split this study into three
artificial studies that each contain 4 squamous carcinomas and 3
adenocarcinomas. The three artificial studies are then used to create
an instance of the ExpressionSetList
class.
See Garber et al. (2001) for the raw data and description of the
stanford
study.
The experiment data package lungExpression (www.bioconductor.org)
Parmigiani et al. (2004) A cross-study comparison of gene expression studies for the molecular classification of lung cancer, Clin Cancer Res, 10(9): 2922-2927
Garber et al. (2001) Diversity of gene expression in adenocarcinoma of the lung, PNAS, 98:13784-13789
data(expressionSetList)
data(expressionSetList)
Each element in the list must be a valid
ExpressionSet
. The featureNames
must be identical for
each ExpressionSet
.
Objects can be created by calls of the form new("ExpressionSetList", ...)
.
.Data
:Object of class "list"
Class "list"
, from data part.
Class "vector"
, by class "list", distance 2.
Class class.AssayData
, by class "list", distance 2.
signature(x = "ExpressionSetList")
Subsets each
ExpressionSet
element in the list.
signature(from = "list", to = "ExpressionSetList")
Coerces a list of ExpressionSet
objects to an object of class
ExpressionSetList
. The validityMethod
for the
ExpressionSetList
class will return an error if the
featureNames
for each ExpressionSet
are not identical.
signature(x="ExpressionSetList")
applies dim
to each
element of the list.
signature(object = "ExpressionSetList")
Accessor for the featureNames
signature(object = "ExpressionSetList")
See
geneCenter
signature(object="ExpresssionSetList")
Coerces
instance of ExpressionSetList to a list and does lapply on the list.
Returns an object of class ExpressionSetList
signature(x = "ExpressionSetList")
Numerical
vector giving the number of samples in each ExpressionSet
signature(x = "ExpressionSetList")
Numerical: number
of features or genes
signature(object = "ExpressionSetList")
returns a
list of data.frames
. The elements of the list correspond to
the studies in the ExpressionSetList
object.
signature(object="ExpressionSetList",
varLabel="character")
Accessor for the clinical variable. Assumes that the clinical variable
has the same name in each study.
signature(object = "ExpressionSetList")
See standardizeSamples
signature(object = "ExpressionSetList")
See studyCenter
signature(object = "ExpressionSetList")
See zeroNu
.
R. Scharpf
XdeMcmc-class
, XdeParameter-class
showClass("ExpressionSetList") data(expressionSetList)
showClass("ExpressionSetList") data(expressionSetList)
Methods for objects of class ExpressionSetList
.
phenotype(object, varLabel)
phenotype(object, varLabel)
object |
A |
varLabel |
|
phenotype
returns a matrix of the clinical variable where each
column is a study. We require that the clinical variable have the
same name in each study (each element of the ExpressionSetList
object) and that the clinical variable is binary with values 1 or 0.
Accessor method for the values of the first MCMC iteration
firstMcmc(object)
firstMcmc(object)
object |
An object of class |
Returns a list of the values to be used in the first iteration of the MCMC.
R. Scharpf
data(expressionSetList) params <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) str(firstMcmc(params))
data(expressionSetList) params <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) str(firstMcmc(params))
Mean centers the genes for each study in a list
geneCenter(object)
geneCenter(object)
object |
Object of class |
Object of class ExpressionSetList
R. Scharpf
studyCenter
, ExpressionSetList-class
data(expressionSetList) centered <- geneCenter(expressionSetList)
data(expressionSetList) centered <- geneCenter(expressionSetList)
Accessor and replacement methods for hyperparameters of the Bayesian model are provided
hyperparameters(object)
hyperparameters(object)
object |
An object of class |
See the XdeParameterClass vignette for a more detailed discussion.
The default values provided when initializing an object of class
XdeParameter
works well in most instances.
A numerical vector
R. Scharpf
R. Scharpf et al., A Bayesian Model for Cross-Study Differential Gene Expression, Technical Report 158, Johns Hopkins University, Department of Biostatistics, 2007
data(expressionSetList) xlist <- new("XdeParameter", esetList=expressionSetList, phenotypeLabel="adenoVsquamous") hyperparameters(xlist)
data(expressionSetList) xlist <- new("XdeParameter", esetList=expressionSetList, phenotypeLabel="adenoVsquamous") hyperparameters(xlist)
Number of MCMC iterations
iterations(object)
iterations(object)
object |
An object of class |
For an object of class XdeParameter
, iterations
specifies the total number of MCMC iterations. Note that by setting
the thin
parameter to a value greater than 1, the number of
MCMC iterations will be greater than the number of saved MCMC
iterations (saved iterations = iterations / thin).
For an object of class XdeMcmc
(a class that stores output from
the MCMC), iterations
specifies the number of iterations that
were saved.
The replacement method is only defined for the XdeParameter
class. The class XdeMcmc
is meant to reflect the information
in an already run chain, whereas XdeParameter
is a class for
parameterizing the Bayesian model that has not yet been fit.
An integer
R. Scharpf
XdeParameter-class
, XdeMcmc-class
MCMC values for the last iteration. Useful if more iterations are needed.
lastMcmc(object)
lastMcmc(object)
object |
Object of class |
An environment.
R. Scharpf
## Not run: data(expressionSetList) xparam <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) iterations(xparam) <- 10 fit <- xde(xparam, esetList=expressionSetList) ##Do more iterations and use a different seed firstMcmc(xparam) <- lastMcmc(fit) seed(xparam) <- 97814 fit2 <- xde(xparam, esetList=expressionSetList) ##Or fit2 <- xde(xparam, esetList=expressionSetList, outputMcmc=fit) ## End(Not run)
## Not run: data(expressionSetList) xparam <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) iterations(xparam) <- 10 fit <- xde(xparam, esetList=expressionSetList) ##Do more iterations and use a different seed firstMcmc(xparam) <- lastMcmc(fit) seed(xparam) <- 97814 fit2 <- xde(xparam, esetList=expressionSetList) ##Or fit2 <- xde(xparam, esetList=expressionSetList, outputMcmc=fit) ## End(Not run)
A numeric vector indicating which chains to write to file and, for those parameters that are written to file, how often the chains should be written to file.
output(object)
output(object)
object |
An object of class |
Replacement methods are only available for objects
of class XdeParameter
. Accessor methods are available for
objects of class XdeParameter
and XdeMcmc
.
A named numerical vector. The first element (thin) specifies how often to write chains to file. For instance, if output[1]=2 the chains will be written to file every other iteration. Elements 2 - 22 of the vector are indicators for whether to write the write the chains of the Bayesian parameters to file.
Parameters indexed by gene and study (Delta, Phi, Nu, and sigma2) grow very large quickly.
R. Scharpf
burnin
, XdeParameter-class
, XdeMcmc-class
data(xmcmc) output(xmcmc)
data(xmcmc) output(xmcmc)
A convenient wrapper for pairs that uses smoothScatter to plot the density of the points and displays the spearman correlation coefficient of the pairwise scatterplots.
Typically a matrix of effect size estimates obtained in each study. Rows are genes, columns are studies.
Typically a data.frame
of effect size
estimates obtained in each study. Rows are genes, columns are studies.
Container for XDE parameters
Objects can be created by calls of the form new("Parameters", ...)
.
seed
:Object of class "integer"
~~
data
:Object of class "numeric"
~~
phenodata
:Object of class "integer"
~~
G
:Object of class "integer"
~~
Q
:Object of class "integer"
~~
S
:Object of class "integer"
~~
alphaA
:Object of class "numeric"
~~
alphaB
:Object of class "numeric"
~~
betaA
:Object of class "numeric"
~~
betaB
:Object of class "numeric"
~~
pA0
:Object of class "numeric"
~~
pA1
:Object of class "numeric"
~~
pB0
:Object of class "numeric"
~~
pB1
:Object of class "numeric"
~~
nuR
:Object of class "numeric"
~~
nuRho
:Object of class "numeric"
~~
alphaXi
:Object of class "numeric"
~~
betaXi
:Object of class "numeric"
~~
c2Max
:Object of class "numeric"
~~
alphaEta
:Object of class "numeric"
~~
betaEta
:Object of class "numeric"
~~
pOmega0
:Object of class "numeric"
~~
lambdaOmega
:Object of class "numeric"
~~
lambdaKappa
:Object of class "numeric"
~~
gamma2
:Object of class "numeric"
~~
c2
:Object of class "numeric"
~~
tau2Rho
:Object of class "numeric"
~~
tau2R
:Object of class "numeric"
~~
a
:Object of class "numeric"
~~
b
:Object of class "numeric"
~~
l
:Object of class "numeric"
~~
t
:Object of class "numeric"
~~
lambda
:Object of class "numeric"
~~
theta
:Object of class "numeric"
~~
phi
:Object of class "numeric"
~~
sigma2
:Object of class "numeric"
~~
r
:Object of class "numeric"
~~
rho
:Object of class "numeric"
~~
nu
:Object of class "numeric"
~~
delta
:Object of class "numeric"
~~
Delta
:Object of class "numeric"
~~
xi
:Object of class "numeric"
~~
signature(x = "Parameters")
: ...
signature(x = "Parameters")
: ...
signature(x = "Parameters")
: ...
signature(x = "Parameters")
: ...
signature(from = "XdeParameter", to = "Parameters")
: ...
signature(object = "Parameters")
: ...
showClass("Parameters")
showClass("Parameters")
Accessor and replacement methods for objects of class XdeMcmc
for posterior averages of differential expression
posteriorAvg(object) posteriorAvg(object) <- value
posteriorAvg(object) posteriorAvg(object) <- value
object |
Object of class |
value |
A matrix of dimension G x 3, where G is the number of genes and 3 are different ways of quantifying differential expression in the context of multiple studies (concordant, discordant, or the union). |
A matrix of dimension G x 3, where G is the number of genes and 3 are different ways of quantifying differential expression in the context of multiple studies (concordant, discordant, or the union).
RS
Setting a seed is useful for reproducing MCMC chains
seed(object) seed(object) <- value
seed(object) seed(object) <- value
object |
An object of |
value |
Numeric or integer |
The seed stored in the slot of an object of class XdeParameter
and an object of class XdeMcmc
are useful in different ways.
For the XdeParameter
class, the seed indicates what seed was
used to initialize an MCMC chain. By contrast, an object of class
XdeMcmc
contains a seed that would be useful for running
additional iterations – the seed here is guaranteed to be different
from the seed that was used to initiate the MCMC.
An integer
R. Scharpf
Calculate single study estimates of effect size for lists of ExpressionSets
ssStatistic(statistic = c("t", "sam", "z")[1], phenotypeLabel, esetList, ...)
ssStatistic(statistic = c("t", "sam", "z")[1], phenotypeLabel, esetList, ...)
statistic |
Character string indicating Welch t-statistic (t), SAM (sam), or a z-statistic (z) |
phenotypeLabel |
Character string indicating the name of the binary covariate |
esetList |
An object of class |
... |
Not implemented. Potentially additional arguments to the above methods that are implemented in other packages |
This function is a wrapper that provides an estimate of effect size
for each study (element) in an ExpressionSetList
object.
For Welch t-statistic, this function is a wrapper for mt.teststat in the multtest package.
For SAM, this function is a wrapper for the sam function in the siggenes package.
The "z" statistic is a standardized unbiased estimate of effect size (Hedges and Olkin, 1985) – implementation is in the zScores function in the R package GeneMeta.
See the complete references below.
A matrix: rows are genes and columns are studies
R. Scharpf
J.K. Choi, U. Yu, S. Kim, and O.J. Yoo (2003), Combining multiple microarray studies and modeling interstudy variation, Bioinformatics, 19(1) I84-I90.
Y. Ge, S. Dudoit & T. P. Speed (2003), Resampling-based multiple testing for microarray data hypothesis Test 12(1) : 1-44 (with discussions on 44-77).
L. Lusa R. Gentleman, and M. Ruschhaupt, GeneMeta: MetaAnalysis for High Throughput Experiments
L.V. Hedges and I. Olkin, Statistical Methods for Meta-analysis (1985), Academic Press
Tusher, Tibshirani and Chu (2001), Significance analysis of microarrays applied to the ionizing radiation response, PNAS 2001 98: 5116-5121, (Apr 24).
data(expressionSetList) if(require(siggenes)){ sam <- ssStatistic("sam", esetList=expressionSetList, phenotypeLabel="adenoVsquamous") }
data(expressionSetList) if(require(siggenes)){ sam <- ssStatistic("sam", esetList=expressionSetList, phenotypeLabel="adenoVsquamous") }
For each study (element) in an ExpressionSetList
object, this
function centers the genes to have mean zero (rows) and scales the
variance of the samples to 1.
standardizeSamples(object, ...)
standardizeSamples(object, ...)
object |
Object of class |
... |
Additional arguments not implemented |
An object of class ExpressionSetList
Requires genefilter package
R. Scharpf
Centers each study in a list so that the average expression value of each stuy is zero
studyCenter(object)
studyCenter(object)
object |
An object of class |
An object of class ExpressionSetList
R. Scharpf
geneCenter
, ExpressionSetList-class
data(expressionSetList) centered <- studyCenter(expressionSetList) lapply(centered, function(object) round(mean(exprs(object)), 4))
data(expressionSetList) centered <- studyCenter(expressionSetList) lapply(centered, function(object) round(mean(exprs(object)), 4))
This function can be used to order genes in a matrix by the rank of a statistic and provide different plotting symbols and colors for genes that exceed a certain threshold of the ranking statistic.
symbolsInteresting(rankingStatistic, percentile = 0.9, colors = c("grey50", "royalblue"), symbols = c(".", "o"), size = c(3, 1), background = c("white", "grey70"))
symbolsInteresting(rankingStatistic, percentile = 0.9, colors = c("grey50", "royalblue"), symbols = c(".", "o"), size = c(3, 1), background = c("white", "grey70"))
rankingStatistic |
Any numerical vector |
percentile |
A percentile of the rankingStatistic – above which a gene would be classified as 'interesting' |
colors |
character string of length 2: a color for genes not exceeding the percentile and a color for genes exceeding the thresold |
symbols |
two plotting symbols (numeric or character): symbol for genes not exceeding percentile and symbol for genes exceeding percentile |
size |
numeric vector of length 2: size of plotting symbol for genes not exceeding percentile and size of plotting symbol for genes exceeding percentile |
background |
character vector of length 2: background color of plotting symbols for gene not exceeding percentile and for genes exceeding the percentile |
order |
the order of the rankingStatistic |
pch |
plotting symbols (same length as rankingStatistic) |
col |
color of plotting symbols (same length as rankingStatistic) |
bg |
background color of plotting symbols (same length as rankingStatistic) |
cex |
size of plotting symbols (same length as rankingStatistic) |
R. Scharpf
data(expressionSetList) data(xmcmc) pathToLogFiles <- system.file("logFiles", package="XDE") load(file.path(pathToLogFiles, "BES.rda")) load(file.path(pathToLogFiles, "postAvg.rda")) op.conc <- symbolsInteresting(rankingStatistic=postAvg[, "concordant"]) graphics:::pairs(BES[op.conc$order, ], pch=op.conc$pch, col=op.conc$col, bg=op.conc$bg, upper.panel=NULL, cex=op.conc$cex)
data(expressionSetList) data(xmcmc) pathToLogFiles <- system.file("logFiles", package="XDE") load(file.path(pathToLogFiles, "BES.rda")) load(file.path(pathToLogFiles, "postAvg.rda")) op.conc <- symbolsInteresting(rankingStatistic=postAvg[, "concordant"]) graphics:::pairs(BES[op.conc$order, ], pch=op.conc$pch, col=op.conc$col, bg=op.conc$bg, upper.panel=NULL, cex=op.conc$cex)
A value greater than one means that not every MCMC iteration is written to file.
thin(x, ...)
thin(x, ...)
x |
An object of class |
... |
not implemented |
thin
is an accessor for the first element in the vector
returned by the method output
.
The replacement method replaces the first element in the output
vector.
An integer.
R. Scharpf
Accessor and replacement methods for tuning the Metropolis-Hastings proposal parameters.
tuning(object)
tuning(object)
object |
Object of class |
See the XdeParameterClass vignette
A numerical vector
R. Scharpf
Accessor and replacement methods for the class XdeParameter
are
available. Specifying an update of integer N for a
Metropolis-Hastings parameter means that N values are proposed for
that parameter for each MCMC iteration.
updates(object)
updates(object)
object |
An object of class |
See the XdeParameterClass vignette
A numerical vector
R. Scharpf
Fits the Bayesian hierarchical model for cross-study differential gene expression.
xde(paramsMcmc, esetList, outputMcmc, batchSize=NULL, NCONC=2, center=TRUE, ...)
xde(paramsMcmc, esetList, outputMcmc, batchSize=NULL, NCONC=2, center=TRUE, ...)
paramsMcmc |
Object of class |
esetList |
Object of class |
outputMcmc |
Object of class |
batchSize |
Integer or NULL. The number of iterations written to log files before summarizing the chain and then removing. Experimental. |
NCONC |
The number of studies for which a gene must be differentially expressed in the same direction to be considered as concordantly differentially expressed. |
center |
Logical. If TRUE, each study is centered to have mean zero. |
... |
Additional arguments passed to |
Details for fitting the Bayesian model are discussed elsewhere (see citation below and XdeParameterClass vignette)
If an integer is specified for the batchSize, summary statistics for the log-files are calculated for every batchSize iterations. The log files are then removed and the next iteration will start a new log file. This allows one to do many iterations without creating enormous log files. This is only reasonable to do if one has already assessed convergence.
Object of class XdeMcmc
See the vignettes for XdeParameterClass and XDE.
R. Scharpf
R. Scharpf et al., A Bayesian Model for Cross-Study Differential Gene Expression, JASA 2009, p1295–1310.
XdeMcmc-class
, XdeParameter-class
, ExpressionSetList-class
## Not run: data(expressionSetList) xparam <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) iterations(xparam) <- 10 fit <- xde(xparam, esetList=expressionSetList) ## End(Not run)
## Not run: data(expressionSetList) xparam <- new("XdeParameter", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) iterations(xparam) <- 10 fit <- xde(xparam, esetList=expressionSetList) ## End(Not run)
Stores output, including the last iteration of the MCMC.
Objects can be created by calls of the form new("XdeMcmc",
studyNames, featureNames, iterations, seed, output, directory,
lastMcmc, posteriorAvg, bayesianEffectSize)
.
studyNames
:Object of class "character"
featureNames
:Object of class "character"
iterations
:Object of class "numeric"
directory
:Object of class "character"
seed
:Object of class "integer"
output
:Object of class "numeric"
lastMcmc
:Object of class "environment"
posteriorAvg
:Object of class "NULLorMatrix"
bayesianEffectSize
:Object of class "NULLorMatrix"
$
signature(x = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc",
value = "matrix")
signature(object = "XdeMcmc")
:
See calculatePosteriorAvg
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(.Object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(x = "XdeMcmc")
signature(object = "XdeMcmc")
signature(x = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
signature(object = "XdeMcmc")
R. Scharpf
The class for storing the data: ExpressionSetList-class
and the class that contains default options for fitting the Bayesian
model: XdeParameter-class
##See XDE vignette: ## Not run: openVignette(package="XDE") ## End(Not run)
##See XDE vignette: ## Not run: openVignette(package="XDE") ## End(Not run)
This class contains initial values for the first iteration of the MCMC, options for saving MCMC chains, options for changing the tuning parameters of the Metropolis-Hastings algorithm, options for changing hyperparameters from their defaults, etc.
Objects can be created by calls of the form new("XdeParameter",
esetList, updates, tuning, hyperparameters, output, iterations,
burnin, seed, randomSeed, genes, studies, firstMcmc,
specifiedInitialValues, directory, phenotypeLabel, seed, showIterations,
verbose, studyNames, one.delta)
.
updates
:Object of class numeric
. The frequency
of updates for each iteration of the chain.
tuning
:Object of class numeric
. Tuning
parameters for the Metropolis-Hastings proposals
hyperparameters
:Object of class
numeric
. Hyperparameters for the Bayesian hierarchical model
output
:Object of class numeric
. Indicator for
whether to save the MCMC chain to file. If the value is zero, the
chain is not saved.
iterations
:Object of class numeric
. The total
number of MCMC iterations.
burnin
:Object of class logical
. If set to
FALSE, by default none of the chains will be saved (called for its
side-effect of setting the output to zero for each parameter).
notes
:Object of class character
.
firstMcmc
:Object of class environment
. Values
for the first iteration of the MCMC
seed
:Object of class integer
. Seed used for
simulating random numbers.
showIterations
:Object of class logical
.
Whether to show the MCMC iteration when fitting the model
specifiedInitialValues
:Object of class
logical
. If TRUE (the default), the values stored in
firstMcmc
will be used for the first iteration of the MCMC.
directory
:Object of class character
. Specifies
where to write the log files
phenotypeLabel
:Object of class character
. The
name of the binary covariate used for differential expression
verbose
:Object of class logical
studyNames
:Object of class character
. Names of
the datasets
one.delta
:Logical. If TRUE, a gene is assumed to be differentially in all studies or none of the studies.
signature(object = "XdeParameter")
logical.
See burnin
signature(object = "XdeParameter", value =
"logical")
logical. See burnin
signature(object = "XdeParameter")
character
string giving the path or relative path to store log files from the
MCMC chain
signature(object = "XdeParameter")
Path to
store log files.
signature(object = "XdeParameter")
See firstMcmc
signature(object = "XdeParameter", value = "environment")
signature(object = "XdeParameter", value = "list")
signature(object = "XdeParameter")
See
the XdeParameterClass vignette
signature(object = "XdeParameter")
See
the XdeParameterClass vignette
signature(.Object = "XdeParameter")
Method
for initializing an instance of the class. The default values
provided work well in most cases.
signature(object = "XdeParameter")
Accessor
for the total number of MCMC iterations to run
signature(object = "XdeParameter", value =
numeric)
The replacement method is useful for setting a
different number of iterations.
signature(object = "XdeParameter", value = "integer")
signature(object = "XdeParameter")
See also
output
. This method is also defined for class XdeMcmc
signature(object = "XdeParameter")
See also output
signature(object = "XdeParameter")
The name of a binary covariate present in each study
signature(object = "XdeParameter", value = "character")
signature(object = "XdeParameter")
The
number of MCMC iterations written to file. It is the value of the
total number of iterations divided by the thinning parameter. See
also output
signature(object = "XdeParameter")
See
seed
signature(object = "XdeParameter",
value="integer")
Replacement method. See also seed
.
signature(object = "XdeParameter")
Produces a
short summary of objects that are instances of the
XdeParameter
class
signature(object = "XdeParameter")
logical
signature(object = "XdeParameter")
signature(object = "XdeParameter")
Names of
the high-throughput gene expression studies
signature(object = "XdeParameter")
signature(x = "XdeParameter", value = numeric)
See thin
signature(object = "XdeParameter")
See also tuning
signature(object = "XdeParameter")
signature(object = "XdeParameter")
See also updates
signature(object = "XdeParameter")
R. Scharpf
R. Scharpf
showClass("XdeParameter") ##See the XdeParameterClass vignette
showClass("XdeParameter") ##See the XdeParameterClass vignette
An object of class XdeMcmc is created by fitting the Bayesian
hierarchical model to the expressionSetList
example data.
data(xmcmc)
data(xmcmc)
The xmcmc
data example was obtained as described in the
XDE vignette.
data(xmcmc) xmcmc ##ordinarily, one should not need to change the directory in an object ##of class XdeMcmc -- therefore, a replacment method is not defined pathToLogFiles <- system.file("logFiles", package="XDE") xmcmc@directory <- pathToLogFiles ##The $ operator can be used to extract chains. For instance, here we ##extract the c2 chain c2 <- xmcmc$c2 plot.ts(c2)
data(xmcmc) xmcmc ##ordinarily, one should not need to change the directory in an object ##of class XdeMcmc -- therefore, a replacment method is not defined pathToLogFiles <- system.file("logFiles", package="XDE") xmcmc@directory <- pathToLogFiles ##The $ operator can be used to extract chains. For instance, here we ##extract the c2 chain c2 <- xmcmc$c2 plot.ts(c2)
Alternative cross-study scores of differential expression
xsScores(statistic, N)
xsScores(statistic, N)
statistic |
a matrix of study-specific estimates of effect size. Rows are genes and columns are studies. |
N |
numerical vector: the number of samples in each study (the
length should be the number of columns in |
A matrix of cross-study scores for differential expression ("diffExpressed"), concordant differential expression, and discordant differential expression.
R. Scharpf
J.K. Choi, U. Yu, S. Kim, and O.J. Yoo (2003), Combining multiple microarray studies and modeling interstudy variation, Bioinformatics, 19(1) I84-I90.
E. Garrett-Mayer, G. Parmigiani, X. Zhong, L. Cope, and E. Gabrielson (2007), Cross-study validation and combined analysis of gene expression microarray data, Biostatistics, September
R. Scharpf et al., A Bayesian Model for Cross-Study Differential Gene Expression, Technical Report 158, Johns Hopkins University, Department of Biostatistics, 2007
the GeneMeta package, ssStatistic
data(expressionSetList) t <- ssStatistic(statistic="t", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) tScores <- xsScores(t, N=nSamples(expressionSetList))
data(expressionSetList) t <- ssStatistic(statistic="t", phenotypeLabel="adenoVsquamous", esetList=expressionSetList) tScores <- xsScores(t, N=nSamples(expressionSetList))
Nu is the average expression value in each study.
zeroNu(object, ...)
zeroNu(object, ...)
object |
object of class |
... |
Not implemented |
This function should be regarded as experimental.
The nu parameter models the average expression value in each study. Modeling nu allows one to estimate differential expression across studies that may differ in location and scale (as often occurs when multiple platforms are used). The price to pay for modeling nu are additional assumptions (the nu\'s are assumed Gaussian) and a more heavily parameterized model.
The method zeroNu allows one to fit the Bayesian model without estimating nu:
- each gene is centered at zero
- initial values for the first MCMC are chosen on the basis of empirical starting values
- the initial values for a and rho are set to zero.
- the nu, a, gamma2, and rho parameters are not updated during MCMC
object of class XdeParameter
R. Scharpf
R. Scharpf et al. (2007), A Bayesian Model for Cross-Study Differential Gene Expression, Technical Report 158, Johns Hopkins University, Department of Biostatistics