SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
tophat bug MeixiaZhao Bioinformatics 5 04-26-2012 01:14 PM
tophat 1.3.0 bug?? peromhc Bioinformatics 16 06-18-2011 03:12 AM
bwa bug (?) leading to samtools segfault fpepin Bioinformatics 4 05-03-2011 10:49 AM
bwa time report bug skblazer Bioinformatics 1 06-21-2010 03:42 AM
BWA 0.5.7 Gap Inferrence Bug - fix? bgulko Bioinformatics 6 06-15-2010 02:25 PM

Reply
 
Thread Tools
Old 10-10-2012, 07:33 PM   #1
SD2010Bioinfo
Junior Member
 
Location: china

Join Date: Sep 2012
Posts: 9
Default Is it a bug in BWA?

After finishing BWA alignment, the result displays a strange phenomenon. That is a read whose flag showed it is unmapped read however ending with specific aligned information(map quality, map length etc.).


Is it a bug in BWA? How can I figure it out without any error information when processing BWA? Anybody encountered the same case?
SD2010Bioinfo is offline   Reply With Quote
Old 10-10-2012, 09:36 PM   #2
alex_kur
Junior Member
 
Location: Novosibirsk, Russia

Join Date: Sep 2009
Posts: 8
Default

It's not a bug: http://bio-bwa.sourceforge.net/:

-I see a read stands out the end of a chromosome and is flagged as unmapped (flag 0x4). What is happening here?

-Internally BWA concatenates all reference sequences into one long sequence. A read may be mapped to the junction of two adjacent reference sequences. In this case, BWA will flag the read as unmapped, but you will see position, CIGAR and all the tags. A better solution would be to choose an alternative position or trim the alignment out of the end, but this is quite complicated in programming and is not implemented at the moment.


So, before using your alignment, you have to filter unmapped reads with samtools view with flag -F 4

Last edited by alex_kur; 10-10-2012 at 09:41 PM.
alex_kur is offline   Reply With Quote
Old 10-10-2012, 10:54 PM   #3
SD2010Bioinfo
Junior Member
 
Location: china

Join Date: Sep 2012
Posts: 9
Default

Quote:
Originally Posted by alex_kur View Post
It's not a bug: http://bio-bwa.sourceforge.net/:

-I see a read stands out the end of a chromosome and is flagged as unmapped (flag 0x4). What is happening here?

-Internally BWA concatenates all reference sequences into one long sequence. A read may be mapped to the junction of two adjacent reference sequences. In this case, BWA will flag the read as unmapped, but you will see position, CIGAR and all the tags. A better solution would be to choose an alternative position or trim the alignment out of the end, but this is quite complicated in programming and is not implemented at the moment.


So, before using your alignment, you have to filter unmapped reads with samtools view with flag -F 4
Thank you very much! I understand

If I do not filter these reads, will it disable the following process like picard markduplication?
SD2010Bioinfo is offline   Reply With Quote
Old 10-11-2012, 12:28 AM   #4
alex_kur
Junior Member
 
Location: Novosibirsk, Russia

Join Date: Sep 2009
Posts: 8
Default

I think picard filters reads by flags itself, but I'm not sure.
alex_kur is offline   Reply With Quote
Old 10-11-2012, 05:27 PM   #5
SD2010Bioinfo
Junior Member
 
Location: china

Join Date: Sep 2012
Posts: 9
Default

I have done a test about the question I mentioned, picard will print out error information and be disabled. Anyway it is better to do filter before processing BWA bam files.
SD2010Bioinfo is offline   Reply With Quote
Reply

Tags
bug, bwa

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO