combineSeg: Combine two chromosomal segments into one

Description Usage Arguments Details Value Examples

View source: R/comebineSeg.R

Description

Combine two chromosomal segments into one

Usage

1
combineSeg(seq.dat, max.brk.len = 3e+06, ap.calc = FALSE)

Arguments

seq.dat

a data.frame containing the sequencing data

max.brk.len

only combine segments where the distance between the two is less than max.brk.len (in mbp)

ap.calc

set to true if calculating aneuploidy, which uses different criteria than HRD

Details

For HRD: if CNt, A, and B are equal in two adjacent segments, and break length < max.brk.len, combine the two segments into one. For aneuploidy; if aneuploidy status is equal in two adjacent segments, combine into one.

Value

a truncated data frame with the combined segments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## There are 4 segments on chromosome 14
seq.dat <- sub01.segments[ sub01.segments$chromosome == "chr14",]
seq.dat

## The gap between segments 3 and 4 is very small; copynumber, A, and B are identical in both segments
## this is a false split. It will be combined into one segment. 
seq.dat <- combineSeg(seq.dat)
seq.dat

## the data now has 3 segments.

maxwell-lab/HRDex documentation built on May 3, 2020, 9:01 p.m.