Entering edit mode
8.0 years ago
Picasa
▴
650
Hi,
I am looking to bwa mem
to map my reads.
However, I would like to keep only the real Forward-reverse paired end and to discard any weird sens (FF, RR, RF).
Is there any option in bwa to do this ?
Thanks
maybe align them first then extract them using
samtools view -hf 0x2 alignments.bam
Filtering by flag is a good idea. In case you need the flag concept explained, check the SAM format specifications and also this website, which can decode a flag:
Bitwise Flag explained
You could also pipe bwa directly into samtools view, avoiding intermediate files.