From 2fce8a6335c88e579ec0a5c39e1978fd41b07ccf Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 26 Oct 2017 23:22:42 +0100 Subject: [PATCH] Start of matrix converter --- .../JalviewMatrixToForesterMatrix.java | 24 ---------- src/jalview/ext/archaeopteryx/MatrixConverter.java | 50 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 24 deletions(-) delete mode 100644 src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java create mode 100644 src/jalview/ext/archaeopteryx/MatrixConverter.java diff --git a/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java b/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java deleted file mode 100644 index 6944573..0000000 --- a/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java +++ /dev/null @@ -1,24 +0,0 @@ -package jalview.ext.archaeopteryx; - -import jalview.math.MatrixI; - -import org.forester.evoinference.matrix.distance.DistanceMatrix; - -public class JalviewMatrixToForesterMatrix -{ - - public static DistanceMatrix convertJalviewToForester( - MatrixI jalviewInput) - { - return null; - - } - - public static MatrixI convertForesterToJalview( - DistanceMatrix foresterInput) - { - return null; - - } - -} diff --git a/src/jalview/ext/archaeopteryx/MatrixConverter.java b/src/jalview/ext/archaeopteryx/MatrixConverter.java new file mode 100644 index 0000000..779d7a3 --- /dev/null +++ b/src/jalview/ext/archaeopteryx/MatrixConverter.java @@ -0,0 +1,50 @@ +package jalview.ext.archaeopteryx; + +import jalview.math.MatrixI; + +import org.forester.evoinference.matrix.distance.DistanceMatrix; + +public class MatrixConverter +{ + DistanceMatrix foresterMatrix; + + MatrixI jalviewMatrix; + + public static MatrixConverter createConverter( + DistanceMatrix foresterInputMatrix) + { + MatrixConverter converter = new MatrixConverter(); + converter.setForesterMatrix(foresterInputMatrix); + return converter; + + } + + public static MatrixConverter createConverter(MatrixI jalviewInputMatrix) + { + MatrixConverter converter = new MatrixConverter(); + converter.setJalviewMatrix(jalviewInputMatrix); + return converter; + + } + + protected DistanceMatrix getForesterMatrix() + { + return foresterMatrix; + } + + protected void setForesterMatrix(DistanceMatrix foresterMatrix) + { + this.foresterMatrix = foresterMatrix; + } + + protected MatrixI getJalviewMatrix() + { + return jalviewMatrix; + } + + protected void setJalviewMatrix(MatrixI jalviewMatrix) + { + this.jalviewMatrix = jalviewMatrix; + } + +} -- 1.7.10.2