Question: Analysis of sequencing duplicates
0
gravatar for DVA
9 months ago by
DVA480
United States
DVA480 wrote:

I wonder if there is an existing software studies duplicates from NGS bam file. I understand that Picard and samtools can both mark/remove duplicates, but what if I want to count the frequency of each duplicated fragment?

I could do some string comparison in Python and categorize the duplicates (or its aligned location) into dictionaries, but I am not sure this is optimal. Thank you in advance for reading.

duplicate • 527 views
ADD COMMENTlink modified 9 months ago by genomax55k • written 9 months ago by DVA480
1

Maybe dupRadar?

ADD REPLYlink written 9 months ago by h.mon19k

but what if I want to count the frequency of reach duplicated region or fragment?

just use samtools view -f 1024 -c in.bam "chr1:234-567" ?

ADD REPLYlink written 9 months ago by Pierre Lindenbaum112k

Sorry I guess I was not very clear in the post. I want to count the frequency of the duplicated reads, not regions - I do not know what regions to look at yet, unless I scan through the bam file first. Thank you so much for the reply.

ADD REPLYlink written 9 months ago by DVA480

so what about sorting the reads by names and counting the number of duplicate for the same name ? (I think this data is provided by picard)

ADD REPLYlink modified 9 months ago • written 9 months ago by Pierre Lindenbaum112k

Thank you very much for the reply. I'm not sure what do you mean by "name" - I thought every read has a unique name at the very start (starting with @)?

ADD REPLYlink written 9 months ago by DVA480

ah yes, sorry, I was wrong.

ADD REPLYlink written 9 months ago by Pierre Lindenbaum112k
1
gravatar for genomax
9 months ago by
genomax55k
United States
genomax55k wrote:

You can use clumpify for this if you have original read data available (or you could convert the bam back to fastq using reformat.sh from BBMap suite). Use the option addcount to get information about counts added to fastq headers.

ADD COMMENTlink modified 9 months ago • written 9 months ago by genomax55k

Thank you for the reply. I'm trying to read more about "addcount" in clumpify, but could not find it - if you are one of the authors, do you know if this command looks for perfect match among the reads, or does it allow small portion of mismatches please?

ADD REPLYlink written 9 months ago by DVA480

By default clumpify allows two errors/substitutions in the reads when doing "clumping". You can use dupesubs=0 to allow only perfect matches. addcount appends a copies=N message to the fastq header. BTW: I am a user of BBMap suite, not author. That would be @Brian Bushnell. If you just run clumpify.sh on command line you will see the extensive in-line help.

ADD REPLYlink modified 9 months ago • written 9 months ago by genomax55k
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: 704 users visited in the last hour