|
SOLUTIONS
|
Mathematica
>
Core Language
>
String Manipulation
>
Sequence Alignment & Comparison
>
Distance and Similarity Measures
>
SmithWatermanSimilarity
BUILT-IN MATHEMATICA SYMBOL
SmithWatermanSimilarity
SmithWatermanSimilarity[u, v]
gives a number representing the Smith-Waterman similarity between strings or vectors u and v.
Details and OptionsDetails and Options
- SmithWatermanSimilarity[u, v] finds an optimal local alignment between the elements of u and v, and returns the number of one-element matches.
- For strings, setting the option IgnoreCase->True makes SmithWatermanSimilarity treat lowercase and uppercase letters as equivalent.
- 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.
New in 7
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
