Entering edit mode
13.0 years ago
Linda
▴
160
I have a bam file with all reads. I would like to filter out reads where both the read and its mate are unaligned. If either of them is aligned, I would like to keep both. Would
samtools view -F 12 file.bam
work?
Thanks,
I wonder of how the assumption of a mate's existence work - say if a read unmapped but the mate is missing - Is that considered as unmapped?
To be honest, I don't know. you could specify
-f 1
to take into account only paired reads. have a look here.mate missing? it might not be possible unless paired reads are unequal?