Biostar Beta. Not for public use.
Question: Analysis of sequencing duplicates
0
Entering edit mode

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.

ADD COMMENTlink 2.2 years ago DVA • 520 • updated 2.2 years ago genomax 68k
Entering edit mode
1

Maybe dupRadar?

ADD REPLYlink 2.2 years ago
h.mon
25k
Entering edit mode
0

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 2.2 years ago
Pierre Lindenbaum
120k
Entering edit mode
0

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 2.2 years ago
DVA
• 520
Entering edit mode
0

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 2.2 years ago
Pierre Lindenbaum
120k
Entering edit mode
0

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 2.2 years ago
DVA
• 520
Entering edit mode
0

ah yes, sorry, I was wrong.

ADD REPLYlink 2.2 years ago
Pierre Lindenbaum
120k
1
Entering edit mode

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 2.2 years ago genomax 68k
Entering edit mode
0

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 2.2 years ago
DVA
• 520
Entering edit mode
0

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 2.2 years ago
genomax
68k

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0