From: gmungoc Date: Tue, 11 Apr 2017 13:34:50 +0000 (+0100) Subject: JAL-2403 improved ScoreModelI hierarchy as per Kira's review suggestions X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~23 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=aba253e57b22ce7d1f4fe376935e42aeb4f6d591;p=jalview.git JAL-2403 improved ScoreModelI hierarchy as per Kira's review suggestions --- diff --git a/src/jalview/analysis/PCA.java b/src/jalview/analysis/PCA.java index d8863f7..3ec7995 100755 --- a/src/jalview/analysis/PCA.java +++ b/src/jalview/analysis/PCA.java @@ -20,11 +20,8 @@ */ package jalview.analysis; -import jalview.analysis.scoremodels.PIDModel; -import jalview.api.analysis.DistanceScoreModelI; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.SimilarityScoreModelI; import jalview.datamodel.AlignmentView; import jalview.math.MatrixI; @@ -172,7 +169,7 @@ public class PCA implements Runnable // long now = System.currentTimeMillis(); try { - eigenvector = computeSimilarity(); + eigenvector = scoreModel.findSimilarities(seqs, similarityParams); details.append(" --- OrigT * Orig ---- \n"); eigenvector.print(ps, "%8.2f"); @@ -215,50 +212,6 @@ public class PCA implements Runnable } /** - * Computes a pairwise similarity matrix for the given sequence regions using - * the configured score model. If the score model is a similarity model, then - * it computes the result directly. If it is a distance model, then use it to - * compute pairwise distances, and convert these to similarity scores. - * - * @param av - * @return - */ - MatrixI computeSimilarity() - { - MatrixI result = null; - if (scoreModel instanceof SimilarityScoreModelI) - { - result = ((SimilarityScoreModelI) scoreModel).findSimilarities(seqs, - similarityParams); - if (scoreModel instanceof PIDModel) - { - /* - * scale score to width of alignment for backwards - * compatibility with Jalview 2.10.1 SeqSpace PCA calculation - */ - result.multiply(seqs.getWidth() / 100d); - } - } - else if (scoreModel instanceof DistanceScoreModelI) - { - /* - * find distances and convert to similarity scores - * reverseRange(false) preserves but reverses the min-max range - */ - result = ((DistanceScoreModelI) scoreModel).findDistances(seqs, - similarityParams); - result.reverseRange(false); - } - else - { - System.err - .println("Unexpected type of score model, cannot calculate similarity"); - } - - return result; - } - - /** * Answers the N dimensions of the NxN PCA matrix. This is the number of * sequences involved in the pairwise score calculation. * diff --git a/src/jalview/analysis/TreeBuilder.java b/src/jalview/analysis/TreeBuilder.java index 5381880..effef9a 100644 --- a/src/jalview/analysis/TreeBuilder.java +++ b/src/jalview/analysis/TreeBuilder.java @@ -1,9 +1,7 @@ package jalview.analysis; -import jalview.api.analysis.DistanceScoreModelI; import jalview.api.analysis.ScoreModelI; import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.SimilarityScoreModelI; import jalview.datamodel.AlignmentView; import jalview.datamodel.CigarArray; import jalview.datamodel.SeqCigar; @@ -276,22 +274,7 @@ public abstract class TreeBuilder */ protected void computeTree(ScoreModelI sm, SimilarityParamsI scoreOptions) { - if (sm instanceof DistanceScoreModelI) - { - distances = ((DistanceScoreModelI) sm).findDistances(seqData, - scoreOptions); - } - else if (sm instanceof SimilarityScoreModelI) - { - /* - * compute similarity and invert it to give a distance measure - * reverseRange(true) converts maximum similarity to zero distance - */ - MatrixI result = ((SimilarityScoreModelI) sm).findSimilarities( - seqData, scoreOptions); - result.reverseRange(true); - distances = result; - } + distances = sm.findDistances(seqData, scoreOptions); makeLeaves(); diff --git a/src/jalview/analysis/scoremodels/DistanceScoreModel.java b/src/jalview/analysis/scoremodels/DistanceScoreModel.java new file mode 100644 index 0000000..14c9667 --- /dev/null +++ b/src/jalview/analysis/scoremodels/DistanceScoreModel.java @@ -0,0 +1,28 @@ +package jalview.analysis.scoremodels; + +import jalview.api.analysis.ScoreModelI; +import jalview.api.analysis.SimilarityParamsI; +import jalview.datamodel.AlignmentView; +import jalview.math.MatrixI; + +public abstract class DistanceScoreModel implements ScoreModelI +{ + /** + * A similarity score is calculated by first computing a distance score, and + * then reversing the min-max range of the score values + */ + @Override + public MatrixI findSimilarities(AlignmentView seqData, + SimilarityParamsI options) + { + MatrixI result = findDistances(seqData, options); + + /* + * reverse the range of score values so that + * max becomes min and vice versa + */ + result.reverseRange(false); + + return result; + } +} diff --git a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java index 5bf4b11..f88180a 100644 --- a/src/jalview/analysis/scoremodels/FeatureDistanceModel.java +++ b/src/jalview/analysis/scoremodels/FeatureDistanceModel.java @@ -22,7 +22,6 @@ package jalview.analysis.scoremodels; import jalview.api.AlignmentViewPanel; import jalview.api.FeatureRenderer; -import jalview.api.analysis.DistanceScoreModelI; import jalview.api.analysis.SimilarityParamsI; import jalview.api.analysis.ViewBasedAnalysisI; import jalview.datamodel.AlignmentView; @@ -38,7 +37,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -public class FeatureDistanceModel implements DistanceScoreModelI, +public class FeatureDistanceModel extends DistanceScoreModel implements ViewBasedAnalysisI { private static final String NAME = "Sequence Feature Similarity"; diff --git a/src/jalview/analysis/scoremodels/PIDModel.java b/src/jalview/analysis/scoremodels/PIDModel.java index 3e940af..d537e33 100644 --- a/src/jalview/analysis/scoremodels/PIDModel.java +++ b/src/jalview/analysis/scoremodels/PIDModel.java @@ -2,7 +2,6 @@ package jalview.analysis.scoremodels; import jalview.api.analysis.PairwiseScoreModelI; import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.SimilarityScoreModelI; import jalview.datamodel.AlignmentView; import jalview.math.Matrix; import jalview.math.MatrixI; @@ -11,7 +10,7 @@ import jalview.util.Comparison; /** * A class to provide sequence pairwise similarity based on residue identity */ -public class PIDModel implements SimilarityScoreModelI, +public class PIDModel extends SimilarityScoreModel implements PairwiseScoreModelI { private static final String NAME = "PID"; @@ -77,12 +76,42 @@ public class PIDModel implements SimilarityScoreModelI, return c; } + /** + * Computes similarity scores based on pairwise percentage identity of + * sequences. For consistency with Jalview 2.10.1's SeqSpace mode PCA + * calculation, the percentage scores are rescaled to the width of the + * sequences (as if counts of identical residues). + */ @Override public MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options) { String[] seqs = seqData.getSequenceStrings(Comparison.GAP_DASH); - return findSimilarities(seqs, options); + + MatrixI result = findSimilarities(seqs, options); + + result.multiply(seqData.getWidth() / 100d); + + return result; + } + + /** + * A distance score is computed in the usual way (by reversing the range of + * the similarity score results), and then rescaled to percentage values + * (reversing the rescaling to count values done in findSimilarities) + */ + @Override + public MatrixI findDistances(AlignmentView seqData, + SimilarityParamsI options) + { + MatrixI result = super.findDistances(seqData, options); + + if (seqData.getWidth() != 0) + { + result.multiply(100d / seqData.getWidth()); + } + + return result; } /** diff --git a/src/jalview/analysis/scoremodels/ScoreMatrix.java b/src/jalview/analysis/scoremodels/ScoreMatrix.java index 8bc2c04..8b1ad2e 100644 --- a/src/jalview/analysis/scoremodels/ScoreMatrix.java +++ b/src/jalview/analysis/scoremodels/ScoreMatrix.java @@ -22,7 +22,6 @@ package jalview.analysis.scoremodels; import jalview.api.analysis.PairwiseScoreModelI; import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.SimilarityScoreModelI; import jalview.datamodel.AlignmentView; import jalview.math.Matrix; import jalview.math.MatrixI; @@ -34,7 +33,7 @@ import java.util.Arrays; * A class that models a substitution score matrix for any given alphabet of * symbols */ -public class ScoreMatrix implements SimilarityScoreModelI, +public class ScoreMatrix extends SimilarityScoreModel implements PairwiseScoreModelI { private static final char GAP_CHARACTER = Comparison.GAP_DASH; diff --git a/src/jalview/analysis/scoremodels/SimilarityScoreModel.java b/src/jalview/analysis/scoremodels/SimilarityScoreModel.java new file mode 100644 index 0000000..d41e0ba --- /dev/null +++ b/src/jalview/analysis/scoremodels/SimilarityScoreModel.java @@ -0,0 +1,30 @@ +package jalview.analysis.scoremodels; + +import jalview.api.analysis.ScoreModelI; +import jalview.api.analysis.SimilarityParamsI; +import jalview.datamodel.AlignmentView; +import jalview.math.MatrixI; + +public abstract class SimilarityScoreModel implements ScoreModelI +{ + + /** + * Computed similarity scores are converted to distance scores by subtracting + * every value from the maximum value. That is, maximum similarity corresponds + * to zero distance, and smaller similarities to larger distances. + */ + @Override + public MatrixI findDistances(AlignmentView seqData, + SimilarityParamsI options) + { + MatrixI result = findSimilarities(seqData, options); + + /* + * reverse the range of the scores mapping the maximum to zero + */ + result.reverseRange(true); + + return result; + } + +} diff --git a/src/jalview/analysis/scoremodels/SmithWatermanModel.java b/src/jalview/analysis/scoremodels/SmithWatermanModel.java index 190b88f..2428b81 100644 --- a/src/jalview/analysis/scoremodels/SmithWatermanModel.java +++ b/src/jalview/analysis/scoremodels/SmithWatermanModel.java @@ -22,7 +22,6 @@ package jalview.analysis.scoremodels; import jalview.analysis.AlignSeq; import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.SimilarityScoreModelI; import jalview.datamodel.AlignmentView; import jalview.datamodel.SequenceI; import jalview.math.Matrix; @@ -33,7 +32,7 @@ import jalview.util.Comparison; * A class that computes pairwise similarity scores using the Smith-Waterman * alignment algorithm */ -public class SmithWatermanModel implements SimilarityScoreModelI +public class SmithWatermanModel extends SimilarityScoreModel { private static final String NAME = "Smith Waterman Score"; diff --git a/src/jalview/api/analysis/DistanceScoreModelI.java b/src/jalview/api/analysis/DistanceScoreModelI.java deleted file mode 100644 index 0a39c0b..0000000 --- a/src/jalview/api/analysis/DistanceScoreModelI.java +++ /dev/null @@ -1,26 +0,0 @@ -package jalview.api.analysis; - -import jalview.datamodel.AlignmentView; -import jalview.math.MatrixI; - -/** - * A sequence distance score models, that provides a method to compute distances - * between pairs of sequences. The options parameter provides configuration - * choices for how the similarity score is calculated. - * - * @author gmcarstairs - * - */ -public interface DistanceScoreModelI extends ScoreModelI -{ - /** - * Returns a distance score for the given sequence regions, that is, a matrix - * whose value [i][j] is the distance of sequence i from sequence j by some - * measure - * - * @param seqData - * @param options - * @return - */ - MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options); -} diff --git a/src/jalview/api/analysis/ScoreModelI.java b/src/jalview/api/analysis/ScoreModelI.java index 7352a71..6afd483 100644 --- a/src/jalview/api/analysis/ScoreModelI.java +++ b/src/jalview/api/analysis/ScoreModelI.java @@ -1,5 +1,8 @@ package jalview.api.analysis; +import jalview.datamodel.AlignmentView; +import jalview.math.MatrixI; + public interface ScoreModelI { /** @@ -37,4 +40,29 @@ public interface ScoreModelI boolean isProtein(); // TODO getName, isDNA, isProtein can be static methods in Java 8 + + /** + * Returns a distance score for the given sequence regions, that is, a matrix + * whose value [i][j] is the distance of sequence i from sequence j by some + * measure. The options parameter provides configuration choices for how the + * similarity score is calculated. + * + * @param seqData + * @param options + * @return + */ + + MatrixI findDistances(AlignmentView seqData, SimilarityParamsI options); + + /** + * Returns a similarity score for the given sequence regions, that is, a + * matrix whose value [i][j] is the similarity of sequence i to sequence j by + * some measure. The options parameter provides configuration choices for how + * the similarity score is calculated. + * + * @param seqData + * @param options + * @return + */ + MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options); } diff --git a/src/jalview/api/analysis/SimilarityScoreModelI.java b/src/jalview/api/analysis/SimilarityScoreModelI.java deleted file mode 100644 index 0c2624f..0000000 --- a/src/jalview/api/analysis/SimilarityScoreModelI.java +++ /dev/null @@ -1,26 +0,0 @@ -package jalview.api.analysis; - -import jalview.datamodel.AlignmentView; -import jalview.math.MatrixI; - -/** - * A class that provides a method to compute similarity scores of pairs of - * sequences - * - * @author gmcarstairs - * - */ -public interface SimilarityScoreModelI extends ScoreModelI -{ - /** - * Returns a similarity score for the given sequence regions, that is, a - * matrix whose value [i][j] is the similarity of sequence i to sequence j by - * some measure. The options parameter provides configuration choices for how - * the similarity score is calculated. - * - * @param seqData - * @param options - * @return - */ - MatrixI findSimilarities(AlignmentView seqData, SimilarityParamsI options); -} diff --git a/test/jalview/analysis/PCATest.java b/test/jalview/analysis/PCATest.java deleted file mode 100644 index bfcdf43..0000000 --- a/test/jalview/analysis/PCATest.java +++ /dev/null @@ -1,166 +0,0 @@ -package jalview.analysis; - -import static org.testng.Assert.assertNotNull; -import static org.testng.internal.junit.ArrayAsserts.assertArrayEquals; - -import jalview.analysis.scoremodels.FeatureDistanceModel; -import jalview.analysis.scoremodels.PIDModel; -import jalview.analysis.scoremodels.ScoreModels; -import jalview.analysis.scoremodels.SimilarityParams; -import jalview.api.analysis.ScoreModelI; -import jalview.api.analysis.SimilarityParamsI; -import jalview.api.analysis.ViewBasedAnalysisI; -import jalview.datamodel.AlignmentView; -import jalview.datamodel.SequenceFeature; -import jalview.datamodel.SequenceI; -import jalview.gui.AlignFrame; -import jalview.io.DataSourceType; -import jalview.io.FileLoader; -import jalview.math.MatrixI; - -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - -public class PCATest -{ - - private static final String TESTSEQS = ">s1\nAFRK\n>s2\nAFSS\n>s3\nAFTL\n>s4\nARSL\n"; - private AlignFrame af; - - @Test(groups = "Functional") - public void testComputeSimilarity_blosum62() - { - setUp(); - SimilarityParamsI params = new SimilarityParams(true, false, true, - false); - AlignmentView view = af.getViewport().getAlignmentView(false); - ScoreModelI blosum62 = ScoreModels.getInstance().getBlosum62(); - PCA pca = new PCA(view, blosum62, params); - - MatrixI result = pca.computeSimilarity(); - assertNotNull(result); - - /* - * AFRK^AFRK = 4+6+5+5 = 20 - * AFRK^AFSS = 4+6+-1+0 = 9 - * AFRK^AFTL = 4+6+-1+-2 = 7 - * AFRK^ARSL = 4+-3+-1+-2 = -2 - */ - assertArrayEquals(result.getRow(0), new double[] { 20, 9, 7, -2 }, - 0.00001d); - } - - @BeforeTest(alwaysRun = true) - public void setUp() - { - af = new FileLoader().LoadFileWaitTillLoaded(TESTSEQS, - DataSourceType.PASTE); - } - - @Test(groups = "Functional") - public void testComputeSimilarity_PID() - { - setUp(); - SimilarityParamsI params = new SimilarityParams(true, false, true, - false); - AlignmentView view = af.getViewport().getAlignmentView(false); - ScoreModelI pid = new PIDModel(); - PCA pca = new PCA(view, pid, params); - - MatrixI result = pca.computeSimilarity(); - assertNotNull(result); - - /* - * AFRK^AFRK = 4 scaled to width - * AFRK^AFSS = 2 - * AFRK^AFTL = 2 - * AFRK^ARSL = 1 - */ - assertArrayEquals(new double[] { 4d, 2d, 2d, 1d }, - result.getRow(0), 0.00001d); - } - - @Test(groups = "Functional") - public void testComputeSimilarity_featureDistances() - { - setUp(); - SimilarityParamsI params = new SimilarityParams(true, false, true, - false); - AlignmentView view = af.getViewport().getAlignmentView(false); - ScoreModelI featureModel = new FeatureDistanceModel(); - PCA pca = new PCA(view, featureModel, params); - - MatrixI result = pca.computeSimilarity(); - - /* - * no features = no scores! - */ - assertArrayEquals(new double[] { 0d, 0d, 0d, 0d }, - result.getRow(0), 0.00001d); - - SequenceI[] seqs = af.getViewport().getAlignment().getSequencesArray(); - seqs[0].addSequenceFeature(new SequenceFeature("Cath", "", 1, 4, 0f, - null)); - seqs[1].addSequenceFeature(new SequenceFeature("Cath", "", 1, 4, 0f, - null)); - seqs[2].addSequenceFeature(new SequenceFeature("Pfam", "", 1, 4, 0f, - null)); - seqs[3].addSequenceFeature(new SequenceFeature("Pfam", "", 2, 3, 0f, - null)); - - af.getFeatureRenderer().findAllFeatures(true); - ((ViewBasedAnalysisI) featureModel) - .configureFromAlignmentView(af.alignPanel); - - /* - * feature distance scores are (average number of features not shared): - * diagonal: 0 - * seq1^seq2 0 - * seq1^seq3 8 / 4 = 2 - * seq1^seq4 6 / 4 = 1.5 - * seq2^seq3 8 / 4 = 2 - * seq2^seq4 6 / 3 = 1.5 - * seq3^seq4 2 / 4 = 0.5 - * so - * { 0, 0, 2, 1.5 - * 0, 0, 2, 1.5 - * 2, 2, 0, 0.5 - * 1.5, 1.5, 0.5, 0 - * } - * subtract each value from the max value to get similarity scores - */ - result = pca.computeSimilarity(); - // assertArrayEquals(new double[] { 2d, 2d, 0d, 0.5d }, result.getRow(0), - // 0.00001d); - // assertArrayEquals(new double[] { 2d, 2d, 0d, 0.5d }, result.getRow(1), - // 0.00001d); - // assertArrayEquals(new double[] { 0d, 0d, 2d, 1.5d }, result.getRow(2), - // 0.00001d); - // assertArrayEquals(new double[] { 0.5d, 0.5d, 1.5d, 2d }, - // result.getRow(3), 0.00001d); - - /* - * JAL-2424 bug means instead we get distance scores of - * 8 / 5 = 1.6 - * 6 / 5 = 1.2 - * 2 / 5 = 0.4 - * so (until bug is fixed) - * { 0, 0, 1.6, 1.2 - * 0, 0, 1.6, 1.2 - * 1.6, 1.6, 0, 0.4 - * 1.2, 1.2, 0.4, 0 - * } - */ - assertArrayEquals(new double[] { 1.6d, 1.6d, 0d, 0.4d }, - result.getRow(0), - 0.00001d); - assertArrayEquals(new double[] { 1.6d, 1.6d, 0d, 0.4d }, - result.getRow(1), - 0.00001d); - assertArrayEquals(new double[] { 0d, 0d, 1.6d, 1.2d }, - result.getRow(2), - 0.00001d); - assertArrayEquals(new double[] { 0.4d, 0.4d, 1.2d, 1.6d }, - result.getRow(3), 0.00001d); - } -} diff --git a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java index 2411b55..02e64b6 100644 --- a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java @@ -266,7 +266,8 @@ public class FeatureDistanceModelTest // these left to fail pending resolution of // JAL-2424 (computing score as 5/6, should be 5/5) - assertEquals(distances.getValue(0, 1), 1f); + // see also PCATest.testComputeSimilarity_featureDistances() + assertEquals(distances.getValue(0, 1), 1f, "JAL-2424!"); assertEquals(distances.getValue(1, 0), 1f); } diff --git a/test/jalview/analysis/scoremodels/ScoreModelsTest.java b/test/jalview/analysis/scoremodels/ScoreModelsTest.java index 03513f1..ffcd1a8 100644 --- a/test/jalview/analysis/scoremodels/ScoreModelsTest.java +++ b/test/jalview/analysis/scoremodels/ScoreModelsTest.java @@ -4,10 +4,8 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; -import jalview.api.analysis.DistanceScoreModelI; import jalview.api.analysis.PairwiseScoreModelI; import jalview.api.analysis.ScoreModelI; -import jalview.api.analysis.SimilarityScoreModelI; import java.util.Iterator; @@ -19,7 +17,7 @@ public class ScoreModelsTest * Verify that the singleton constructor successfully loads Jalview's built-in * score models */ - @Test + @Test(groups = "Functional") public void testConstructor() { Iterator models = ScoreModels.getInstance().getModels() @@ -30,38 +28,38 @@ public class ScoreModelsTest * models are served in order of addition */ ScoreModelI sm = models.next(); - assertTrue(sm instanceof SimilarityScoreModelI); + assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); - assertFalse(sm instanceof DistanceScoreModelI); + assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "BLOSUM62"); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('I', 'R'), -3f); sm = models.next(); - assertTrue(sm instanceof SimilarityScoreModelI); + assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); - assertFalse(sm instanceof DistanceScoreModelI); + assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "PAM250"); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), -4f); sm = models.next(); - assertTrue(sm instanceof SimilarityScoreModelI); + assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); - assertFalse(sm instanceof DistanceScoreModelI); + assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "PID"); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'C'), 0f); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('R', 'r'), 1f); sm = models.next(); - assertTrue(sm instanceof SimilarityScoreModelI); + assertTrue(sm instanceof SimilarityScoreModel); assertTrue(sm instanceof PairwiseScoreModelI); - assertFalse(sm instanceof DistanceScoreModelI); + assertFalse(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "DNA"); assertEquals(((PairwiseScoreModelI) sm).getPairwiseScore('c', 'x'), 1f); sm = models.next(); - assertFalse(sm instanceof SimilarityScoreModelI); + assertFalse(sm instanceof SimilarityScoreModel); assertFalse(sm instanceof PairwiseScoreModelI); - assertTrue(sm instanceof DistanceScoreModelI); + assertTrue(sm instanceof DistanceScoreModel); assertEquals(sm.getName(), "Sequence Feature Similarity"); } @@ -71,7 +69,7 @@ public class ScoreModelsTest * suite. It makes no assertions and is just provided as a utility method for * printing out matrices. Relocated here from ScoreMatrixPrinter. */ - @Test + @Test(groups = "none") public void printAllMatrices_tabDelimited() { printAllMatrices(false); @@ -83,7 +81,7 @@ public class ScoreModelsTest * suite. It makes no assertions and is just provided as a utility method for * printing out matrices. Relocated here from ScoreMatrixPrinter. */ - @Test + @Test(groups = "none") public void printAllMatrices_asHtml() { printAllMatrices(true);