chimeric_reads: Identifies reads by index record that have been mapped to two...

Description Usage Arguments Details Value Examples

View source: R/chimeric_reads.R

Description

It checks for two different things: 1. If the SA tag exists. This tag only exists for SAM/BAM files produced by bwa-mem. 2. If the rname of two reads with the same qname is different. This generally indicates that the reads have been aligned to two different portions of the genome.

Usage

1
chimeric_reads(bamfile, checks = 3)

Arguments

bamfile

the path to the BAM file

checks

1 indicates checking only for SA tag, 2 only for rname, and 3 for both. Default is both.

Details

The indices returned will be those with any of the features above. The user also has the option to only check for 1 of the 2.

NOTE that the absence of either of the 2 features above does NOT mean that your alignment does not have chimeras, especially if you are using older versions of reference aligners. This is merely a heuristic diagnostic using convenient metrics to assess overall quality of your alignment.

Planned improvements: Also check for if the 0x800 flag exists, indicating a supplementary and thus chimeric alignment. This flag only exists in version 1.5 of the SAM and BAM formats and beyond.

Value

Indices of chimeric records. If there aren't

Examples

1
2
3
no_tags_no_rname <- system.file("extdata","ex1.bam",package="Rsamtools")
chimeric_reads(no_tags_no_rname,checks=1)
chimeric_reads(no_tags_no_rname)

compbiocore/qckitalign documentation built on May 21, 2019, 9:48 a.m.