Stupid question, I know.
Is a local alignment like Smith-Waterman typically/always considered to be symmetric? I.e. is alignment(s,t) the same as alignment(t,s)?
Thanks.
Stupid question, I know.
Is a local alignment like Smith-Waterman typically/always considered to be symmetric? I.e. is alignment(s,t) the same as alignment(t,s)?
Thanks.
Consider the following two sequences as your alignment(s,t):
This is obviously not the same as alignment(t,s) because the sequences are swapped.
However, the score of a pairwise alignment is always symmetric, ie. score(alignment(s,t)) = score(alignment(t,s)). There was a question about how the score is calculated a few days back, when you read that you understand why: only the pairwise equalities or differences are considered, they have no order.
Simple proof: a scoring matrix, e.g. the BLOSUM matrices for proteins, are symmetric (although you can theoretically have an asymmetric one but then you will run into problems when scoring because of the above).
A simple implementation of the Smith-Waterman algorithm is indeed symmetric. However, in practice, this is not necessarily the case. Swapping sequences in BLAST+ may lead to different bit scores for the same alignment, because the substitution matrices are re-calculated based on the query and subject composition. Re-calculating the matrices is a numerical approximation, and may thus lead to substitution matrices that are not the same if you swap subject and query.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
is this a trick question? ;-)