findChimeras: Find chimeric reads

Description Usage Arguments Value Author(s) See Also Examples

View source: R/findChimeras.R

Description

Find chimeric reads, assuming that the GAlignments object does not contain multimapping reads. That is, read names that appear more than ones in the file are considered chimeras. Chimeric reads are reads that cannot be mapped as a single, linear alignment. Reads from structual rearrangements such as inversions can be mapped as chimeras. Note that the indices of all chimeric reads are returned, these are not separated into individual chimeric sets.

Usage

1
findChimeras(bam, by.flag = FALSE)

Arguments

bam

A GAlignments object, must include names

by.flag

Can the chimeras be detected just using the supplementary alignment flag? (Default: FALSE). If TRUE, detects supplementary alignments and returns reads with the same name as a supplementary alignment (quicker). If FALSE, all alignments with duplicated names are returned.

Value

A vector of indices of chimeric sequences within the original bam

Author(s)

Helen Lindsay

See Also

plotChimeras for plotting chimeric alignment sets.

Examples

1
2
3
4
5
bam_fname <- system.file("extdata", "gol_F1_clutch_2_embryo_4_s.bam",
                         package = "CrispRVariants")
bam <- GenomicAlignments::readGAlignments(bam_fname, use.names = TRUE)
chimera_indices <- findChimeras(bam)
chimeras <- bam[chimera_indices]

CrispRVariants documentation built on Nov. 8, 2020, 11:09 p.m.