filterSegments: Filter segments by minimal size

Description Usage Arguments Value Author(s) Examples

View source: R/findSCEs.R

Description

filterSegments filters out segments below a specified minimal segment size. This can be useful to get rid of boundary effects from the Hidden Markov approach.

Usage

1
filterSegments(segments, min.seg.width)

Arguments

segments

A GRanges-class object.

min.seg.width

The minimum segment width in base-pairs.

Value

The input model with adjusted segments.

Author(s)

Aaron Taudt

Examples

1
2
3
4
5
6
7
8
## Load an HMM
file <- list.files(system.file("extdata", "primary-lung", "hmms",
                  package="AneuFinderData"), full.names=TRUE)
hmm <- loadFromFiles(file)[[1]]
## Check number of segments before and after filtering
length(hmm$segments)
hmm$segments <- filterSegments(hmm$segments, min.seg.width=2*width(hmm$bins)[1])
length(hmm$segments)

AneuFinder documentation built on Nov. 8, 2020, 7:44 p.m.