FASTA deduplicator
Drop repeated records from a multi-FASTA file and see exactly which ones went.
Drop repeated records from a multi-FASTA file and see exactly which ones went.
That depends on what went wrong upstream, so the tool offers three definitions:
In every mode the first occurrence is kept, the rest are dropped, and the order of the surviving records is the order they had in the input.
The example file holds five records: sample A, sample B, a second copy of sample A, sample B written on the other strand, and sample A again in lower case. By sequence, with ignore case on and the reverse complement option off, 3 of 5 records are kept. Dropped areseq3 and seq5, both duplicates of seq1, the second because upper and lower case are treated as the same letter.
Switch the reverse complement option on and seq4 goes too, leaving 2 records: its sequence is the reverse complement of seq2, so on double-stranded DNA it is the same molecule. Switch ignore case off and seq5 survives, because its sequence is written in lower case.
Each record is reduced to a single key, and the first record with a given key wins:
With the reverse complement option on, the key of a DNA sequence is instead whichever of the sequence and its reverse complement sorts first, so a record and its reverse complement always produce the same key. Sequences containing anything other than A, C, G, T, U and N keep their own key, which leaves RNA with U, protein and ambiguous codes untouched by that option.
Paste the file and keep the default mode, by sequence. Records whose sequence has been seen before are dropped, whatever their header says, and the first record of each group is kept. The table under the result names every dropped record and the record it duplicates.
The first one in the file, and the surviving records stay in their original order. That makes the result reproducible: sorting or re-running the tool cannot change which copy you get. If you want a particular copy kept, move it above the others before pasting.
For double-stranded DNA, yes: a contig and its reverse complement are the same molecule, and assemblers and PCR product lists often contain both. The option is off by default because it is wrong for RNA, for protein and for single-stranded designs such as primers or oligo pools, where direction matters.
Because the default compares sequences, not names. Two records can share a header and hold different sequences, for example after a badly merged assembly. Switch to the by header tab to find repeated identifiers, or to by both to drop only records that repeat the header and the sequence together.
Yes. Each record is read into one continuous string before comparison, so line width, spaces and position numbers make no difference. Gap characters do count as characters, so an aligned sequence and the same sequence without gaps are not duplicates.