Adjusts the peak calls of a
multiHMM object with the given posterior cutoff.
changePostCutoff(model, post.cutoff = 0.5)
A vector of posterior cutoff values between 0 and 1 the same length as
Posterior probabilities are between 0 and 1. Peaks are called if the posteriors for a state (univariate) or sample (multivariate) are >=
The input object is returned with adjusted peak calls.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
## Get an example BAM file file <- system.file("extdata", "euratrans", "lv-H3K27me3-BN-male-bio2-tech1.bam", package="chromstaRData") ## Bin the file into bin size 1000bp data(rn4_chrominfo) binned <- binReads(file, assembly=rn4_chrominfo, binsizes=1000, stepsizes=500, chromosomes='chr12') ## Fit the univariate Hidden Markov Model # !Keep posteriors to change the post.cutoff later! hmm <- callPeaksUnivariate(binned, max.time=60, eps=1, keep.posteriors=TRUE) ## Compare fits with different post.cutoffs plotHistogram(changePostCutoff(hmm, post.cutoff=0.01)) + ylim(0,0.25) plotHistogram(hmm) + ylim(0,0.25) plotHistogram(changePostCutoff(hmm, post.cutoff=0.99)) + ylim(0,0.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.