[Biojava-l] Fwd: Question about NiedlemanWunsch class

Jose Manuel Duarte jose.duarte at psi.ch
Thu Nov 6 13:47:33 UTC 2014


Hi Alexander

Thanks for posting the code and the sequences. Now I've managed to track 
it down to an integer overflow bug.

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.

This is your program with your original sequences (the first line 
contains the lengths of the 1st and 2nd sequences):

Lengths: 6956 6828
getScore: 3525.0
getMaxScore: -30756.0
getMinScore: -13804.0
getSimilarity: -1.022239263803681

Now with subsequences, this is the result:

Lengths: 5000 4900
getScore: 2599.0
getMaxScore: 25000.0
getMinScore: -9920.0
getSimilarity: 0.35850515463917526

Lengths: 6000 5900
getScore: 3076.0
getMaxScore: 30000.0
getMinScore: -11920.0
getSimilarity: 0.3577290076335878

Lengths: 6500 6400
getScore: 3312.0
getMaxScore: 32500.0
getMinScore: -12920.0
getSimilarity: 0.35737560546014974

Lengths: 6800 6700
getScore: 3440.0
getMaxScore: -31536.0
getMinScore: -13520.0
getSimilarity: -0.9413854351687388

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.

I've just filed an issue in github for it. I'll see if I can fix it at 
some point:

https://github.com/biojava/biojava/issues/202


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)

Cheers

Jose






On 05/11/14 18:40, Александр Бескровный wrote:
> Thanks for answers!
>
> I use 3.1. Today I checked results in SNAPSHOT version, but the 
> problem remained.
> Also I aligned sequences with themselves and recieved bad numbers  again.
> As I understand it, score of alignment must be between minScore and 
> maxScore , so similarity of sequences, which calculates according 
> toformula
>
> (score - minScore)/(maxScore - minScore)
>
> must be between 0.0 and 1.0.
>
> Here is my code and two sequences. Notice, that the output of 
> "getMaxScore" method is negative.
> Sorry for terrible appearance of letter, but all examples is too large.
>
>
>
> public class NWSimilarity {
>
>    public static void main (String[] args) {
>
> SubstitutionMatrix<NucleotideCompound> matrix = 
> SubstitutionMatrixHelper.getNuc4_4();
> SimpleGapPenalty gap = new SimpleGapPenalty();
>
> String str1 =
> "AGATATATCTGAAGCTTAAAGGGCAGTGACAATGGCTGGCTCGGTTAACGGGAATCATAGTGCTGTAGGACCTGGTATAAATTATGAGACGGTGTCTCAAGTGGATGAGTTCTGTAAAGCACTTAGAGGGAAAAGGCCGATCCATAGTATTTTGATAGCTAACAATGGAATGGCGGCTGTGAAGTTTATACGTAGTGTCAGAACATGGGCTTATGAAACATTTGGTACGGAAAAAGCCATATTGTTGGTGGGGATGGCAACCCCTGAAGACATGCGGATCAATGCGGAGCATATCAGAATCGCTGATCAGTTTGTTGAGGTTCCCGGAGGAACCAACAATAACAATTATGCTAACGTTCAGCTGATTGTGGAGATGGCTGAAGTAACACGCGTGGATGCAGTTTGGCCTGGTTGGGGTCATGCATCTGAAAACCCCGAATTACCTGATGCCCTAGATGCAAAAGGAATCATATTTCTTGGTCCTCCAGCATCTTCAATGGCAGCACTGGGAGATAAGATTGGTTCTTCGTTGATTGCACAAGCTGCTGATGTACCCACTCTGCCATGGAGTGGTTCCCATGTTAAAATACCTCCTAATAGCAACTTGGTAACCATCCCAGAGGAGATCTACCGGCAAGCATGTGTCTACACAACTGAAGAAGCGATTGCTAGCTGTCAAGTTGTCGGTTACCCAGCAATGATCAAAGCATCGTGGGGTGGTGGTGGTAAAGGAATCAGGAAGGTTCATAATGATGATGAGGTTAGGGCTCTATTCAAGCAAGTTCAGGGTGAGGTCCCAGGCTCACCAATATTCATAATGAAGGTTGCGTCACAGAGTCGGCATCTAGAGGTCCAGCTGCTCTGTGACAAGCATGGAAATGTTTCAGCTCTGCATAGCCGTGATTGTAGCGTCCAGAGAAGACATCAAAAGATCATAGAGGAGGGTCCAATTACTGTGGCTCCGCCAGAAACTGTCAAGAAACTTGAACAAGCAGCTAGAAGGTTGGCTAAGAGTGTTAACTATGTTGGAGCTGCTACTGTTGAGTATCTCTACAGTATGGACACTGGGGAGTACTACTTCTTAGAGCTTAACCCTCGCTTACAGGTTGAGCATCCTGTCACTGAGTGGATTGCCGAGATAAATCTTCCTGCTGCCCAAGTTGCTGTGGGGATGGGAATTCCTCTCTGGCAAATCCCTGAGATAAGACGGTTCTATGGAATAGAACATGGTGGAGGTTATGATTCTTGGCGAAAAACATCTGTTGTAGCCTTCCCTTTTGATTTTGATAAAGCTCAATCTATAAGGCCAAAAGGTCATTGTGTGGCTGTACGTGTGACAAGTGAGGATCCTGATGACGGGTTCAAACCAACCAGCGGTAGAGTTCAGGAGTTGAGTTTTAAGAGCAAGCCAAATGTGTGGGCGTACTTCTCTGTCAAGTCTGGTGGAGGCATCCACGAGTTCTCGGATTCCCAGTTTGGACATGTTTTTGCATTTGGGGAATCCAGAGCCCTGGCGATAGCGAATATGGTTCTTGGGCTAAAAGAAATTCAGATCCGTGGAGAAATTAGGACTAACGTTGACTACACGATCGACCTTTTACATGCTTCTGATTACCGTGATAACAAAATTCACACTGGTTGGTTGGATAGTAGGATTGCTATGCGGGTCAGAGCTGAGAGGCCTCCATGGTATCTCTCTGTTGTCGGCGGAGCTCTCTATAAAGCATCAGCGACCAGTGCTGCTGTGGTTTCAGATTACGTTGGTTATCTGGAGAAGGGGCAAATCCCTCCAAAGCATATATCTCTTGTACATTCTCAAGTGTCTCTGAATATTGAAGGAAGTAAATATACGATTGATGTAGTCCGGGGTGGATCAGGAACCTACAGGCTAAGAATGAACAAGTCAGAAGTGGTAGCAGAAATACACACTCTACGTGATGGAGGTCTGTTGATGCAGTTGGATGGCAAAAGCCATGTGATATATGCAGAGGAAGAAGCTGCAGGAACTCGTCTTCTCATTGATGGAAGAACTTGTTTGCTACAGAATGACCACGATCCATCAAAGTTAATGGCTGAGACACCGTGCAAGTTGATGAGGTATTTGATTTCCGACAACAGCAATATTGACGCTGATACGCCTTATGCCGAAGTTGAGGTCATGAAGATGTGCATGCCACTTCTTTCACCTGCTTCAGGAGTTATCCATTTTAAAATGTCTGAAGGACAAGCCATGCAGGCTGGTGAACTTATAGCCAATCTTGATCTTGATGATCCTTCTGCTGTAAGAAAGGCCGAACCCTTCCATGGAAGTTTCCCAAGATTAGGGCTTCCAACTGCAATATCCGGTAGAGTTCATCAGAGATGTGCCGCAACATTAAATGCTGCACGCATGATTCTTGCTGGCTATGAGCATAAAGTAGATGAGGTTGTTCAAGACTTACTTAATTGCCTTGATAGCCCTGAACTCCCATTTCTTCAGTGGCAAGAGTGCTTTGCAGTTCTGGCGACACGACTACCTAAAAATCTCAGGAACATGCTAGAATCAAAGTATAGGGAATTTGAGAGTATTTCCAGAAACTCTTTGACCACCGATTTCCCTGCCAAACTTTTAAAAGGCATTCTTGAGGCACATTTATCTTCTTGTGATGAGAAAGAGAGAGGTGCCCTTGAAAGGCTCATTGAACCATTGATGAGCCTTGCAAAATCTTATGAAGGTGGTAGAGAAAGTCATGCCCGTGTTATTGTTCATTCTCTCTTTGAAGAATATCTATCAGTAGAAGAATTATTCAATGATAACATGCTGGCTGATGTTATAGAACGCATGCGTCAGCTATACAAGAAAGATCTGTTGAAAATTGTGGATATAGTGCTCTCACACCAGGGCATAAAAAACAAAAACAAACTCGTTCTCCGGCTCATGGAGCAGCTTGTTTACCCTAATCCTGCTGCTTACAGAGATAAACTTATTCGATTCTCAACACTTAACCATACTAACTACTCTGAGTTGGCGCTCAAGGCGAGTCAATTACTTGAACAGACCAAACTAAGTGAGCTTCGTTCAAACATTGCTAGAAGCCTTTCAGAGTTAGAAATGTTTACAGAGGACGGAGAAAATATGGATACTCCCAAGAGGAAAAGTGCCATTAATGAAAGAATAGAAGATCTTGTAAGCGCATCTTTAGCTGTTGAAGACGCTCTCGTGGGACTATTTGACCATAGCGATCACACACTTCAAAGACGGGTTGTTGAGACTTATATTCGCAGATTATACCAGCCCTACGTCGTTAAAGATAGCGTGAGGATGCAGTGGCACCGTTCTGGTCTTCTTGCTTCCTGGGAGTTCCTAGAGGAGCATATGGAAAGAAAAAACATTGGCTTAGACGATCCCGACACATCTGAAAAAGGATTGGTTGAGAAGCGTAGTAAGAGAAAATGGGGGGCTATGGTTATAATCAAATCTTTGCAGTTTCTTCCAAGTATAATAAGTGCAGCATTGAGAGAAACAAAGCACAACGACTATGAAACTGCCGGAGCTCCTTTATCTGGCAATATGATGCACATTGCTATTGTGGGCATCAACAACCAGATGAGTCTGCTTCAGGACAGTGGGGATGAAGACCAAGCTCAGGAAAGAGTAAACAAGTTGGCCAAAATTCTTAAAGAGGAAGAAGTGAGTTCAAGCCTCTGTTCTGCCGGTGTTGGTGTAATCAGCTGTATAATTCAGCGAGATGAAGGACGAACACCCATGAGACATTCTTTCCATTGGTCGTTGGAGAAACAGTATTATGTAGAAGAGCCGTTGCTGCGTCATCTTGAACCTCCTCTGTCCATTTACCTTGAGTTGGATAAGCTGAAAGGATACTCAAATATACAATATACGCCTTCTCGAGATCGTCAATGGCATCTGTATACTGTTACAGACAAGCCAGTGCCAATCAAGAGGATGTTCCTGAGATCTCTTGTTCGACAGGCTACAATGAACGATGGATTTATATTGCAGCAAGGGCAGGATAAGCAGCTTAGCCAAACACTGATCTCCATGGCGTTTACGTCGAAATGTGTTCTGAGGTCTTTGATGGATGCCATGGAGGAACTGGAACTGAATGCCCATAATGCTGCAATGAAACCAGATCACGCACATATGTTTCTTTGCATATTGCGTGAGCAGCAGATAGATGATCTTGTGCCTTTCCCCAGGAGAGTTGAAGTGAATGCGGAGGATGAAGAAACTACAGTTGAAATGATCTTAGAAGAAGCAGCACGAGAGATACATAGATCTGTTGGAGTGAGAATGCATAGGTTGGGCGTGTGCGAGTGGGAAGTGCGGCTGTGGTTGGTGTCCTCTGGACTGGCATGTGGTGCTTGGAGGGTTGTGGTTGCAAACGTGACAGGCCGTACATGCACTGTCCACATATACCGAGAAGTTGAAACTCCTGGAAGAAACAGTTTAATCTACCACTCAATAACCAAGAAGGGACCTTTGCATGAAACACCAATCAGTGATCAATATAAGCCCCTGGGATATCTCGACAGGCAACGTTTAGCAGCAAGGAGGAGTAACACTACTTATTGCTATGACTTCCCGTTGGCATTTGGGACAGCCTTGGAACTGTTGTGGGCATCACAACACCCAGGAGTTAAGAAACCATATAAGGATACTCTGATCAATGTTAAAGAGCTTGTATTCTCAAAACCAGAAGGTTCTTCGGGTACATCTCTAGATCTGGTTGAAAGACCACCCGGTCTCAACGACTTTGGAATGGTTGCCTGGTGCCTAGATATGTCGACCCCAGAGTTTCCTATGGGGCGGAAACTTCTCGTGATTGCGAATGATGTCACCTTCAAAGCTGGTTCTTTTGGTCCTAGAGAGGACGCGTTTTTCCTTGCTGTTACTGAACTCGCTTGTGCCAAGAAGCTTCCCTTGATTTACTTGGCAGCAAATTCTGGTGCCCGACTTGGGGTTGCTGAAGAAGTCAAAGCCTGCTTCAAAGTTGGATGGTCGGATGAAATTTCCCCTGAGAATGGTTTTCAGTATATATACCTAAGCCCTGAAGACCACGAAAGGATTGGATCATCTGTCATTGCCCATGAAGTAAAGCTCTCTAGTGGGGAAACTAGGTGGGTGATTGATACGATCGTTGGCAAAGAAGATGGTATTGGTGTAGAGAACTTAACAGGAAGTGGGGCCATAGCGGGTGCTTACTCAAAGGCATACAATGAAACTTTTACTTTAACCTTTGTTAGTGGAAGAACGGTTGGAATTGGTGCTTATCTTGCCCGCCTAGGTATGCGGTGCATACAGAGACTTGATCAGCCGATCATCTTGACTGGCTTCTCTACACTCAACAAGTTACTTGGGCGTGAGGTCTATAGCTCTCACATGCAACTGGGTGGCCCGAAAATCATGGGCACAAATGGTGTTGTTCATCTTACAGTCTCAGATGATCTTGAAGGCGTATCAGCAATTCTCAACTGGCTCAGCTACATTCCTGCTTACGTGGGTGGTCCTCTTCCTGTTCTTGCCCCTTTAGATCCACCGGAGAGAATTGTGGAGTATGTCCCAGAGAACTCTTGCGACCCACGAGCGGCTATAGCTGGGGTCAAAGACAATACCGGTAAATGGCTTGGAGGTATCTTTGATAAAAATAGTTTCATTGAGACTCTTGAAGGCTGGGCAAGGACGGTAGTGACTGGTAGAGCCAAGCTCGGGGGAATACCCGTTGGAGTTGTTGCAGTTGAGACACAGACTGTCATGCAGATCATCCCAGCCGATCCTGGACAGCTTGACTCTCATGAAAGAGTGGTTCCGCAAGCAGGGCAAGTCTGGTTTCCTGATTCAGCGGCCAAGACTGCTCAAGCGCTTATGGATTTCAACCGGGAAGAGCTTCCATTGTTTATCCTAGCGAACTGGAGAGGGTTTTCAGGTGGGCAGAGAGATCTTTTCGAAGGAATACTTCAGGCAGGTTCAACTATAGTAGAAAATCTGAGAACCTATCGTCAGCCAGTGTTTGTGTACATCCCAATGATGGGAGAGCTGCGCGGTGGAGCGTGGGTTGTTGTTGACAGCCAGATAAATTCGGATTATGTTGAAATGTATGCTGATGAAACAGCTCGTGGAAATGTGCTTGAGCCAGAAGGGACAATAGAGATAAAATTTAGAACAAAAGAGCTATTAGAGTGCATGGGAAGGTTGGACCAGAAGCTAATCAGTCTGAAAGCAAAACTGCAAGATGCCAAGCAAAGCGAGGCCTATGCAAACATCGAGCTTCTCCAGCAACAGATTAAAGCCCGAGAGAAACAGCTTTTACCAGTTTATATCCAAATCGCCACCAAATTTGCAGAACTTCATGACACTTCCATGAGAATGGCTGCAAAGGGAGTGATCAAAAGTGTTGTGGAATGGAGCGGCTCGCGGTCCTTCTTCTACAAAAAGCTCAATAGGAGAATCGCTGAGAGCTCTCTTGTGAAAAACGTAAGAGAAGCATCTGGAGACAACTTAGCATATAAATCTTCAATGCGTCTGATTCAGGATTGGTTCTGCAACTCTGATATTGCAAAGGGGAAAGAAGAAGCTTGGACAGACGACCAAGTGTTCTTTACATGGAAGGACAATGTTAGTAACTACGAGTTGAAGCTGAGCGAGTTGAGAGCGCAGAAACTACTGAACCAACTTGCAGAGATTGGGAATTCCTCAGATTTGCAAGCTCTGCCACAAGGACTTGCTAATCTTCTAAACAAGGTGGAGCCGTCGAAAAGAGAAGAGCTGGTGGCTGCTATTCGAAAGGTCTTGGGTTGACTGATATCGAAGACTTTAGCTTCTAATCCAAGAAAGATGGACATTTAAAGTTTGCTTGTGTCCGTTTGGATTGATAATTATATATTTGTTGGTCACAGTTGTAAATGTTGTTGTAGCTTTGTCATTTCCGTATAAACAAATACGCAATAATTCATTCAAC";
>
> String str2 =
> "TAAAGTCTTCGATATCAGTCAACCCAAGACCTTTCGAATAGCAGCCACCAGCTCTTCTCTTTTCGACGGCTCCACCTTGTTTAGAAGATTAGCAAGTCCTTGTGGCAGAGCTTGCAAATCTGAGGAATTCCCAATCTCTGCAAGTTGGTTCAGTAGTTTCTGCGCTCTCAACTCGCTCAGCTTCAACTCGTAGTTACTAACATTGTCCTTCCATGTAAAGAACACTTGGTCGTCTGTCCAAGCTTCTTCTTTCCCCTTTGCAATATCAGAGTTGCAGAACCAATCCTGAATCAGACGCATTGAAGATTTATATGCTAAGTTGTCTCCAGATGCTTCTCTTACGTTTTTTACAAGAGAGCTCTCAGCGATTCTCCTATTGAGCTTTTTGTAGAAGAAGGACCGCGAGCCGCTCCATTCCACAACACTTTTGATCACTCCCTTTGCAGCCATTCTCATGGAAGTGTCATGAAGTTCTGCAAATTTGGTGGCGATTTGGATATAAACTGGTAAAAGCTGTTTCTCTCGGGCTTTAATCTGTTGCTGGAGAAGCTCGATGTTTGCATAGGCCTCGCTTTGCTTGGCATCTTGCAGTTTTGCTTTCAGACTGATTAGCTTCTGGTCCAACCTTCCCATGCACTCTAATAGCTCTTTTGTTCTAAATTTTATCTCTATTGTCCCTTCTGGCTCGAGCACATTTCCACGAGCTGTTTCATCAGCATACATTTCAACATAATCCGAATTTATCTGGCTGTCAACAACAACCCACGCTCCACCGCGCAGCTCTCCCATCATTGGGATGTACACAAACACTGGCTGACGATAGGTTCTCAGATTTTCTACTATAGTTGAACCTGCCTGAAGTATTCCTTCGAAAAGATCTCTCTGCCCACCTGAAAACCCTCTCCAGTTCGCTAGGATAAACAATGGAAGCTCTTCCCGGTTGAAATCCATAAGTGCTTGAGCAGTCTTGGCCGCTGAATCAGGAAACCAGACTTGCCCTGCTTGCGGAACCACTCTTTCATGAGAGTCAAGCTGTCCAGGATCGGCTGGGATGATCTGCATGACAGTCTGTGTCTCAACTGCAACAACTCCAACGGGTATTCCCCCGAGCTTGGCTCTACCAGTCACTACCGTCCTTGCCCAGCCTTCAAGAGTCTCAATGAAACTATTTTTATCAAAGATACCTCCAAGCCATTTACCGGTATTGTCTTTGACCCCAGCTATAGCCGCTCGTGGGTCGCAAGAGTTCTCTGGGACATACTCCACAATTCTCTCCGGTGGATCTAAAGGGGCAAGAACAGGAAGAGGACCACCCACGTAAGCAGGAATGTAGCTGAGCCAGTTGAGAATTGCTGATACGCCTTCAAGATCATCTGAGACTGTAAGATGAACAACACCATTTGTGCCCATGATTTTCGGGCCACCCAGTTGCATGTGAGAGCTATAGACCTCACGCCCAAGTAACTTGTTGAGTGTAGAGAAGCCAGTCAAGATGATCGGCTGATCAAGTCTCTGTATGCACCGCATACCTAGGCGGGCAAGATAAGCACCAATTCCAACCGTTCTTCCACTAACAAAGGTTAAAGTAAAAGTTTCATTGTATGCCTTTGAGTAAGCACCCGCTATGGCCCCACTTCCTGTTAAGTTCTCTACACCAATACCATCTTCTTTGCCAACGATCGTATCAATCACCCACCTAGTTTCCCCACTAGGGAGCTTTACTTCATGGGCAATGACAGATGATCCAATCCTTTCGTGGTCTTCAGGGCTTAGGTATATATACTGAAAACCATTCTCAGGGGAAATTTCATCCGACCATCCAACTTTGAAGCAGGCTTTGACTTCTTCAGCAACCCCAAGTCGGGCACCAGAATTTGCTGCCAAGTAAATCAAGGGAAGCTTCTTGGCACAAGCGAGTTCAGTAACAGCAAGGAAAAACGCGTCCTCTCTAGGACCAAAAGAACCAGCTTTGAAGGTGACATCATTCGCAATCACGAGAAGTTTCCGCCCCATAGGAAACTCTGGGGTCGACATATCTAGGCACCAGGCAACCATTCCAAAGTCGTTGAGACCGGGTGGTCTTTCAACCAGATCTAGAGATGTACCCGAAGAACCTTCTGGTTTTGAGAATACAAGCTCTTTAACATTGATCAGAGTATCCTTATATGGTTTCTTAACTCCTGGGTGTTGTGATGCCCACAACAGTTCCAAGGCTGTCCCAAATGCCAACGGGAAGTCATAGCAATAAGTAGTGTTACTCCTCCTTGCTGCTAAACGTTGCCTGTCGAGATATCCCAGGGGCTTATATTGATCACTGATTGGGGTTTCATGCAAAGGTCCCTTCTTGGTTATTGAGTGGTAGATTAAACTGTTTCTTCCAGGAGTTTCAACTTCTCGGTATATGTGGACAGTGCATGTACGGCCTGTCACGTTTGCAACCACAACCCTCCAAGCACCACATGCCAGTCCAGAGGACACCAACCACAGCCGCACTTCCCACTCGCACACGCCCAACCTATGCATTCTCACTCCAACAGATCTATGTATCTCTCGTGCTGCTTCTTCTAAGATCATTTCAACTGTAGTTTCTTCATCCTCCGCATTCACTTCAACTCTCCTGGGGAAAGGCACAAGATCATCTATCTGCTGCTCACGCAATATGCAAAGAAACATATGTGCGTGATCTGGTTTCATTGCAGCATTATGGGCATTCAGTTCCAGTTCCTCCATGGCATCCATCAAAGACCTCAGAACACATTTCGACGTAAACGCCATGGAGATCAGTGTTTGGCTAAGCTGCTTATCCTGCCCTTGCTGCAATATAAATCCATCGTTCATTGTAGCCTGTCGAACAAGAGATCTCAGGAACATCCTCTTGATTGGCACTGGCTTGTCTGTAACAGTATACAGATGCCATTGACGATCTCGAGAAGGCGTATATTGTATATTTGAGTATCCTTTCAGCTTATCCAACTCAAGGTAAATGGACAGAGGAGGTTCAAGATGACGCAGCAACGGCTCTTCTACATAATACTGTTTCTCCAACGACCAATGGAAAGAATGTCTCATGGGTGTTCGTCCTTCATCTCGCTGAATTATACAGCTGATTACACCAACACCGGCAGAACAGAGGCTTGAACTCACTTCTTCCTCTTTAAGAATTTTGGCCAACTTGTTTACTCTTTCCTGAGCTTGGTCTTCATCCCCACTGTCCTGAAGCAGACTCATCTGGTTGTTGATGCCCACAATAGCAATGTGCATCATATTGCCAGATAAAGGAGCTCCGGCAGTTTCATAGTCGTTGTGCTTTGTTTCTCTCAATGCTGCACTTATTATACTTGGAAGAAACTGCAAAGATTTGATTATAACCATAGCCCCCCATTTTCTCTTACTACGCTTCTCAACCAATCCTTTTTCAGATGTGTCGTGATCGTCTAAGCCAATGTTTTTTCTTTCCATATGCTCCTCTAGGAAATCCCAGGAAGCAAGAAGACCAGAACGGTGCCACTGCATCCTCACGCTATCTTTAACGACGTAGGGCTGGTATAATCTGCGAATATAAGTCTCAACAACCCGTCTTTGAAGTGTGTGATCGCTATGGTCAAATAGTCCCACGAGAGCGTCTTCAACAGCTAAAGATGCGCTTACAAGATCTTCTATTCTTTCATTAATGGCACTTTTCCTCTTGGGAGTATCCATATTTTCTCCGTCCTCTGTAAACATTTCTAACTCTGAAAGGCTTCTAGCAATGTTTGAACGAAGCTCACTTAGTTTGGTCTGTTCAAGTAATTGACTCGCCTTGAGCGCCAACTCAGAGTAGTTAGTATGGTTAAGTGTTGAGAATCGAATAAGTTTATCTCTGTAAGCAGCAGGATTAGGGTAAACAAGCTGCTCCATGAGCCGGAGAACGAGTTTGTTTTTGTTTTTTATGCCCTGGTGTGAGAGCACTATATCCACAATTTTCAACAGATCTTTCTTGTATAGCTGACGCATGCGTTCTATAACATCAGCCAGCATGTTATCATTGAATAATTCTTCTACTGATAGATATTCTTCAAAGAGAGAATGAACAATAACACGGGCATGACTTTCTCTACCACCTTCATAAGATTTTGCAAGGCTCATCAATGGTTCAATGAGCCTTTCAAGGGCACCTCTCTCTTTCTCATCACAAGAAGATAAATGTGCCTCAAGAATGCCTTTTAAAAGTTTGGCAGGGAAATCGGTGGTCAAAGAGTTTCTGGAAATACTCTCAAATTCCCTATACTTTGATTCTAGCATGTTCCTGAGATTTTTAGGTAGTCGTGTCGCCAGAACTGCAAAGCACTCTTGCCACTGAAGAAATGGGAGTTCAGGGCTATCAAGGCAATTAAGTAAGTCTTGAACAACCTCATCTACTTTATGCTCATAGCCAGCAAGAATCATGCGTGCAGCATTTAATGTTGCGGCACATCTCTGATGAACTCTACCGGATATTGCAGTTGGAAGCCCTAATCTTGGGAAACTTCCATGGAAGGGTTCGGCCTTTCTTACAGCAGAAGGATCATCAAGATCAAGATTGGCGATAAGTTCACCAGCCTGCATGGCTTGTCCTTCAGACATTTTAAAATGGATAACTCCTGAAGCAGGTGAAAGAAGTGGCATGCACATCTTCATGACCTCAACTTCGGCATAAGGCGTATCAGCGTCAATATTGCTGTTGTCAGAAACCAAATACCTCATCAACTTGCACGGTGTCTCAGCCATTAACTTTGATGGATCATGGTCATTCTGTAGCAAACAAGTTCTTCCATCAATGAGAAGACGAGTTCCTGCAGCTTCTTCCTCTGCATATATCACATGGCTTTTGCCATCCAACTGCATCAACAGACCTCCATCACGTAGAGTGTGTATTTCTGCTACCACTTCTGACTTGTTCATTCTTAGCCTGTAGGTTCCTGATCCACCCCGGACTACATCAATCGTATATTTACTTCCTTCAATATTCAGAGACACTTGAGAATGCACAAGAGATATATGCTTTGGGGGAATTTGCCCCTTTTCTAGATAGCCAACGTAATCCGAAACTACAGCAGAACTGGTCGTAGATGCTTTATAAAGAGCCCCACCGACTACAGAGAGATACCATGGAGGTCTCTCTGCTCTGACCCGCATAGCAATCCTACTGTCCAACCAACCAGTGTGTATTTTGTTTTCCCGGTAATCAGAAGCATGTAGAAGGTCGATCGTGTAGTCAACGTTAGTCCTAATTTCTCCACGGATCTGAATTTCTTTTAGCCCAAGAACCATATTCGCTATCGCCAGGGCTCTGGATTCCCCAAATGCAAAAACATGTCCAAACTGGGAATCCGAGAACTCGTGGATGCCTCCACCAGACTTGACAGAGAAGTACGCCCACACATTTGGCTTGCTCTTAAAACTCAACTCCTGAACTCTACCGCTGGTTGGTTTGAACCCGTCATCAGGATCCTCACTTGTCACACGTACAGCCACACAATGACCTTTTGGCCTTATAGATTGAGCTTTATCAAAATCAAAAGGGAAGGCTACAACAGATGTTTTTCGCCAAGAATCATAACCTCCACCATGTTCTATTCCATAGAACCGTCTTATCTCAGGGATTTGCCAGAGAGGAATTCCCATCCCCACAGCAACTTGGGCAGCAGGAAGATTTATCTCGGCAATCCACTCAGTGACAGGATGCTCAACCTGTAAGCGAGGGTTAAGCTCTAAGAAGTAGTACTCCCCAGTGTCCATACTGTAGAGATACTCAACAGTAGCAGCTCCAACATAGTTAACACTCTTAGCCAACCTTCTAGCTGCTTGTTCAAGTTTCTTGACAGTTTCTGGCGGAGCCACAGTAATTGGACCCTCCTCTATGATCTTTTGATGTCTTCTCTGGACGCTACAATCACGGCTATGCAGAGCTGAAACATTTCCATGCTTGTCACAGAGCAGCTGGACCTCTAGATGCCGACTCTGTGACGCAACCTTCATTATGAATATTGGTGAGCCTGGGACCTCACCCTGAACTTGCTTGAATAGAGCCCTAACCTCATCATCATTATGAACCTTCCTGATTCCTTTACCACCACCACCCCACGATGCTTTGATCATTGCTGGGTAACCGACAACTTGACAGCTAGCAATCGCTTCTTCAGTTGTGTAGACACATGCTTGCCGGTAGATCTCCTCTGGGATGGTTACCAAGTTGCTATTAGGAGGTATTTTAACATGGGAACCACTCCATGGCAGAGTGGGTACATCAGCAGCTTGTGCAATCAACGAAGAACCAATCTTATCTCCCAGTGCTGCCATTGAAGATGCTGGAGGACCAAGAAATATGATTCCTTTTGCATCTAGGGCATCAGGTAATTCGGGGTTTTCAGATGCATGACCCCAACCAGGCCAAACTGCATCCACGCGTGTTACTTCAGCCATCTCCACAATCAGCTGAACGTTAGCATAATTGTTATTGTTAGTTCCTCCGGGAACCTCAACAAACTGATCAGCGATTCTGATATGCTCCGCATTGATCCGCATGTCTTCAGGGGTTGCCATCCCCACCAACAATATGGCTTTTTCCGTACCAAATGTTTCATAAGCCCATGTTCTGACACTACGTATAAACTTCACAGCCGCCATTCCATTGTTAGCTATCAAAATACTATGGATCGGCCTTTTCCCTCTAAGTGCTTTACAGAACTCATCCACTTGAGACACCGTCTCATAATTTATACCAGGTCCTACAGCACTATGATTCCCGTTAACCGAGCCAGCCATTGTCACTGCCCTTTAATCTTCAGATATATCTTGTAAGGAAGCAGA";
>
> DNASequence target = new DNASequence(str1,
> AmbiguityDNACompoundSet.getDNACompoundSet());
>
> DNASequence query = new DNASequence(str2,
> AmbiguityDNACompoundSet.getDNACompoundSet());
>
> NeedlemanWunsch aligner = new NeedlemanWunsch(query, target, gap, matrix);
>
> System.out.println("getScore: " + aligner.getScore());
> System.out.println("getMaxScore: " + aligner.getMaxScore());
> System.out.println("getMinScore: " + aligner.getMinScore());
> System.out.println("getSimilarity: " + aligner.getSimilarity());
>    }
> }
>
>
>
> Regards,
> Alexander Beskrovnyy
>
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biojava-l

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-l/attachments/20141106/56c8f611/attachment-0001.html>


More information about the Biojava-l mailing list