From 81f1e29b00bc98403d45d2258da71ac19c425c57 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 27 Mar 2017 13:49:06 +0100 Subject: [PATCH] JAL-2416 tidy up after switch from ' ' to '-' in score matrices --- src/jalview/analysis/scoremodels/ScoreMatrix.java | 2 +- test/jalview/analysis/AlignSeqTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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)); } -- 1.7.10.2