"filterChimericReads"(alnReads, targetRegion, linkerSeq, minDist, dupReadDist)
list
containing only filtered chimeric reads. The list
has the same structure like the given argument
alnReads
. Additionally, one element log with logging
information of each filtering step is added.3. If the linkerSeq argument is given, all chimeric reads that have the linker sequence between their local alignments are removed. When searching the linker sequence, 4 mismatches or indels are allowed and the linker sequence must not start or end within the first or last ten bases of the read. The function searches for the linkerSeq and for it's reverse complement.
4. Two local alignment of a read must have minDist reads between the alignments (if both alignment are on the same chromosome). Otherwise, the read seems to span a deletion and not a chromosomal aberration and is discarded.
5. Duplicated reads are removed. Two reads are duplicated, if the lie on the same strand and have the same 5 prime start position. Due to sequencing and alignment errors, the start position may vary for a maximum of dupReadDist bases. In case of duplicated reads, only the longest read is kept.
Reads passing all filtering steps are returned in the list
structure as given by the alnReads
argument (as derived from
the scanBam
method). A data frame with information about the
number of reads that passed each filter is added to the list.
detectBreakpoints
,
mergeBreakpoints
,
Breakpoints-class
,
scanBam
, sequenceCaptureLinkers
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)
Run the code above in your browser using DataLab