changeMaxPostCutoff {chromstaR} | R Documentation

## Adjust sensitivity of peak detection

### 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

    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

- `changeFDR`: This function was renamed to 'changeMaxPostCutoff' in chromstaR 1.5.1 but it still available for backwards compatibility.

### Author(s)

Aaron Taudt

### See Also

`changePostCutoff`

### Examples

    ## 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)

[Package chromstaR version 1.10.0 Index]