Description Usage Arguments Details Value Author(s) Examples
View source: R/lociLikelihoods.R
An empirical Bayesian approach that takes a segmentation map and uses this to bootstrap posterior likelihoods on each region being a locus for each replicate group.
| 1 2 3 | 
| cD | A  | 
| aD | An  | 
| newCounts | Should new counts be evaluated for the segmentation map in ‘cD’ before calculating loci likelihoods? Defaults to FALSE | 
| bootStraps | What level of bootstrapping should be carried out on
the inference of posterior likelihoods? See the baySeq function
 | 
| inferNulls | Should null regions be inferred from the gaps between segments defined by the ‘cD’ object? | 
| nasZero | If FALSE, any locus with a posterior likelihood ‘NA’ in the existing segmentation map is treated as a null region for the first bootstrap; If TRUE, it is ignored for the first bootstrap. | 
| usePosteriors | If TRUE, the function uses the existing likelihoods to weight the prior estimation of parameters. Defaults to TRUE. | 
| tail | The cutoff for the tail of the distribution to be used in
pre-calculating data for methylation analysis. See
 | 
| subset | A subset of the data on which to calculate the likelihoods. | 
| cl | A SNOW cluster object, or NULL. See Details. | 
A 'cluster' object (package: snow) may be used for
parallelisation of this function when examining large data sets.
Passing NULL to this variable will cause the function to run in non-parallel mode.
A lociData object.
Thomas J. Hardcastle
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Define the files containing sample information.
datadir <- system.file("extdata", package = "segmentSeq")
libfiles <- c("SL9.txt", "SL10.txt", "SL26.txt", "SL32.txt")
# Establish the library names and replicate structure.
libnames <- c("SL9", "SL10", "SL26", "SL32")
replicates <- c(1,1,2,2)
# Process the files to produce an `alignmentData' object.
alignData <- readGeneric(file = libfiles, dir = datadir, replicates =
replicates, libnames = libnames, gap = 100)
# Process the alignmentData object to produce a `segData' object.
sD <- processAD(alignData, gap = 100, cl = NULL)
# Use the segData object to produce a segmentation of the genome, but
# without evaluating posterior likelihoods.
segD <- heuristicSeg(sD = sD, aD = alignData,
    subRegion = data.frame(chr= ">Chr1", start = 1, end = 1e5),
    getLikes = FALSE, cl = NULL) 
# Use the lociData function to evaluate the posterior likelihoods directly.
lociData <- lociLikelihoods(segD, aD = alignData, bootStraps = 5,
inferNulls = TRUE, cl = NULL)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.