This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fasta Alignment Scores

I used FASTA to align some short sequences to a longer list of short sequences.

FASTA seems to think that the alignment with the mismatch has a better alignment than the second alignment which doesn't have any mismatches. Is there a way to correct this?

Sorry about the formatting. I don't know how to get the alignment logos to line up.

\>>D2-21  (28 aa)  initn:  62 init1:  62 opt:  62  Z-score: 68.8  bits: 12.9 E():  1.1 Smith-Waterman score: 62; 90.0% identity (100.0% similar) in 10 aa overlap (5-14 :3-12)

unkno CCCCCATATAGTGG
           :::::.:::: 
D2-21   AGCATATTGTGGTGGTGACTGCTATTCC

\>>D5-12                                                   (23 aa)  initn:  54 init1:  54 opt:  54  Z-score: 62.1  bits: 11.4 E():  2.6 Smith-Waterman score: 54; 100.0% identity (100.0% similar) in 9 aa overlap (6-14 :5-13)

unkno CCCCCATATAGTGG
            ::::::::: 
D5-12   GTGGATATAGTGGCTACGATTAC
                10        20
fasta

2 answers

You seem to have nucleotide query but fasta ran in AA mode. Use -n option to force nucleotide search and then check again

There are two issues in your situation:

  1. you are aligning at the amino acid level, but you should be aligning at the nucleic acid level

    => As suggested by Michael, you should force the alignment to occur at the nucleic acid level (-n option in the command line). This will also get rid of the '%similarity' which doesn't make sense here, and will probably change the scores of each hit (possibly their order).

  2. an alignment of 10 bases including a mismatch is 'better' (score-wise) than an alignment with 9 bases.

    => This is a logical assumption, and this is what is classically done. But if for some reason, this is not what you want to do, you will have to parse this file according to the rules you prefer (best alignment with no mismatch). This can be done using Python (or Perl).

Log in to answer this question.