changeMaxPostCutoff: Adjust sensitivity of peak detection

Description Usage Arguments Details Value Functions Author(s) See Also Examples

View source: R/changePostCutoff.R

Description

Adjusts the peak calls of a uniHMM, multiHMM or combinedMultiHMM object with a cutoff on the maximum-posterior within each peak. Higher values of maxPost.cutoff mean less sensitive and more precise peak calls. Remaining peaks are kept intact, as opposed to function changePostCutoff, where broad peaks are fragmented. This function was formerly called 'changeFDR' and is still available for backwards compatibiltiy.

Usage

1
2
3
changeMaxPostCutoff(model, maxPost.cutoff = 0.99, invert = FALSE)

changeFDR(model, fdr = 0.01, invert = FALSE)

Arguments

model

A uniHMM or multiHMM object with posteriors.

maxPost.cutoff

A vector of values between 0 and 1 for each column in model$bins$posteriors. If only one value is given, it will be reused for all columns. Values close to 1 will yield more stringent peak calls with lower false positive but higher false negative rate (i.e. more precise but less sensitive).

invert

Select peaks below (FALSE) or above (TRUE) the given maxPost.cutoff. This is useful to select low confidence peaks.

fdr

Same as 1-maxPost.cutoff.

Details

Each peak has a maximum-posterior (maxPostInPeak, between 0 and 1) associated. The sensitivity is adjusted with a simple cutoff on maxPostInPeak, e.g. for maxPost.cutoff = 0.99 only peaks with maxPostInPeak >= 0.99 will be selected.

Value

The input object is returned with adjusted peak calls.

Functions

Author(s)

Aaron Taudt

See Also

changePostCutoff

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Get an example uniHMM ##
file <- system.file("data","H3K27me3-BN-rep1.RData", package="chromstaR")
model <- get(load(file))
## Compare fits with different fdrs
plotHistogram(model) + ylim(0,0.25) + ylim(0,0.3)
plotHistogram(changeMaxPostCutoff(model, maxPost.cutoff=0.99)) + ylim(0,0.3)
plotHistogram(changeMaxPostCutoff(model, maxPost.cutoff=1-1e-12)) + ylim(0,0.3)

## Get an example multiHMM ##
file <- system.file("data","multivariate_mode-combinatorial_condition-SHR.RData",
                    package="chromstaR")
model <- get(load(file))
genomicFrequencies(model)
model.new <- changeMaxPostCutoff(model, maxPost.cutoff=0.9999, invert=FALSE)
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 <- changeMaxPostCutoff(model, maxPost.cutoff=0.9999, invert=FALSE)
genomicFrequencies(model.new)

chromstaR documentation built on Nov. 8, 2020, 8:29 p.m.