Question: Bowtie2 reports no secondary alignments
0
gravatar for goodez
3 months ago by
goodez460
United States
goodez460 wrote:

This has been bugging me for awhile now. I know there are multiple mapping reads in my alignments, but bowtie2 does not assign the 256 flag for any of my reads. Bowtie2 says in the manual that is should be doing this:

Each reported read or pair alignment beyond the first has the SAM ‘secondary’ bit (which equals 256) set in its FLAGS field.

But when I check for any secondary alignments:

$ samtools view -f 256 my_file.bam | wc -l
0

There are apparently no secondary alignments.

How do I know there actually are multiple mapping reads? Well bowtie2 also uses the XS:i: field

XS:i:<n> Alignment score for the best-scoring alignment found other than the alignment reported. Can be negative. Can be greater than 0 in --local mode (but not in --end-to-end mode). Only present if the SAM record is for an aligned read and more than one alignment was found for the read. Note that, when the read is part of a concordantly-aligned pair, this score could be greater than AS:i.

So, since XS:i is only present if more than one alignment was found for the read, let's check that:

$ samtools view my_file.bam | grep "XS:i:" | wc -l
42821156

Am I missing something here? There are clearly multiple alignments for a LOT of my reads, so why is there not a single alignment with 256 flag set?

alignment bowtie2 • 182 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by goodez460
1
gravatar for goodez
3 months ago by
goodez460
United States
goodez460 wrote:

Oops... I know what is happening now. Bowtie2, by default, only reports the best alignment. This is why I have zero secondary alignments in my bam file, despite having many "multi-mappers".

This information was in the Reporting section of the bowtie2 manual. I think the manual could be more clear... But I admit it's my fault for missing this before. In case anyone cares, you can use the -k option to report a given number of secondary alignments, or the -a option to report all alignments.

ADD COMMENTlink written 3 months ago by goodez460
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 907 users visited in the last hour