I have in overall 4 runs with 2 fastq files each for which I individually perform BWA Alignment and afterwards merge the BAM files using Picard MergeSamFiles. 1 Fastqfiles has ~205 million reads, therefore all 8 fastq files have in total 1.6 billion reads.
However, I solved the mystery (took me two days...). Deep in my scripts there was an "awkfilter" activated after the bwa sampe step for bwa aln algorithm which I was not aware of.
awk '( $1 ~ /^@/) || (and ( $2 , 0x0004 ) && ! and ( $2 , 0x0008 )) || (! and ( $2 , 0x0004 ))'
I think It extracts only mapped reads and unmapped reads next to them and discards the rest (which is not needed for my purpose). Since I do not need a sampe step for BWA mem, the awkfilter was not active there, explaining the huge differences.
Thanks for your help!
Hello kaiho ,
Thank you for asking a question on the forum. As you're a new user, we'd like to know how the forum looks to you and to understand that, I'd like some feedback on a couple of things from you:
Hello Ram,
1.) I add a bookmark to it since I initially thought then to get a mail-notification if someones answers, but this does not seem to be true?
2.) No, I do not requested an upvote from one of my colleagues.
Thank you for the response, kaiho. Yes, you do not need a bookmark - all posts created by you will automatically be subjected to an email-follow, which means that unless you change the setting, you'll automatically get emails for any comment/answer activity in your post. You can switch to local messages in which case you will not get emails but you will continue to see messages in your inbox ( https://www.biostars.org/local/messages/ )
You can read more about this in the http://biostars.org/t/how-to posts, specifically: A: How to Use Biostars, Part II: Post types, Deleting, Linking and Bookmarking
Hello Ram,
that upvote was me, for a well formulated, well formated and interesting question.
fin swimmer
Thank you, fin. You were mighty quick there, upvoting the question minutes after it was created! Thanks for letting us know the flag was a false positive :-)
Did you align the exact same sequences, so identical fastq files? Even if one of the algorithms does align a lot more reads than the other, the total number of sequences in the final file should be the same.
The fastq input files are identical as well as the reference genome. BWA aln outputs less sequences and I do not understand whats going on.