Question: samtools view region and include duplicate reads
0
gravatar for mgene
6 months ago by
mgene0
mgene0 wrote:

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!

duplicate reads view samtools • 177 views
ADD COMMENTlink written 6 months ago by mgene0

it only returns the read which is not marked as a PCR duplicate

hum .. grep cannot change the behavior of samtools in that context.

ADD REPLYlink modified 6 months ago • written 6 months ago by Pierre Lindenbaum131k

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!

ADD REPLYlink modified 6 months ago • written 6 months ago by mgene0

I still don't understand. Duplicates should be mapped at the same place.

ADD REPLYlink written 6 months ago by Pierre Lindenbaum131k

Please show the SAM entry of the respective read(s), this is more straight forward to interpret than textual descriptions.

ADD REPLYlink written 6 months ago by ATpoint41k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2004 users visited in the last hour