Question: Removing Redundant Amino Acid Sequences From Fasta - Tools And Algorithms
7
gravatar for Jacek
6.8 years ago by
Jacek100
USA
Jacek100 wrote:

Is there any tool that can be used to remove redundant amino acid sequences from Fasta? I know fastx_collapser from fastx-toolkit (How to remove the same sequences in the FASTA files?), but it works on nucleotide sequences only. I am looking for a similar tool.

Are there any widely known algorithms for that purpose? Is using Levenshtein distance, pair distance or similar a good idea?

fasta sequence distance • 3.0k views
ADD COMMENTlink modified 7 months ago by Eslam Samir90 • written 6.8 years ago by Jacek100

All the answers are great, thank you guys. However, I would like to know more about algorithms that can be used. Share your ideas.

ADD REPLYlink written 6.8 years ago by Jacek100
7
gravatar for Pawel Szczesny
6.8 years ago by
Pawel Szczesny3.2k
Poland
Pawel Szczesny3.2k wrote:

If using prove-that-you're-academic-ware doesn't bother you, you should definitely try UCLUST. Its author claims UCLUST is definitely superior to CD-HIT, and while I would take it with a grain of salt, much smaller requirements at much higher speed are hard to ignore.

ADD COMMENTlink written 6.8 years ago by Pawel Szczesny3.2k
4
gravatar for Neilfws
6.8 years ago by
Neilfws47k
Sydney, Australia
Neilfws47k wrote:

Many of the answers to the question that you mentioned will work fine for amino acid sequence.

You should definitely look at CD-HIT. Although not updated for some time it works well and is still widely-used; for example, to create NR databases at UniProt and the PDB.

ADD COMMENTlink written 6.8 years ago by Neilfws47k

It is constantly developed (http://code.google.com/p/cdhit/updates/list ) but indeed the last stable release was quite some time ago.

ADD REPLYlink written 6.8 years ago by Pawel Szczesny3.2k
4
gravatar for Ijessie
6.8 years ago by
Ijessie70
Ijessie70 wrote:

Days ago, I wrote a Python script to remove redundant nucleotide sequences from FASTA. Here is the script:

    import re

    pattern_newline = re.compile(r'([A-Z-]{80})(?=[A-Z-])')

    seqs = {}

    with open('example.fasta') as fin:
        data = fin.read()
        for m in re.finditer(r'>(\w+)[^\n]*([^>]*)', data):
            seq = ''.join(m.group(2).split())
            id = m.group(1)
            if seq not in seqs: seqs[seq] = []
            seqs[seq].append(id)

    with open('unique.fasta', 'w') as fout:
    for seq, ids in seqs.iteritems():
        fout.write('>%s\n%s\n' % (ids[0], pattern_newline.sub(r'\1\n', seq)))

It works on amino acid sequences, too. Wish it helps.

ADD COMMENTlink written 6.8 years ago by Ijessie70
0
gravatar for Eslam Samir
7 months ago by
Eslam Samir90
Egypt / Cairo / Microbiology & Immunology Department
Eslam Samir90 wrote:

Here is my free program on Github Sequence database curator (https://github.com/Eslam-Samir-Ragab/Sequence-database-curator)

It is a very fast program and it can deal with:

  1. Nucleotide sequences
  2. Protein sequences

It can work under Operating systems:

  1. Windows
  2. Mac
  3. Linux

It also works for:

  1. Fasta format
  2. Fastq format

Best Regards

ADD COMMENTlink written 7 months ago by Eslam Samir90
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: 1697 users visited in the last hour