Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > String Manipulation > Sequence Alignment & Comparison > Distance and Similarity Measures > SmithWatermanSimilarity >
Mathematica > Data Manipulation > Numerical Data > Exploratory Data Analysis > Distance and Similarity Measures > SmithWatermanSimilarity >
Mathematica > Data Manipulation > Statistical Data Analysis > Exploratory Data Analysis > Distance and Similarity Measures > SmithWatermanSimilarity >

SmithWatermanSimilarity

SmithWatermanSimilarity
gives a number representing the Smith-Waterman similarity between strings or vectors u and v.
  • SmithWatermanSimilarity finds an optimal local alignment between the elements of u and v, and returns the number of one-element matches.
  • With the default setting SimilarityRules->Automatic, each match between two characters contributes to the total similarity score, while each mismatch, insertion, or deletion contributes .
  • The option GapPenalty specifies an additional cost to be subtracted from the similarity score for any run of insertions or deletions.
Smith-Waterman similarity between two strings:
Smith-Waterman similarity between two vectors:
Smith-Waterman similarity between two strings:
In[1]:=
Click for copyable input
Out[1]=
 
Smith-Waterman similarity between two vectors:
In[1]:=
Click for copyable input
Out[1]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF