segmentBins | R Documentation |
Segmentation of the transformed counts is performed by the Circular
Binary Segmentation (CBS) algorithm implemented in the DNAcopy
package.
segmentBins(bins, param = SegmentParam(), ...)
bins |
a |
param |
a |
... |
additional arguments to |
A default set of segmentation parameters are provided in
SegmentParam()
and can be altered by creating a new SegmentParam
object if desired.
Some users may wish to control additional parameters to the CBS algorithm and
therefore segmentBins
is designed to take any argument from DNAcopy::segment
as input (see examples).
segment
for description of circular binary
segmentation and references therein; see
SegmentParam-class
for a description of the
default parameters settings passed to the segment
function. See
binNormalize
for obtaining normalized counts
for segmentation.
library(svfilters.hg19)
data(bins1kb)
library(GenomeInfoDb)
library(DNAcopy)
bins1kb <- keepSeqlevels(bins1kb, "chr22", pruning.mode = "coarse")
bins1kb$log_ratio <- c(rnorm(ceiling(length(bins1kb)/2), mean = 0, sd = 0.4),
rnorm(floor(length(bins1kb)/2), mean = -1, sd = 0.4))
segmentBins(bins1kb) # Using default segmentation parameters
segmentBins(bins1kb, param = SegmentParam(alpha = 0.01, undo.splits = "sdundo",
undo.SD = 5, verbose = 1))
segmentBins(bins1kb, param = SegmentParam(),
weights = abs(rnorm(length(bins1kb))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.