Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/utilityFunctions.R
This function offers a variety of methods for the analysis of methylation data to determine a suitable threshold for the proportion of methylation at which to distinguish a methylation locus from a non-methylated locus.
1 2 3 |
method |
Character string defining method to use for threshold estimation. Available options are 'varsum', 'minden', 'beta' and 'abc'. See Details. |
aM |
An |
subset |
Numeric vector defining a subset on |
minprop |
For 'minden' method, a minimum proportion permitted for choice of threshold. |
bootstrap |
The maximum number of bootstraps to be permitted in estimating a threshold. Defaults to 100. See Details. |
abstol |
Minimum tolerance fro threshold estimation. |
verbose |
Verbose reporting. Defaults to FALSE. |
cl |
A cluster object, or NULL. Defaults to NULL. |
processAD.args |
Arguments to be passed to processAD function if bootstrapping. |
heuristicSeg.args |
Arguments to be passed to heuristicSeg function if bootstrapping. |
This function operates on the data observed within each replicate group, and then takes the mean of the thresholds calculated for each group.
Methods currently available for threshold estimation are 'varsum', 'minden', 'beta' and 'abc'. The 'varsum' method attempts to split the vector of proportions of methylation observed at each cytosine into two sets of minimal total variance. The 'minden' method finds the minimum point on a smoothed kernel density of the proportions of methylation. The 'beta' method estimates for each cytosine a posterior distribution on proportions of methylation based on the beta-binomial conjugacy, takes the average of these distributions and finds the minumum. The 'abc' method performs like the beta method, but estimates the posterior distribution through approximate Bayesian computation.
Bootstrapping uses the estimated threshold to define loci. Based on the defined loci, cytosines are then only included in a re-estimation of the thresholds if they are identified as belonging to an expressed locus within the current replicate group, or if they are not expressed in any replicate group. Thresholds are re-esimated until the maximum number of bootstraps is reached or the difference between estimated thresholds drops below 'abstol', whichever is the sooner.
A numeric value defining a threshold on methylation.
Thomas J. Hardcastle
1 2 3 4 5 6 7 8 9 10 11 | datadir <- system.file("extdata", package = "segmentSeq")
files <- c("short_18B_C24_C24_trim.fastq_CG_methCalls.gz",
"short_Sample_17A_trimmed.fastq_CG_methCalls.gz",
"short_13_C24_col_trim.fastq_CG_methCalls.gz",
"short_Sample_28_trimmed.fastq_CG_methCalls.gz")
mD <- readMeths(files = files, dir = datadir,
libnames = c("A1", "A2", "B1", "B2"), replicates = c("A","A","B","B"),
nonconversion = c(0.004777, 0.005903, 0.016514, 0.006134))
## Not run: thresholdFinder("beta", mD, cl = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.