Entering edit mode
3.9 years ago
mgene
•
0
Hello all,
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!
hum ..
grep
cannot change the behavior ofsamtools
in that context.Hmm yes, the question is more how to change the output of samtools view when a region is added.
When using samtools view with a region given, reads marked as duplicates do not show but their mate does. I want to view these duplicate reads when a region is given.
Appreciate your time!
I still don't understand. Duplicates should be mapped at the same place.
Please show the SAM entry of the respective read(s), this is more straight forward to interpret than textual descriptions.