Thanks, this seems reasonable.
Hi All,
I was wondering how important is to get rid of exact duplicate Illumina reads before --
- Before using it for correcting PacBio reads (planning to use ProovRead)
- Before using it to polish a Pac-Bio only assembly using Pilon (Assembly was done using uncorrected PacBio reads - miniasm)
- Before using the reads to do a hybrid de-novo-assembly using PBcR
Some of my Illumina libraries have significant amounts of reads duplicated >10 times. What are your recommendations to handle these duplicate reads considering the scenarios mentioned above?
Many thanks in advance!
2 answers
It's not a good idea to remove duplicate reads unless your libraries are amplified. If they are amplified, and you have reads appearing 10+ times, I highly recommend you change to an unamplified protocol, because you are wasting sequence. And by duplicates, I mean that both read 1 and read 2 of pairs are duplicates... otherwise the pairs are not, in fact, duplicates.
But - if you have a situation in which you are using an amplified library, and duplicate pairs occur, I recommend eliminating all duplicates and replacing them with a single copy of their consensus, in any situation other than quantification (e.g. RNA-seq).
You can try seqkit with the rmdup subcommand ( usage):
seqkit rmdup --by-seq --md5 reads.fq > reads.uniq.fq
For a 2.2G test dataset:
$ seqkit stat dataset_C.fq
file seq_format seq_type num_seqs min_len avg_len max_len
dataset_C.fq FASTQ DNA 9,186,045 100 100 100
Remove duplicate reads:
$ memusg -t seqkit rmdup -s dataset_C.fq > dataset_C.uniq.fq
[INFO] 501303 duplicated records removed
elapsed time: 53.893s
peak rss: 2.68 GB
The memory is a little bigger than size of the file.
We can use MD5 digest of the sequence to represent the sequence content, which uses less memory but more time:
$ memusg -t seqkit rmdup -s -m dataset_C.fq > dataset_C.uniq.fq
[INFO] 501303 duplicated records removed
elapsed time: 1m:24s
peak rss: 1.51 GB
However seqkit can only handle single file, this will produce unpaired reads for PE reads, I don't know whether it affect the down-stream assembly.
You can also have a look at Digital Normalization using khmer.
Log in to answer this question.