From: kjvdheide Date: Thu, 2 Nov 2017 12:11:33 +0000 (+0000) Subject: JAL-2795 moved matrix conversion to the ForesterMatrix class X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5cdc53bb8a76f6bd364188254e873437d7ac2c7f;p=jalview.git JAL-2795 moved matrix conversion to the ForesterMatrix class --- diff --git a/src/jalview/ext/archaeopteryx/MatrixConverter.java b/src/jalview/ext/archaeopteryx/MatrixConverter.java deleted file mode 100644 index ef44030..0000000 --- a/src/jalview/ext/archaeopteryx/MatrixConverter.java +++ /dev/null @@ -1,54 +0,0 @@ -package jalview.ext.archaeopteryx; - -import jalview.datamodel.SequenceI; -import jalview.ext.forester.ForesterMatrix; -import jalview.math.MatrixI; - -import org.forester.evoinference.matrix.distance.DistanceMatrix; - -public final class MatrixConverter -{ - /** - * Shouldn't get instantiated - */ - private MatrixConverter() - { - - } - - - public static DistanceMatrix convertJalviewToForester( - final MatrixI jalviewInputMatrix, - final SequenceI[] matrixSequences) - { - if (jalviewInputMatrix.width() != jalviewInputMatrix.height()) - { - // some kind of warning? - } - DistanceMatrix foresterMatrix = new ForesterMatrix(jalviewInputMatrix, - matrixSequences); - return foresterMatrix; - - - } - - public static DistanceMatrix convertJalviewToForester( - final MatrixI jalviewInputMatrix, - final String[] matrixIdentifiers) - { - if (jalviewInputMatrix.width() != jalviewInputMatrix.height()) - { - // some kind of warning? - } - - DistanceMatrix foresterMatrix = new ForesterMatrix(jalviewInputMatrix, - matrixIdentifiers); - return foresterMatrix; - - - } - - - - -} diff --git a/src/jalview/ext/forester/ForesterMatrix.java b/src/jalview/ext/forester/ForesterMatrix.java index e0f2994..a1381be 100644 --- a/src/jalview/ext/forester/ForesterMatrix.java +++ b/src/jalview/ext/forester/ForesterMatrix.java @@ -163,5 +163,34 @@ public class ForesterMatrix implements DistanceMatrix } + public static DistanceMatrix convertJalviewToForester( + final MatrixI jalviewInputMatrix, + final SequenceI[] matrixSequences) + { + if (jalviewInputMatrix.width() != jalviewInputMatrix.height()) + { + // some kind of warning? + } + DistanceMatrix foresterMatrix = new ForesterMatrix(jalviewInputMatrix, + matrixSequences); + return foresterMatrix; + + } + + public static DistanceMatrix convertJalviewToForester( + final MatrixI jalviewInputMatrix, + final String[] matrixIdentifiers) + { + if (jalviewInputMatrix.width() != jalviewInputMatrix.height()) + { + // some kind of warning? + } + + DistanceMatrix foresterMatrix = new ForesterMatrix(jalviewInputMatrix, + matrixIdentifiers); + return foresterMatrix; + + } + } \ No newline at end of file