Closed orangeSi closed 5 months ago
@rcedgar
I would not regard this as an error. All alignment algorithms generate results that seem anomalous compared to what you would do as a human. Your example here is explained by gap penalties. In MUSCLE as in many other algorithms a gap is penalized by a so-called affine score B + Le where B=gap open penalty, L=gap length and e=gap extension (i.e. length) penalty. B is larger than e, e.g. in BLASTP B=11, e=1. In your example, the "correct" alignment where the AC pair is aligned has lower score because you need to open two gaps, with total penalty 24 using the BLASTP values, this is a higher penalty than 3 from the mismatches AC=0 + CG=-3 (BLOSUM62 values). In MUSCLE the HMM similarly prefers one gap with the mismatches over opening two gaps to get the matches. With longer sequences, this kind of thing happens much less often because the accumulated high-scoring matches overcome the tendency to prefer one terminal gap. The result in v3 is "correct" because it handles terminal gaps differently. I'll bet it is possible to find a counter-example where v5 produces a better result than v3 when there is a long internal gap.
ok, thanks~ reason is the gap penalties. cound you explain the handles terminal gaps differently
between muscle v3
and v5
? because I find v5 result alaways have amino acid at the two terminal of protein sequence(start or end), like ----AC
.
The algorithms are very different. Muscle v3 uses pretty conventional Needleman-Wunsch with terminal gaps penalized lower. Muscle v5 uses a pair HMM similar to PROBCONS. The pair HMM is not symmetrical between start and end states, hence the preference for opening the gap at the start. In some other programs, you see similar asymmetry effects in N-W because there can be ties in the traceback matrix when >1 alignment has the highest possible score, ties are usually broken using a systematic (and unsymmetrical) rule.
ok, thanks~
Muscle v3 work well as below:
but Muscle v5 get error alignment as below:
my linux system info is :