<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Alexander<br>
<br>
Thanks for posting the code and the sequences. Now I've managed to
track it down to an integer overflow bug.<br>
<br>
The problem seems to happen whenever the max score goes over 32768
(the max value for a java 'short' type). I tested it with several
subsequences of your sequences until it went to negative.<br>
<br>
This is your program with your original sequences (the first line
contains the lengths of the 1st and 2nd sequences):<br>
<br>
Lengths: 6956 6828<br>
getScore: 3525.0<br>
getMaxScore: -30756.0<br>
getMinScore: -13804.0<br>
getSimilarity: -1.022239263803681<br>
<br>
Now with subsequences, this is the result:<br>
<br>
Lengths: 5000 4900<br>
getScore: 2599.0<br>
getMaxScore: 25000.0<br>
getMinScore: -9920.0<br>
getSimilarity: 0.35850515463917526<br>
<br>
Lengths: 6000 5900<br>
getScore: 3076.0<br>
getMaxScore: 30000.0<br>
getMinScore: -11920.0<br>
getSimilarity: 0.3577290076335878<br>
<br>
Lengths: 6500 6400<br>
getScore: 3312.0<br>
getMaxScore: 32500.0<br>
getMinScore: -12920.0<br>
getSimilarity: 0.35737560546014974<br>
<br>
Lengths: 6800 6700<br>
getScore: 3440.0<br>
getMaxScore: -31536.0<br>
getMinScore: -13520.0<br>
getSimilarity: -0.9413854351687388<br>
<br>
So as you see as soon as the max score goes over the 32768 limit,
then it overflows and goes negative, producing a negative similarity
too.<br>
<br>
I've just filed an issue in github for it. I'll see if I can fix it
at some point: <br>
<br>
<a class="moz-txt-link-freetext" href="https://github.com/biojava/biojava/issues/202">https://github.com/biojava/biojava/issues/202</a><br>
<br>
<br>
In any case for the moment it is clear that the code will work
alright with not-too-long sequences (not sure exactly where the
limit is)<br>
<br>
Cheers<br>
<br>
Jose<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 05/11/14 18:40, Александр Бескровный
wrote:<br>
</div>
<blockquote
cite="mid:CAA=XqjqxBFvsgSDWax7kkTU1zHLTst9gmsP8DS78mbxT3xJ_oA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thanks for answers!<br>
<div class="gmail_quote">
<div dir="ltr">
<div><span>
<div><br>
</div>
<div>I use 3.1. Today I checked results in SNAPSHOT
version, but the problem remained.<br>
</div>
<div>Also I aligned sequences with themselves and
recieved bad numbers again.<br>
</div>
<div>As I understand it, score of alignment must be
between minScore and maxScore , so similarity of
sequences, which calculates according to<span
lang="en"><span> formula<br>
<br>
</span></span></div>
<div><span lang="en"><span>(score -
minScore)/(maxScore - minScore)<br>
</span></span></div>
<span lang="en"><span><br>
</span></span><span lang="en"><span>must be </span></span></span><span
lang="en"><span>between 0.0 and 1.0. <br>
<br>
Here is my code</span> <span>and</span> <span>two
sequences. Notice, that the output of "getMaxScore"
method is negative.<br>
Sorry for terrible appearance of letter, but all
examples is too large.<br>
</span></span></div>
<div><span lang="en"><span><br>
<br>
<br>
public class NWSimilarity {<br>
<br>
</span></span></div>
<div><span lang="en"><span> public static void main
(String[] args) {<br>
</span></span></div>
<div><span><span lang="en"><span><br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>SubstitutionMatrix<NucleotideCompound>
matrix = SubstitutionMatrixHelper.getNuc4_4();<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>SimpleGapPenalty gap = new
SimpleGapPenalty();<br>
<br>
</span></span></span><span lang="en"><span><span
lang="en"><span> </span></span>String str1 =<br>
"AGATATATCTGAAGCTTAAAGGGCAGTGACAATGGCTGGCTCGGTTAACGGGAATCATAGTGCTGTAGGACCTGGTATAAATTATGAGACGGTGTCTCAAGTGGATGAGTTCTGTAAAGCACTTAGAGGGAAAAGGCCGATCCATAGTATTTTGATAGCTAACAATGGAATGGCGGCTGTGAAGTTTATACGTAGTGTCAGAACATGGGCTTATGAAACATTTGGTACGGAAAAAGCCATATTGTTGGTGGGGATGGCAACCCCTGAAGACATGCGGATCAATGCGGAGCATATCAGAATCGCTGATCAGTTTGTTGAGGTTCCCGGAGGAACCAACAATAACAATTATGCTAACGTTCAGCTGATTGTGGAGATGGCTGAAGTAACACGCGTGGATGCAGTTTGGCCTGGTTGGGGTCATGCATCTGAAAACCCCGAATTACCTGATGCCCTAGATGCAAAAGGAATCATATTTCTTGGTCCTCCAGCATCTTCAATGGCAGCACTGGGAGATAAGATTGGTTCTTCGTTGATTGCACAAGCTGCTGATGTACCCACTCTGCCATGGAGTGGTTCCCATGTTAAAATACCTCCTAATAGCAACTTGGTAACCATCCCAGAGGAGATCTACCGGCAAGCATGTGTCTACACAACTGAAGAAGCGATTGCTAGCTGTCAAGTTGTCGGTTACCCAGCAATGATCAAAGCATCGTGGGGTGGTGGTGGTAAAGGAATCAGGAAGGTTCATAATGATGATGAGGTTAGGGCTCTATTCAAGCAAGTTCAGGGTGAGGTCCCAGGCTCACCAATATTCATAATGAAGGTTGCGTCACAGAGTCGGCATCTAGAGGTCCAGCTGCTCTGTGACAAGCATGGAAATGTTTCAGCTCTGCATAGCCGTGATTGTAGCGTCCAGAGAAGACATCAAAAGATCATAGAGGAGGGTCCAATTACTGTGGCTCCGCCAGAAACTGTCAAGAAACTTGAACAAGCAGCTA
GAAGGTTGGCTAAGAGTGTTAACTATGTTGGAGCTGCTACTGTTGAGTATCTCTACAGTATGGACACTGGGGAGTACTACTTCTTAGAGCTTAACCCTCGCTTACAGGTTGAGCATCCTGTCACTGAGTGGATTGCCGAGATAAATCTTCCTGCTGCCCAAGTTGCTGTGGGGATGGGAATTCCTCTCTGGCAAATCCCTGAGATAAGACGGTTCTATGGAATAGAACATGGTGGAGGTTATGATTCTTGGCGAAAAACATCTGTTGTAGCCTTCCCTTTTGATTTTGATAAAGCTCAATCTATAAGGCCAAAAGGTCATTGTGTGGCTGTACGTGTGACAAGTGAGGATCCTGATGACGGGTTCAAACCAACCAGCGGTAGAGTTCAGGAGTTGAGTTTTAAGAGCAAGCCAAATGTGTGGGCGTACTTCTCTGTCAAGTCTGGTGGAGGCATCCACGAGTTCTCGGATTCCCAGTTTGGACATGTTTTTGCATTTGGGGAATCCAGAGCCCTGGCGATAGCGAATATGGTTCTTGGGCTAAAAGAAATTCAGATCCGTGGAGAAATTAGGACTAACGTTGACTACACGATCGACCTTTTACATGCTTCTGATTACCGTGATAACAAAATTCACACTGGTTGGTTGGATAGTAGGATTGCTATGCGGGTCAGAGCTGAGAGGCCTCCATGGTATCTCTCTGTTGTCGGCGGAGCTCTCTATAAAGCATCAGCGACCAGTGCTGCTGTGGTTTCAGATTACGTTGGTTATCTGGAGAAGGGGCAAATCCCTCCAAAGCATATATCTCTTGTACATTCTCAAGTGTCTCTGAATATTGAAGGAAGTAAATATACGATTGATGTAGTCCGGGGTGGATCAGGAACCTACAGGCTAAGAATGAACAAGTCAGAAGTGGTAGCAGAAATACACACTCTACGTGATGGAGGTCTGTTGATGCAGTTGGATGGCAAAAGCCATGTGATATATGCAGAGGAAGAAG
CTGCAGGAACTCGTCTTCTCATTGATGGAAGAACTTGTTTGCTACAGAATGACCACGATCCATCAAAGTTAATGGCTGAGACACCGTGCAAGTTGATGAGGTATTTGATTTCCGACAACAGCAATATTGACGCTGATACGCCTTATGCCGAAGTTGAGGTCATGAAGATGTGCATGCCACTTCTTTCACCTGCTTCAGGAGTTATCCATTTTAAAATGTCTGAAGGACAAGCCATGCAGGCTGGTGAACTTATAGCCAATCTTGATCTTGATGATCCTTCTGCTGTAAGAAAGGCCGAACCCTTCCATGGAAGTTTCCCAAGATTAGGGCTTCCAACTGCAATATCCGGTAGAGTTCATCAGAGATGTGCCGCAACATTAAATGCTGCACGCATGATTCTTGCTGGCTATGAGCATAAAGTAGATGAGGTTGTTCAAGACTTACTTAATTGCCTTGATAGCCCTGAACTCCCATTTCTTCAGTGGCAAGAGTGCTTTGCAGTTCTGGCGACACGACTACCTAAAAATCTCAGGAACATGCTAGAATCAAAGTATAGGGAATTTGAGAGTATTTCCAGAAACTCTTTGACCACCGATTTCCCTGCCAAACTTTTAAAAGGCATTCTTGAGGCACATTTATCTTCTTGTGATGAGAAAGAGAGAGGTGCCCTTGAAAGGCTCATTGAACCATTGATGAGCCTTGCAAAATCTTATGAAGGTGGTAGAGAAAGTCATGCCCGTGTTATTGTTCATTCTCTCTTTGAAGAATATCTATCAGTAGAAGAATTATTCAATGATAACATGCTGGCTGATGTTATAGAACGCATGCGTCAGCTATACAAGAAAGATCTGTTGAAAATTGTGGATATAGTGCTCTCACACCAGGGCATAAAAAACAAAAACAAACTCGTTCTCCGGCTCATGGAGCAGCTTGTTTACCCTAATCCTGCTGCTTACAGAGATAAACTTATTCGATTCTCAACACTTAACCATACTAACT
ACTCTGAGTTGGCGCTCAAGGCGAGTCAATTACTTGAACAGACCAAACTAAGTGAGCTTCGTTCAAACATTGCTAGAAGCCTTTCAGAGTTAGAAATGTTTACAGAGGACGGAGAAAATATGGATACTCCCAAGAGGAAAAGTGCCATTAATGAAAGAATAGAAGATCTTGTAAGCGCATCTTTAGCTGTTGAAGACGCTCTCGTGGGACTATTTGACCATAGCGATCACACACTTCAAAGACGGGTTGTTGAGACTTATATTCGCAGATTATACCAGCCCTACGTCGTTAAAGATAGCGTGAGGATGCAGTGGCACCGTTCTGGTCTTCTTGCTTCCTGGGAGTTCCTAGAGGAGCATATGGAAAGAAAAAACATTGGCTTAGACGATCCCGACACATCTGAAAAAGGATTGGTTGAGAAGCGTAGTAAGAGAAAATGGGGGGCTATGGTTATAATCAAATCTTTGCAGTTTCTTCCAAGTATAATAAGTGCAGCATTGAGAGAAACAAAGCACAACGACTATGAAACTGCCGGAGCTCCTTTATCTGGCAATATGATGCACATTGCTATTGTGGGCATCAACAACCAGATGAGTCTGCTTCAGGACAGTGGGGATGAAGACCAAGCTCAGGAAAGAGTAAACAAGTTGGCCAAAATTCTTAAAGAGGAAGAAGTGAGTTCAAGCCTCTGTTCTGCCGGTGTTGGTGTAATCAGCTGTATAATTCAGCGAGATGAAGGACGAACACCCATGAGACATTCTTTCCATTGGTCGTTGGAGAAACAGTATTATGTAGAAGAGCCGTTGCTGCGTCATCTTGAACCTCCTCTGTCCATTTACCTTGAGTTGGATAAGCTGAAAGGATACTCAAATATACAATATACGCCTTCTCGAGATCGTCAATGGCATCTGTATACTGTTACAGACAAGCCAGTGCCAATCAAGAGGATGTTCCTGAGATCTCTTGTTCGACAGGCTACAATGAACGATGGATTTATAT
TGCAGCAAGGGCAGGATAAGCAGCTTAGCCAAACACTGATCTCCATGGCGTTTACGTCGAAATGTGTTCTGAGGTCTTTGATGGATGCCATGGAGGAACTGGAACTGAATGCCCATAATGCTGCAATGAAACCAGATCACGCACATATGTTTCTTTGCATATTGCGTGAGCAGCAGATAGATGATCTTGTGCCTTTCCCCAGGAGAGTTGAAGTGAATGCGGAGGATGAAGAAACTACAGTTGAAATGATCTTAGAAGAAGCAGCACGAGAGATACATAGATCTGTTGGAGTGAGAATGCATAGGTTGGGCGTGTGCGAGTGGGAAGTGCGGCTGTGGTTGGTGTCCTCTGGACTGGCATGTGGTGCTTGGAGGGTTGTGGTTGCAAACGTGACAGGCCGTACATGCACTGTCCACATATACCGAGAAGTTGAAACTCCTGGAAGAAACAGTTTAATCTACCACTCAATAACCAAGAAGGGACCTTTGCATGAAACACCAATCAGTGATCAATATAAGCCCCTGGGATATCTCGACAGGCAACGTTTAGCAGCAAGGAGGAGTAACACTACTTATTGCTATGACTTCCCGTTGGCATTTGGGACAGCCTTGGAACTGTTGTGGGCATCACAACACCCAGGAGTTAAGAAACCATATAAGGATACTCTGATCAATGTTAAAGAGCTTGTATTCTCAAAACCAGAAGGTTCTTCGGGTACATCTCTAGATCTGGTTGAAAGACCACCCGGTCTCAACGACTTTGGAATGGTTGCCTGGTGCCTAGATATGTCGACCCCAGAGTTTCCTATGGGGCGGAAACTTCTCGTGATTGCGAATGATGTCACCTTCAAAGCTGGTTCTTTTGGTCCTAGAGAGGACGCGTTTTTCCTTGCTGTTACTGAACTCGCTTGTGCCAAGAAGCTTCCCTTGATTTACTTGGCAGCAAATTCTGGTGCCCGACTTGGGGTTGCTGAAGAAGTCAAAGCCTGCTTCAAAGTTG
GATGGTCGGATGAAATTTCCCCTGAGAATGGTTTTCAGTATATATACCTAAGCCCTGAAGACCACGAAAGGATTGGATCATCTGTCATTGCCCATGAAGTAAAGCTCTCTAGTGGGGAAACTAGGTGGGTGATTGATACGATCGTTGGCAAAGAAGATGGTATTGGTGTAGAGAACTTAACAGGAAGTGGGGCCATAGCGGGTGCTTACTCAAAGGCATACAATGAAACTTTTACTTTAACCTTTGTTAGTGGAAGAACGGTTGGAATTGGTGCTTATCTTGCCCGCCTAGGTATGCGGTGCATACAGAGACTTGATCAGCCGATCATCTTGACTGGCTTCTCTACACTCAACAAGTTACTTGGGCGTGAGGTCTATAGCTCTCACATGCAACTGGGTGGCCCGAAAATCATGGGCACAAATGGTGTTGTTCATCTTACAGTCTCAGATGATCTTGAAGGCGTATCAGCAATTCTCAACTGGCTCAGCTACATTCCTGCTTACGTGGGTGGTCCTCTTCCTGTTCTTGCCCCTTTAGATCCACCGGAGAGAATTGTGGAGTATGTCCCAGAGAACTCTTGCGACCCACGAGCGGCTATAGCTGGGGTCAAAGACAATACCGGTAAATGGCTTGGAGGTATCTTTGATAAAAATAGTTTCATTGAGACTCTTGAAGGCTGGGCAAGGACGGTAGTGACTGGTAGAGCCAAGCTCGGGGGAATACCCGTTGGAGTTGTTGCAGTTGAGACACAGACTGTCATGCAGATCATCCCAGCCGATCCTGGACAGCTTGACTCTCATGAAAGAGTGGTTCCGCAAGCAGGGCAAGTCTGGTTTCCTGATTCAGCGGCCAAGACTGCTCAAGCGCTTATGGATTTCAACCGGGAAGAGCTTCCATTGTTTATCCTAGCGAACTGGAGAGGGTTTTCAGGTGGGCAGAGAGATCTTTTCGAAGGAATACTTCAGGCAGGTTCAACTATAGTAGAAAATCTGAGAACCT
ATCGTCAGCCAGTGTTTGTGTACATCCCAATGATGGGAGAGCTGCGCGGTGGAGCGTGGGTTGTTGTTGACAGCCAGATAAATTCGGATTATGTTGAAATGTATGCTGATGAAACAGCTCGTGGAAATGTGCTTGAGCCAGAAGGGACAATAGAGATAAAATTTAGAACAAAAGAGCTATTAGAGTGCATGGGAAGGTTGGACCAGAAGCTAATCAGTCTGAAAGCAAAACTGCAAGATGCCAAGCAAAGCGAGGCCTATGCAAACATCGAGCTTCTCCAGCAACAGATTAAAGCCCGAGAGAAACAGCTTTTACCAGTTTATATCCAAATCGCCACCAAATTTGCAGAACTTCATGACACTTCCATGAGAATGGCTGCAAAGGGAGTGATCAAAAGTGTTGTGGAATGGAGCGGCTCGCGGTCCTTCTTCTACAAAAAGCTCAATAGGAGAATCGCTGAGAGCTCTCTTGTGAAAAACGTAAGAGAAGCATCTGGAGACAACTTAGCATATAAATCTTCAATGCGTCTGATTCAGGATTGGTTCTGCAACTCTGATATTGCAAAGGGGAAAGAAGAAGCTTGGACAGACGACCAAGTGTTCTTTACATGGAAGGACAATGTTAGTAACTACGAGTTGAAGCTGAGCGAGTTGAGAGCGCAGAAACTACTGAACCAACTTGCAGAGATTGGGAATTCCTCAGATTTGCAAGCTCTGCCACAAGGACTTGCTAATCTTCTAAACAAGGTGGAGCCGTCGAAAAGAGAAGAGCTGGTGGCTGCTATTCGAAAGGTCTTGGGTTGACTGATATCGAAGACTTTAGCTTCTAATCCAAGAAAGATGGACATTTAAAGTTTGCTTGTGTCCGTTTGGATTGATAATTATATATTTGTTGGTCACAGTTGTAAATGTTGTTGTAGCTTTGTCATTTCCGTATAAACAAATACGCAATAATTCATTCAAC";<br>
<br>
</span></span></div>
<span lang="en"><span><span lang="en"><span> </span></span>String
str2 = <br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>"TAAAGTCTTCGATATCAGTCAACCCAAGACCTTTCGAATAGCAGCCACCAGCTCTTCTCTTTTCGACGGCTCCACCTTGTTTAGAAGATTAGCAAGTCCTTGTGGCAGAGCTTGCAAATCTGAGGAATTCCCAATCTCTGCAAGTTGGTTCAGTAGTTTCTGCGCTCTCAACTCGCTCAGCTTCAACTCGTAGTTACTAACATTGTCCTTCCATGTAAAGAACACTTGGTCGTCTGTCCAAGCTTCTTCTTTCCCCTTTGCAATATCAGAGTTGCAGAACCAATCCTGAATCAGACGCATTGAAGATTTATATGCTAAGTTGTCTCCAGATGCTTCTCTTACGTTTTTTACAAGAGAGCTCTCAGCGATTCTCCTATTGAGCTTTTTGTAGAAGAAGGACCGCGAGCCGCTCCATTCCACAACACTTTTGATCACTCCCTTTGCAGCCATTCTCATGGAAGTGTCATGAAGTTCTGCAAATTTGGTGGCGATTTGGATATAAACTGGTAAAAGCTGTTTCTCTCGGGCTTTAATCTGTTGCTGGAGAAGCTCGATGTTTGCATAGGCCTCGCTTTGCTTGGCATCTTGCAGTTTTGCTTTCAGACTGATTAGCTTCTGGTCCAACCTTCCCATGCACTCTAATAGCTCTTTTGTTCTAAATTTTATCTCTATTGTCCCTTCTGGCTCGAGCACATTTCCACGAGCTGTTTCATCAGCATACATTTCAACATAATCCGAATTTATCTGGCTGTCAACAACAACCCACGCTCCACCGCGCAGCTCTCCCATCATTGGGATGTACACAAACACTGGCTGACGATAGGTTCTCAGATTTTCTACTATAGTTGAACCTGCCTGAAGTATTCCTTCGAAAAGATCTCTCTGCCCACCTGAAAACCCTCTCCAGTTCGCTAGGATAAACAATGGAAGCTCTTCCCGGTTGAAATCCATAAGTGCTTGAGCA
GTCTTGGCCGCTGAATCAGGAAACCAGACTTGCCCTGCTTGCGGAACCACTCTTTCATGAGAGTCAAGCTGTCCAGGATCGGCTGGGATGATCTGCATGACAGTCTGTGTCTCAACTGCAACAACTCCAACGGGTATTCCCCCGAGCTTGGCTCTACCAGTCACTACCGTCCTTGCCCAGCCTTCAAGAGTCTCAATGAAACTATTTTTATCAAAGATACCTCCAAGCCATTTACCGGTATTGTCTTTGACCCCAGCTATAGCCGCTCGTGGGTCGCAAGAGTTCTCTGGGACATACTCCACAATTCTCTCCGGTGGATCTAAAGGGGCAAGAACAGGAAGAGGACCACCCACGTAAGCAGGAATGTAGCTGAGCCAGTTGAGAATTGCTGATACGCCTTCAAGATCATCTGAGACTGTAAGATGAACAACACCATTTGTGCCCATGATTTTCGGGCCACCCAGTTGCATGTGAGAGCTATAGACCTCACGCCCAAGTAACTTGTTGAGTGTAGAGAAGCCAGTCAAGATGATCGGCTGATCAAGTCTCTGTATGCACCGCATACCTAGGCGGGCAAGATAAGCACCAATTCCAACCGTTCTTCCACTAACAAAGGTTAAAGTAAAAGTTTCATTGTATGCCTTTGAGTAAGCACCCGCTATGGCCCCACTTCCTGTTAAGTTCTCTACACCAATACCATCTTCTTTGCCAACGATCGTATCAATCACCCACCTAGTTTCCCCACTAGGGAGCTTTACTTCATGGGCAATGACAGATGATCCAATCCTTTCGTGGTCTTCAGGGCTTAGGTATATATACTGAAAACCATTCTCAGGGGAAATTTCATCCGACCATCCAACTTTGAAGCAGGCTTTGACTTCTTCAGCAACCCCAAGTCGGGCACCAGAATTTGCTGCCAAGTAAATCAAGGGAAGCTTCTTGGCACAAGCGAGTTCAGTAACAGCAAGGAAAAACGCGTCCTCTCTAGGACCAAAAGAA
CCAGCTTTGAAGGTGACATCATTCGCAATCACGAGAAGTTTCCGCCCCATAGGAAACTCTGGGGTCGACATATCTAGGCACCAGGCAACCATTCCAAAGTCGTTGAGACCGGGTGGTCTTTCAACCAGATCTAGAGATGTACCCGAAGAACCTTCTGGTTTTGAGAATACAAGCTCTTTAACATTGATCAGAGTATCCTTATATGGTTTCTTAACTCCTGGGTGTTGTGATGCCCACAACAGTTCCAAGGCTGTCCCAAATGCCAACGGGAAGTCATAGCAATAAGTAGTGTTACTCCTCCTTGCTGCTAAACGTTGCCTGTCGAGATATCCCAGGGGCTTATATTGATCACTGATTGGGGTTTCATGCAAAGGTCCCTTCTTGGTTATTGAGTGGTAGATTAAACTGTTTCTTCCAGGAGTTTCAACTTCTCGGTATATGTGGACAGTGCATGTACGGCCTGTCACGTTTGCAACCACAACCCTCCAAGCACCACATGCCAGTCCAGAGGACACCAACCACAGCCGCACTTCCCACTCGCACACGCCCAACCTATGCATTCTCACTCCAACAGATCTATGTATCTCTCGTGCTGCTTCTTCTAAGATCATTTCAACTGTAGTTTCTTCATCCTCCGCATTCACTTCAACTCTCCTGGGGAAAGGCACAAGATCATCTATCTGCTGCTCACGCAATATGCAAAGAAACATATGTGCGTGATCTGGTTTCATTGCAGCATTATGGGCATTCAGTTCCAGTTCCTCCATGGCATCCATCAAAGACCTCAGAACACATTTCGACGTAAACGCCATGGAGATCAGTGTTTGGCTAAGCTGCTTATCCTGCCCTTGCTGCAATATAAATCCATCGTTCATTGTAGCCTGTCGAACAAGAGATCTCAGGAACATCCTCTTGATTGGCACTGGCTTGTCTGTAACAGTATACAGATGCCATTGACGATCTCGAGAAGGCGTATATTGTATATTTGAGTATCCTTTC
AGCTTATCCAACTCAAGGTAAATGGACAGAGGAGGTTCAAGATGACGCAGCAACGGCTCTTCTACATAATACTGTTTCTCCAACGACCAATGGAAAGAATGTCTCATGGGTGTTCGTCCTTCATCTCGCTGAATTATACAGCTGATTACACCAACACCGGCAGAACAGAGGCTTGAACTCACTTCTTCCTCTTTAAGAATTTTGGCCAACTTGTTTACTCTTTCCTGAGCTTGGTCTTCATCCCCACTGTCCTGAAGCAGACTCATCTGGTTGTTGATGCCCACAATAGCAATGTGCATCATATTGCCAGATAAAGGAGCTCCGGCAGTTTCATAGTCGTTGTGCTTTGTTTCTCTCAATGCTGCACTTATTATACTTGGAAGAAACTGCAAAGATTTGATTATAACCATAGCCCCCCATTTTCTCTTACTACGCTTCTCAACCAATCCTTTTTCAGATGTGTCGTGATCGTCTAAGCCAATGTTTTTTCTTTCCATATGCTCCTCTAGGAAATCCCAGGAAGCAAGAAGACCAGAACGGTGCCACTGCATCCTCACGCTATCTTTAACGACGTAGGGCTGGTATAATCTGCGAATATAAGTCTCAACAACCCGTCTTTGAAGTGTGTGATCGCTATGGTCAAATAGTCCCACGAGAGCGTCTTCAACAGCTAAAGATGCGCTTACAAGATCTTCTATTCTTTCATTAATGGCACTTTTCCTCTTGGGAGTATCCATATTTTCTCCGTCCTCTGTAAACATTTCTAACTCTGAAAGGCTTCTAGCAATGTTTGAACGAAGCTCACTTAGTTTGGTCTGTTCAAGTAATTGACTCGCCTTGAGCGCCAACTCAGAGTAGTTAGTATGGTTAAGTGTTGAGAATCGAATAAGTTTATCTCTGTAAGCAGCAGGATTAGGGTAAACAAGCTGCTCCATGAGCCGGAGAACGAGTTTGTTTTTGTTTTTTATGCCCTGGTGTGAGAGCACTATATCCACAATT
TTCAACAGATCTTTCTTGTATAGCTGACGCATGCGTTCTATAACATCAGCCAGCATGTTATCATTGAATAATTCTTCTACTGATAGATATTCTTCAAAGAGAGAATGAACAATAACACGGGCATGACTTTCTCTACCACCTTCATAAGATTTTGCAAGGCTCATCAATGGTTCAATGAGCCTTTCAAGGGCACCTCTCTCTTTCTCATCACAAGAAGATAAATGTGCCTCAAGAATGCCTTTTAAAAGTTTGGCAGGGAAATCGGTGGTCAAAGAGTTTCTGGAAATACTCTCAAATTCCCTATACTTTGATTCTAGCATGTTCCTGAGATTTTTAGGTAGTCGTGTCGCCAGAACTGCAAAGCACTCTTGCCACTGAAGAAATGGGAGTTCAGGGCTATCAAGGCAATTAAGTAAGTCTTGAACAACCTCATCTACTTTATGCTCATAGCCAGCAAGAATCATGCGTGCAGCATTTAATGTTGCGGCACATCTCTGATGAACTCTACCGGATATTGCAGTTGGAAGCCCTAATCTTGGGAAACTTCCATGGAAGGGTTCGGCCTTTCTTACAGCAGAAGGATCATCAAGATCAAGATTGGCGATAAGTTCACCAGCCTGCATGGCTTGTCCTTCAGACATTTTAAAATGGATAACTCCTGAAGCAGGTGAAAGAAGTGGCATGCACATCTTCATGACCTCAACTTCGGCATAAGGCGTATCAGCGTCAATATTGCTGTTGTCAGAAACCAAATACCTCATCAACTTGCACGGTGTCTCAGCCATTAACTTTGATGGATCATGGTCATTCTGTAGCAAACAAGTTCTTCCATCAATGAGAAGACGAGTTCCTGCAGCTTCTTCCTCTGCATATATCACATGGCTTTTGCCATCCAACTGCATCAACAGACCTCCATCACGTAGAGTGTGTATTTCTGCTACCACTTCTGACTTGTTCATTCTTAGCCTGTAGGTTCCTGATCCACCCCGGACTACATCA
ATCGTATATTTACTTCCTTCAATATTCAGAGACACTTGAGAATGCACAAGAGATATATGCTTTGGGGGAATTTGCCCCTTTTCTAGATAGCCAACGTAATCCGAAACTACAGCAGAACTGGTCGTAGATGCTTTATAAAGAGCCCCACCGACTACAGAGAGATACCATGGAGGTCTCTCTGCTCTGACCCGCATAGCAATCCTACTGTCCAACCAACCAGTGTGTATTTTGTTTTCCCGGTAATCAGAAGCATGTAGAAGGTCGATCGTGTAGTCAACGTTAGTCCTAATTTCTCCACGGATCTGAATTTCTTTTAGCCCAAGAACCATATTCGCTATCGCCAGGGCTCTGGATTCCCCAAATGCAAAAACATGTCCAAACTGGGAATCCGAGAACTCGTGGATGCCTCCACCAGACTTGACAGAGAAGTACGCCCACACATTTGGCTTGCTCTTAAAACTCAACTCCTGAACTCTACCGCTGGTTGGTTTGAACCCGTCATCAGGATCCTCACTTGTCACACGTACAGCCACACAATGACCTTTTGGCCTTATAGATTGAGCTTTATCAAAATCAAAAGGGAAGGCTACAACAGATGTTTTTCGCCAAGAATCATAACCTCCACCATGTTCTATTCCATAGAACCGTCTTATCTCAGGGATTTGCCAGAGAGGAATTCCCATCCCCACAGCAACTTGGGCAGCAGGAAGATTTATCTCGGCAATCCACTCAGTGACAGGATGCTCAACCTGTAAGCGAGGGTTAAGCTCTAAGAAGTAGTACTCCCCAGTGTCCATACTGTAGAGATACTCAACAGTAGCAGCTCCAACATAGTTAACACTCTTAGCCAACCTTCTAGCTGCTTGTTCAAGTTTCTTGACAGTTTCTGGCGGAGCCACAGTAATTGGACCCTCCTCTATGATCTTTTGATGTCTTCTCTGGACGCTACAATCACGGCTATGCAGAGCTGAAACATTTCCATGCTTGTCACAGAGCAGC
TGGACCTCTAGATGCCGACTCTGTGACGCAACCTTCATTATGAATATTGGTGAGCCTGGGACCTCACCCTGAACTTGCTTGAATAGAGCCCTAACCTCATCATCATTATGAACCTTCCTGATTCCTTTACCACCACCACCCCACGATGCTTTGATCATTGCTGGGTAACCGACAACTTGACAGCTAGCAATCGCTTCTTCAGTTGTGTAGACACATGCTTGCCGGTAGATCTCCTCTGGGATGGTTACCAAGTTGCTATTAGGAGGTATTTTAACATGGGAACCACTCCATGGCAGAGTGGGTACATCAGCAGCTTGTGCAATCAACGAAGAACCAATCTTATCTCCCAGTGCTGCCATTGAAGATGCTGGAGGACCAAGAAATATGATTCCTTTTGCATCTAGGGCATCAGGTAATTCGGGGTTTTCAGATGCATGACCCCAACCAGGCCAAACTGCATCCACGCGTGTTACTTCAGCCATCTCCACAATCAGCTGAACGTTAGCATAATTGTTATTGTTAGTTCCTCCGGGAACCTCAACAAACTGATCAGCGATTCTGATATGCTCCGCATTGATCCGCATGTCTTCAGGGGTTGCCATCCCCACCAACAATATGGCTTTTTCCGTACCAAATGTTTCATAAGCCCATGTTCTGACACTACGTATAAACTTCACAGCCGCCATTCCATTGTTAGCTATCAAAATACTATGGATCGGCCTTTTCCCTCTAAGTGCTTTACAGAACTCATCCACTTGAGACACCGTCTCATAATTTATACCAGGTCCTACAGCACTATGATTCCCGTTAACCGAGCCAGCCATTGTCACTGCCCTTTAATCTTCAGATATATCTTGTAAGGAAGCAGA";<br>
<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>DNASequence target = new
DNASequence(str1,<br>
AmbiguityDNACompoundSet.getDNACompoundSet());<br>
<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>DNASequence query = new
DNASequence(str2,<br>
AmbiguityDNACompoundSet.getDNACompoundSet());<br>
<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>NeedlemanWunsch aligner = new
NeedlemanWunsch(query, target, gap, matrix);<br>
<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>System.out.println("getScore: " +
aligner.getScore());<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>System.out.println("getMaxScore: " +
aligner.getMaxScore());<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>System.out.println("getMinScore: " +
aligner.getMinScore());<br>
</span></span><span lang="en"><span><span lang="en"><span>
</span></span>System.out.println("getSimilarity: " +
aligner.getSimilarity());<br>
} <br>
}<br>
</span></span></div>
<div>
<div>
<div class="gmail_extra"><br>
</div>
</div>
</div>
</div>
<br>
<br>
Regards,<br>
</div>
Alexander Beskrovnyy<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Biojava-l mailing list - <a class="moz-txt-link-abbreviated" href="mailto:Biojava-l@mailman.open-bio.org">Biojava-l@mailman.open-bio.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.open-bio.org/mailman/listinfo/biojava-l">http://mailman.open-bio.org/mailman/listinfo/biojava-l</a></pre>
</blockquote>
<br>
</body>
</html>