changePostCutoff {chromstaR} | R Documentation |
Adjusts the peak calls of a uniHMM
, multiHMM
or combinedMultiHMM
object with the given posterior cutoff.
changePostCutoff(model, post.cutoff = 0.5)
model |
|
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
## 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)