Does A Bwa Bam File Contain Entries For All Unaligned Paired-End Reads?
1
2
Entering edit mode
13.2 years ago
Rm 8.3k

i have a basic question: I am using default parameter to run the bwa to align to a a reference geneome. I would like to know if bam represents all the reads used in the paired end fastq file? (including reads from pairs where one mate maps, and where no mates map). Why Iam asking this is, I need to rebuild the fastq using bam?

bam bwa read counts fastq • 5.0k views
ADD COMMENT
2
Entering edit mode
13.2 years ago

Yes the file contains all reads from your input file. You may use samtools to filter for reads that have proper pairs, only one end etc.

ADD COMMENT
0
Entering edit mode

thanks @Istvan Albert: I tried flag 8 for mate unmapped: and flag 4 for read unmapped; both these have lot of intersections....BTW how to fetch out using flags both reads unmapped.

ADD REPLY
0
Entering edit mode

thanks @Istvan Albert: I tried flag 8 for mate unmapped: and flag 4 for read unmapped; both these have lot of intersections....BTW how to fetch out using flags both reads unmapped (is it samtools view -f 12 ).

ADD REPLY
0
Entering edit mode

yes, here is a way to look at the flags: http://picard.sourceforge.net/explain-flags.html

ADD REPLY
0
Entering edit mode

I have used that link...still it doenot solve my problem...

ADD REPLY
0
Entering edit mode

samtools -u -f 4 input.bam | samtools view -f 8 - >both.unaligned.sam ;

ADD REPLY

Login before adding your answer.

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