Description Usage Arguments Details Value Author(s) Examples
Posterior mean and variance for the regional methylation level are derived for all genomic regions. Credible intervals can be computed either numerically from the posterior marginal distribution or by computing them on logit scale and transferring them back.
1 2 
x 
Object of class 
verbose 
Boolean indicating whether the methylEst function should run in a verbose mode (default 'FALSE'). 
controlCI 
list defining whether credible intervals should be derived.

The posterior mean and the variance are analytically available and therefore straightforward to efficiently compute; Waldbased credible intervals are obtained on logit scale and then backtransferred to ensure values withing 0 and 1. HPD and quantilebased credible intervals are computed by numerical integration of the posterior marginal distribution.
A BayMethList
object where the slot methEst
is filled with a
list containing the following elements:
mean 
Matrix where the number of columns equals the number of samples of interest. Each column contains the posterior mean methylation level for each bin. 
var 
Matrix where the number of columns equals the number of samples of interest. Each column contains posterior variance for each bin. 
ci 
List with length equal to the number of samples of interest. Each list element contains a matrix where the first column contains the lower CI bound and the second column the upper CI bound. 
W 
Matrix where the number of columns equals the number of samples of interest. Each column contains the normalisation factor of the posterior marginal distribution for each bin. 
al 
Matrix where the number of columns equals the number of samples of interest. Each column contains the prior shape parameter for each bin 
bl 
Matrix where the number of columns equals the number of samples of interest. Each column contains the prior scale parameter for each bin 
Andrea Riebler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  if(require(BSgenome.Hsapiens.UCSC.hg18)){
windows < genomeBlocks(Hsapiens, chrs="chr21", width=100, spacing=100)
cpgdens < cpgDensityCalc(windows, organism=Hsapiens,
w.function="linear", window=700)
co < matrix(rnbinom(length(windows), mu=10, size=2), ncol=1)
sI < matrix(rnbinom(2*length(windows), mu=5, size=2), ncol=2)
bm < BayMethList(windows=windows, control=co,
sampleInterest=sI, cpgDens=cpgdens)
bm < determineOffset(bm)
# should take about 3 minutes for both samples of interests with 2 CPUs.
bm < empBayes(bm)
bm < methylEst(bm, controlCI = list(compute = FALSE, method = "Wald",
level = 0.95, nmarg = 512, ncpu = NULL))
}

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.