Hi, I am trying to extract reverse-reverse read pairs from a bam file (all reads are paired and mapped).
I used the following command:
samtools view --expr 'flag.paired && !flag.unmap && !flag.munmap && flag.reverse && flag.mreverse' Pooled_valid.bam -o Pooled_valid.RR.bam
However, I found that all the reads are extracted (the input and output have the exactly same number of reads). May I ask if there is a problem with my command? Thanks
Please create a Minimal, Reproducible Example to enable others to exactly reproduce your issue on their machines.