Bwa - Why Giving Only One Match Per Read ?
1
0
Entering edit mode
12.3 years ago
Arpssss ▴ 40

I am doing experiments with BWA and BowTie. Now, I am finding alignments using command:

./bwa aln -n 0 -k 41 database.fa SRR4493095_1.fastq > aln_sa.sai

and

./bwa samse database .fa aln_sa.sai SRR4493095_1.fastq > out_sa.sam

However, while BowTie gives 123 number of matches for 100 reads, BWA gives just 100 number of matches (one for each, does not reporting if match in another position found). Can anybody help me why is this happening and how to solve this ? I give -n 0 option because, I want to find matching allowing no mismatch.

Thanks in advance.

bwa genome • 4.7k views
ADD COMMENT
3
Entering edit mode
12.3 years ago

I've just answered your question on the bio-bwa-help mailing list... when you could have taken the time to search for your answer here: http://www.biostars.org/post/show/45430/how-to-force-bwa-samse-to-output-multiple-hits-in-sam-format

ADD COMMENT
0
Entering edit mode

Can you help me, I try to solve this issue by using command:

./bwa samse -n 1000 database.fa aln_sa.sai SRR4493095_1.fastq | xa2multi.pl  > out.sam

Though xa2multi.pl is located on the folder but it says xa2multi.pl : command not found

ADD REPLY
1
Entering edit mode

You need to make sure that you can execute your perl script properly. Specify the perl interpreter, or alternatively make sure the perl script is executable (chmod +x xa2multi.pl).

./bwa samse -n 1000 database.fa aln_sa.sai SRR4493095_1.fastq | perl xa2multi.pl  > out.sam
ADD REPLY
0
Entering edit mode

Thanks a lot. This works fine. Problem solved. Thanks to all of you.

ADD REPLY
0
Entering edit mode

search for the 256 bit flag in the SAM/BAM

ADD REPLY
0
Entering edit mode

How to do that ?

ADD REPLY
0
Entering edit mode

samtools view -f 0x0100 out_sa.sam

From the SAM specification, the 256 bit (0x0100 in hexadecimal) is set when the alignment is non primary, which happens when a read maps to two locations.

ADD REPLY

Login before adding your answer.

Traffic: 900 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