Question: Does A Bwa Bam File Contain Entries For All Unaligned Paired-End Reads?
2
gravatar for Rm
8.0 years ago by
Rm7.9k
Danville, PA
Rm7.9k wrote:

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?

read fastq bam counts bwa • 3.1k views
ADD COMMENTlink modified 8.0 years ago by Istvan Albert ♦♦ 81k • written 8.0 years ago by Rm7.9k
2
gravatar for Istvan Albert
8.0 years ago by
Istvan Albert ♦♦ 81k
University Park, USA
Istvan Albert ♦♦ 81k wrote:

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 COMMENTlink written 8.0 years ago by Istvan Albert ♦♦ 81k

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 REPLYlink written 8.0 years ago by Rm7.9k

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 REPLYlink written 8.0 years ago by Rm7.9k

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

ADD REPLYlink modified 21 months ago by h.mon27k • written 8.0 years ago by Istvan Albert ♦♦ 81k

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

ADD REPLYlink written 8.0 years ago by Rm7.9k

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

ADD REPLYlink written 8.0 years ago by Rm7.9k

http://www.novocraft.com/wiki/tiki-index.php?page=Extracting+unmapped+reads+from+a+BAM+file+produced+by+novoalign

ADD REPLYlink modified 21 months ago by h.mon27k • written 7.9 years ago by Rm7.9k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1141 users visited in the last hour