segment: Fast segmentation of CNV calls.

Description Usage Arguments Value Author(s) Examples

View source: R/segment.R

Description

Performs a fast segmentation algorithm based on the cyber t test and the t statistics. This is a special version for log-ratios or I/NI calls that are assumed to be centered around 0. For segmentation of data with different characteristics you can a) substract the mean/median/mode from your data or b) use the more general version of this algorithm in the R Bioconductor package "fastseg".

Usage

1
2
segment(x, alpha = 0.05, segMedianT = NULL, minSeg = 3, eps = 0,
  delta = 20, maxInt = 40, cyberWeight = 50)

Arguments

x

Values to be segmented.

alpha

Real value between 0 and 1 is interpreted as the percentage of total points that are considered as initial breakpoints. An integer greater than 1 is interpreted as number of initial breakpoints. Default = 0.05.

segMedianT

Vector of length 2. Thresholds on the segment's median. Segments' medians above the first element are considered as gains and below the second value as losses. If set to NULL the segmentation algorithm tries to determine the thresholds itself. If set to 0 the gain and loss segments are not merged. (Default = NULL).

minSeg

Minimum length of segments. Default = 3.

eps

Real value greater or equal zero. A breakpoint is only possible between to consecutive values of x that have a distance of at least "eps". Default = 0.

delta

Positive integer. A parameter to make the segmentation more efficient. If the statistics of a breakpoint lowers while extending the window, the algorithm extends the windows by "delta" more points until it stops. Default = 20.

maxInt

The maximum length of a segment left of the breakpoint and right of the breakpoint that is considered. Default = 40.

cyberWeight

The "nu" parameter of the cyber t-test. Default = 50.

Value

A data frame containing the segments.

Author(s)

Guenter Klambauer klambauer@bioinf.jku.at

Examples

1
2
3
x <- rnorm(n=500,sd=0.5)
x[150:200] <- rnorm(n=51,mean=3,sd=0.5)
segment(x)

Example output

Loading required package: parallel
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb

Attaching package: 'cn.mops'

The following object is masked from 'package:S4Vectors':

    params

  start end        mean     median
1     1 149 0.056005147 0.03998065
2   150 192 2.885116865 2.86332312
3   193 194 1.683538789 1.68353879
4   195 200 3.032837150 3.10987179
5   201 500 0.005601953 0.02123002

cn.mops documentation built on Nov. 8, 2020, 5:59 p.m.