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?
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.
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 ).
yes, here is a way to look at the flags: http://picard.sourceforge.net/explain-flags.html
I have used that link...still it doenot solve my problem...
samtools -u -f 4 input.bam | samtools view -f 8 - >both.unaligned.sam ;
http://www.novocraft.com/wiki/tiki-index.php?page=Extracting+unmapped+reads+from+a+BAM+file+produced+by+novoalign