mergeBreakpoints: Identify and merge related breakpoints caused by the same...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Structural variation like transversions or inversion cause two breakpoints. In the context of fusion genes, these are called the pathogenic breakpoint and the reciproce breakpoint. The method detectBreakpoints processes each breakpoint individually and does explicitly not put reads from the pathogenic and reciproce breakpoint into the same cluster. Hence, it is usually sensible to call this methods afterward to search for related pairs of breakpoints to gain more confidence about the existence of a structural variation.

Usage

1
mergeBreakpoints(breakpoints, maxDist, mergeBPs)

Arguments

breakpoints

An object of class Breakpoints storing the breakpoints that will (potentially) be merged.

maxDist

The maximal distance in basepairs at which two breakpoints will be merged. Default value is 1000.

mergeBPs

An optional list of vectors of length two giving the breakpoints that should be merged. If this argument is given, the method will not search for related breakpoints.

Details

If the maxDist argument is given, the method compares each pair of breakpoints and checks, whether the two breakpoints may belong to the same structural variation. In addition to the spanned chromosomes, the orientation and the strand information of the reads spanning the breakpoints are also compared for this purpose. If chrosmosome, orientation and strand information of two breakpoints go well together, they will be merged, if the absolute distance of the breakpoints on chromosome A plus the absolute distance on chromosome B is smaller or equal to maxDist. If one breakpoint has more than one potential mate breakpoint for merging, it will be merged with the first candidate and a warning message is printed. The default value of maxDist is 1000.\

If the mergeBPs argument is given, the method will not search for related breakpoints but simply merge the given breakpoints. mergeBPs must be a list with vectors of length two that either contain the names of the indices of the breakpoints that should be merged.\

The arguments maxDist and mergeBPs cannot be given together. The given Breakpoints object must not contain breakpoints that have been merged before.

Value

An object of class Breakpoints storing merged and unmerged breakpoints.

Author(s)

Hans-Ulrich Klein

See Also

detectBreakpoints, Breakpoints-class, plotChimericReads

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load bam file and filter chimeric reads
library(Rsamtools)
bamFile = system.file("extdata", "SVDetection", "bam", "N01.bam", package="R453Plus1Toolbox")
bam = scanBam(bamFile)
data(captureArray)
linker = sequenceCaptureLinkers("gSel3")[[1]]
filterReads = filterChimericReads(bam, targetRegion=captureArray, linkerSeq=linker)

# detect breakpoints of size >= 3
breakpoints = detectBreakpoints(filterReads, minClusterSize=3)
table(breakpoints)
summary(breakpoints)

# merge breakpoints
breakpoints = mergeBreakpoints(breakpoints)
summary(breakpoints)

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