X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2Fscoremodels%2FScoreMatrixTest.java;fp=test%2Fjalview%2Fanalysis%2Fscoremodels%2FScoreMatrixTest.java;h=5c699d1d32def3f538becc6f61975ff7c6b66e2f;hb=613a7a5d1fe2758f0bb620e49eeb87fa45b5458f;hp=5051bf625bc2a3ddfbf2bf0d439ce5fa856daab2;hpb=efa724edf32b5803396087cf7c94521e3d597836;p=jalview.git diff --git a/test/jalview/analysis/scoremodels/ScoreMatrixTest.java b/test/jalview/analysis/scoremodels/ScoreMatrixTest.java index 5051bf6..5c699d1 100644 --- a/test/jalview/analysis/scoremodels/ScoreMatrixTest.java +++ b/test/jalview/analysis/scoremodels/ScoreMatrixTest.java @@ -148,10 +148,10 @@ public class ScoreMatrixTest assertEquals(sm.getMatrixIndex('D'), 3); assertEquals(sm.getMatrixIndex('X'), 22); assertEquals(sm.getMatrixIndex('x'), 22); - assertEquals(sm.getMatrixIndex(' '), 23); + assertEquals(sm.getMatrixIndex('-'), 23); assertEquals(sm.getMatrixIndex('*'), 24); assertEquals(sm.getMatrixIndex('.'), -1); - assertEquals(sm.getMatrixIndex('-'), -1); + assertEquals(sm.getMatrixIndex(' '), -1); assertEquals(sm.getMatrixIndex('?'), -1); assertEquals(sm.getMatrixIndex((char) 128), -1); } @@ -167,10 +167,9 @@ public class ScoreMatrixTest public void testComputePairwiseScores() { /* - * NB score matrix assumes space for gap - Jalview converts - * space to gap before computing PCA or Tree + * NB score matrix expects '-' for gap */ - String[] seqs = new String[] { "FKL", "R D", "QIA", "GWC" }; + String[] seqs = new String[] { "FKL", "R-D", "QIA", "GWC" }; ScoreMatrix sm = ScoreModels.getInstance().getBlosum62(); MatrixI pairwise = sm.findSimilarities(seqs, SimilarityParams.Jalview); @@ -253,16 +252,11 @@ public class ScoreMatrixTest @Test(groups = "Functional") public void testcomputeSimilarity_matchLongestSequence() { - // TODO params.matchGaps() is not used for ScoreMatrix - // - includeGaps is sufficient (there is no denominator) - // ==> bespoke parameters only 3 booleans? /* - * for now, using space for gap to match callers of - * AlignmentView.getSequenceStrings() - * may change this to '-' (with corresponding change to matrices) + * ScoreMatrix expects '-' for gaps */ - String s1 = "FR K S"; - String s2 = "FS L"; + String s1 = "FR-K-S"; + String s2 = "FS--L"; ScoreMatrix blosum = ScoreModels.getInstance().getBlosum62(); /* @@ -318,16 +312,11 @@ public class ScoreMatrixTest @Test(groups = "Functional") public void testcomputeSimilarity_matchShortestSequence() { - // TODO params.matchGaps() is not used for ScoreMatrix - // - includeGaps is sufficient (there is no denominator) - // ==> bespoke parameters only 3 booleans? /* - * for now, using space for gap to match callers of - * AlignmentView.getSequenceStrings() - * may change this to '-' (with corresponding change to matrices) + * ScoreMatrix expects '-' for gaps */ - String s1 = "FR K S"; - String s2 = "FS L"; + String s1 = "FR-K-S"; + String s2 = "FS--L"; ScoreMatrix blosum = ScoreModels.getInstance().getBlosum62(); /*