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);
}
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);
@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();
/*
@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();
/*