From: gmungoc Date: Mon, 27 Mar 2017 12:49:06 +0000 (+0100) Subject: JAL-2416 tidy up after switch from ' ' to '-' in score matrices X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~46 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=81f1e29b00bc98403d45d2258da71ac19c425c57;p=jalview.git JAL-2416 tidy up after switch from ' ' to '-' in score matrices --- diff --git a/src/jalview/analysis/scoremodels/ScoreMatrix.java b/src/jalview/analysis/scoremodels/ScoreMatrix.java index b904432..f7da9f3 100644 --- a/src/jalview/analysis/scoremodels/ScoreMatrix.java +++ b/src/jalview/analysis/scoremodels/ScoreMatrix.java @@ -394,7 +394,7 @@ public class ScoreMatrix implements SimilarityScoreModelI, SimilarityParamsI options) { char gapChar = scoreGapAsAny ? (seqstrings.isNa() ? 'N' : 'X') - : Comparison.GAP_DASH; + : gapCharacter; String[] seqs = seqstrings.getSequenceStrings(gapChar); return findSimilarities(seqs, options); } diff --git a/test/jalview/analysis/AlignSeqTest.java b/test/jalview/analysis/AlignSeqTest.java index c12f544..85f619b 100644 --- a/test/jalview/analysis/AlignSeqTest.java +++ b/test/jalview/analysis/AlignSeqTest.java @@ -60,7 +60,7 @@ public class AlignSeqTest AlignSeq as = new AlignSeq(new Sequence("s1", "TTAG"), new Sequence( "s2", "ACGT"), AlignSeq.DNA); int[] expected = new int[] { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, -1, 11, -1 }; + 7, 7, 8, 8, 9, 9, -1, -1, 10, -1 }; String s = "aAcCgGtTuUiIxXrRyYnN .-?"; assertArrayEquals(expected, as.indexEncode(s)); } @@ -70,8 +70,8 @@ public class AlignSeqTest { AlignSeq as = new AlignSeq(new Sequence("s1", "PFY"), new Sequence( "s2", "RQW"), AlignSeq.PEP); - int[] expected = new int[] { 0, 0, 1, 1, 2, 2, 21, 21, 22, 22, 23, 24, - -1, -1, -1 }; + int[] expected = new int[] { 0, 0, 1, 1, 2, 2, 21, 21, 22, 22, -1, 24, + -1, 23, -1 }; String s = "aArRnNzZxX *.-?"; assertArrayEquals(expected, as.indexEncode(s)); }