I have paired end whole genome NGS data. I'm trying to extract reads and their mates.
ID_A is the ID of a mate pair aligning to chr12. If I use:
samtools view whole_genome.bam | grep ID_A
it returns both reads. However if I use:
samtools view whole_genome.bam chr12 | grep ID_A
it only returns the read which is not marked as a PCR duplicate. Is there a flag which will return PCR duplicates when viewing a region.
Thanks in advance for your help!