Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/changePostCutoff.R
Adjusts the peak calls of a uniHMM
, multiHMM
or combinedMultiHMM
object with the given posterior cutoff.
1 | changePostCutoff(model, post.cutoff = 0.5)
|
model |
A |
post.cutoff |
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 >= post.cutoff
.
The input object is returned with adjusted peak calls.
Aaron Taudt
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 31 32 33 | ## Get an example BAM file with ChIP-seq reads
file <- system.file("extdata", "euratrans",
"lv-H3K27me3-BN-male-bio2-tech1.bam",
package="chromstaRData")
## Bin the BED file into bin size 1000bp
data(rn4_chrominfo)
data(experiment_table)
binned <- binReads(file, experiment.table=experiment_table,
assembly=rn4_chrominfo, binsizes=1000,
stepsizes=500, chromosomes='chr12')
plotHistogram(binned)
## Fit HMM
model <- callPeaksUnivariate(binned, keep.posteriors=TRUE, verbosity=0)
## Compare fits with different post.cutoffs
plotHistogram(changePostCutoff(model, post.cutoff=0.01)) + ylim(0,0.25)
plotHistogram(model) + ylim(0,0.25)
plotHistogram(changePostCutoff(model, post.cutoff=0.99)) + ylim(0,0.25)
## Get an example multiHMM ##
file <- system.file("data","multivariate_mode-combinatorial_condition-SHR.RData",
package="chromstaR")
model <- get(load(file))
genomicFrequencies(model)
model.new <- changePostCutoff(model, post.cutoff=0.9999)
genomicFrequencies(model.new)
## Get an example combinedMultiHMM ##
file <- system.file("data","combined_mode-differential.RData",
package="chromstaR")
model <- get(load(file))
genomicFrequencies(model)
model.new <- changePostCutoff(model, post.cutoff=0.9999)
genomicFrequencies(model.new)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.