I have concatenated two fastq files and I m pretty certain I have quite a few duplicates. Is there a script, program (something in BBMAP?) or common way to remove duplicates based on the sequence identifier (as opposed to a kmer-or sequence based method since I want to retain all unique fragments at this point)? Any assistance would be most appreciated.
Unconfigured Ad
Collapse
X
-
They were not. They were two different selections (one was a selection of fragments from low copy regions of the genome based on kmers counts and the other a selection of genomic fragments that mapped to transcribed sequences) from the same sets of flow cells. Thus I am expecting a fair number of common frags from both selections.
Comment
-
-
Since you had asked about "based on sequence identifiers" originally .. but it sounds like you are just looking to de-duplicate the actual fastq reads.Originally posted by horvathdp View PostIs there a script, program (something in BBMAP?) or common way to remove duplicates based on the sequence identifier (as opposed to a kmer-or sequence based method since I want to retain all unique fragments at this point)?
dedupe.sh from BBMap is what you need. Depending on the size of your sequence file be ready to allocate adequate amount of RAM to the process.
Comment
-
-
If I ran dedupe, wouldn't that result in eliminating all duplicated kmers not just duplicated fragments? I want to assemble the resulting file, and I worry that normalizing the kmer counts to no greater than 1 would not be the best file for assembling. Am I wrong in this thinking? I toyed with the idea of just normalizing to 20 (which I intend to do at the end anyways, but figured that might leave cases where I still have more duplicate sequences than necessary.
Comment
-
-
Since dedupe can do the following
You can specify that only exact maches over (full length) be eliminated (I assume that is what you want)?Removes duplicate sequences, which may be specified to be exact matches, subsequences, or sequences within some percent identity.
Comment
-
-
Possibly? If that works, then why do people not just use these essentially 1X files for assembly? I normally see a 20 or 30X coverage for assemblies. This all said, do you know of way to just eliminate duplicate entries in a fastq file based on identifiers rather than sequence?
Comment
-
-
I am not sure what you are referring to here.Originally posted by horvathdp View PostPossibly? If that works, then why do people not just use these essentially 1X files for assembly? I normally see a 20 or 30X coverage for assemblies. This all said, do you know of way to just eliminate duplicate entries in a fastq file based on identifiers rather than sequence?
If one was certain to have every part of starting material covered (e.g. if we had a theoretical sequencer that started at one end of the chromosome and went through the entire length) then 1x sequencing would be enough. By using 30x you are ensuring that all sequenceable areas would be sampled (and be represented in) your data.
In theory there can be no duplicate entries as far as sequence identifiers go (if you are referring to fastq headers). You would need to cat the same file twice to make a new one.
Comment
-
-
Ahhh!!! I might have just o=found the answer to my own question:
./dedupe.sh in=concat1.merged out=depuded_concat.merged rmn=t
the rmn=f requires both sequence and identifier to be identical.
sorce https://github.com/BioInfoTools/BBMa...r/sh/dedupe.sh
Comment
-
-
I think I understand this finally ...
Original fastq dataset was sampled (two different ways) and you want to eliminate duplicates that may have been selected in both datasets leaving only one copy in the final combined file. And yes, the dedupe solution you discovered will work for that.Last edited by GenoMax; 10-18-2016, 07:27 AM.
Comment
-
-
I am playing with a unix-based option right now. I made a short test list of names in a file test.txt
@HWI-D00653:49:H2FF5BCXX:2:1101:1631:2117 1:N:0:ATCACG
@HWI-D00653:49:H2FF5BCXX:2:1101:1631:2117 2:N:0:ATCACG trim=1
@HWI-D00653:49:H2FF5BCXX:2:1101:1804:2196 1:N:0:ATCACG
@HWI-D00653:49:H2FF5BCXX:2:1101:2187:2119 1:N:0:ATCACG
and am trying to see if I can regenerate a fastq file from it using the command
grep -A 3 test.txt concated.fastq >out.fastq
If it works, I can generate a unique list using grep|sort|uniq
My guess is this could take a while though as the test.txt has been running for the last 5 minutes
Comment
-
Latest Articles
Collapse
-
by SEQadmin2
I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.
Here are nine questions we think about, in roughly the order they matter, before...-
Channel: Articles
06-18-2026, 07:11 AM -
-
by SEQadmin2
Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.
The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
...-
Channel: Articles
06-02-2026, 10:05 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 06-26-2026, 11:10 AM
|
0 responses
11 views
0 reactions
|
Last Post
by SEQadmin2
06-26-2026, 11:10 AM
|
||
|
Whole-Genome Sequencing Traces Faroe Islands Ancestry to a North Atlantic Founder Population
by SEQadmin2
Started by SEQadmin2, 06-17-2026, 06:09 AM
|
0 responses
45 views
0 reactions
|
Last Post
by SEQadmin2
06-17-2026, 06:09 AM
|
||
|
Sequencing the Two-Toed Sloth Genome Reveals Jumping Genes Tied to Its Extreme Metabolism
by SEQadmin2
Started by SEQadmin2, 06-09-2026, 11:58 AM
|
0 responses
105 views
0 reactions
|
Last Post
by SEQadmin2
06-09-2026, 11:58 AM
|
||
|
Started by SEQadmin2, 06-05-2026, 10:09 AM
|
0 responses
125 views
0 reactions
|
Last Post
by SEQadmin2
06-05-2026, 10:09 AM
|
Comment