Getting Bowtie2 or BWA to output more than one top alignment (not just a random one)
1
0
Entering edit mode
4.8 years ago
anm5579 • 0

I want to find multi-mapped reads in my data. In general, if a read maps to multiple positions with the same mapping score, I want the aligner to output all the alignments that fall into this category whether this is 2 or 20.

Looking into this, the Bowtie2 manual says that it picks a random top alignment to output. BWA seems to do the same. Bowtie2 has the -k option to specify how many alignments to produce but does not guarantee that these are the best alignments. In other words, if I do -k 3 it will just output the first 3 alignments it finds. It doesn't go through the allotted number of iterations to find the "best" ones like it does in default. On the other hand, there is the -a option which will output all of the alignments it finds within that allotment of iterations. If I choose this, the output file will be massive. Did I understand these descriptions correctly? If so, is my only option to use -a and have a massive output? Is this possible in BWA instead? I haven't been able to find a solution there either.

alignment • 1.0k views
ADD COMMENT
0
Entering edit mode
4.8 years ago
Asaf 10k

You can control it using bwa aln -> bwa sampe.

-n INT Maximum number of alignments to output in the XA tag for reads paired properly. If a read has more than INT hits, the XA tag will not be written. [3] -N INT Maximum number of alignments to output in the XA tag for disconcordant read pairs (excluding singletons). If a read has more than INT hits, the XA tag will not be written. [10]

ADD COMMENT

Login before adding your answer.

Traffic: 2918 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6