From f3fde43f69bd21759da2273418b4a1a6fb7186fa Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 27 Mar 2017 10:09:22 +0100 Subject: [PATCH] JAL-2403 PIDDistanceModel deleted as superseded by PIDModel --- .../analysis/scoremodels/PIDDistanceModel.java | 88 -------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/jalview/analysis/scoremodels/PIDDistanceModel.java diff --git a/src/jalview/analysis/scoremodels/PIDDistanceModel.java b/src/jalview/analysis/scoremodels/PIDDistanceModel.java deleted file mode 100644 index bb9d834..0000000 --- a/src/jalview/analysis/scoremodels/PIDDistanceModel.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors - * - * This file is part of Jalview. - * - * Jalview is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * Jalview is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Jalview. If not, see . - * The Jalview Authors are detailed in the 'AUTHORS' file. - */ -package jalview.analysis.scoremodels; - -import jalview.api.analysis.DistanceScoreModelI; -import jalview.api.analysis.SimilarityParamsI; -import jalview.datamodel.AlignmentView; -import jalview.math.Matrix; -import jalview.math.MatrixI; -import jalview.util.Comparison; - -/** - * @deprecated superseded by PIDModel - */ -@Deprecated -public class PIDDistanceModel implements DistanceScoreModelI -{ - - @Override - public MatrixI findDistances(AlignmentView seqData, - SimilarityParamsI options) - { - String[] sequenceString = seqData - .getSequenceStrings(Comparison.GAP_SPACE); - int noseqs = sequenceString.length; - double[][] distance = new double[noseqs][noseqs]; - for (int i = 0; i < (noseqs - 1); i++) - { - for (int j = i; j < noseqs; j++) - { - if (j == i) - { - distance[i][i] = 0; - } - else - { - distance[i][j] = 100 - Comparison.PID(sequenceString[i], - sequenceString[j]); - - distance[j][i] = distance[i][j]; - } - } - } - return new Matrix(distance); - } - - @Override - public String getName() - { - return "PID"; - } - - @Override - public boolean isDNA() - { - return true; - } - - @Override - public boolean isProtein() - { - return true; - } - - @Override - public String toString() - { - return "Percentage identity of sequences"; - } -} -- 1.7.10.2