From: amwaterhouse Date: Fri, 7 Jul 2006 13:34:14 +0000 (+0000) Subject: Redundant Remove Redundancy Removed X-Git-Tag: Release_2_1~294 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c16afbb4d0e2672fdc54d32778b6d53f09c5d86c;p=jalview.git Redundant Remove Redundancy Removed --- diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index b1f625d..daae7c5 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -277,56 +277,6 @@ public class Alignment implements AlignmentI sequences.removeElementAt(i); } - /** - * DOCUMENT ME! - * - * @param threshold DOCUMENT ME! - * @param sel DOCUMENT ME! - * - * @return DOCUMENT ME! - */ - public Vector removeRedundancy(float threshold, Vector sel) - { - Vector del = new Vector(); - - for (int i = 1; i < sel.size(); i++) - { - for (int j = 0; j < i; j++) - { - // Only do the comparison if either have not been deleted - if (!del.contains((SequenceI) sel.elementAt(i)) || - !del.contains((SequenceI) sel.elementAt(j))) - { - // use PID instead of Comparison (which is really not pleasant) - float pid = Comparison.PID((SequenceI) sel.elementAt(j), - (SequenceI) sel.elementAt(i)); - - if (pid >= threshold) - { - // Delete the shortest one - if (((SequenceI) sel.elementAt(j)).getSequence().length() > ((SequenceI) sel - .elementAt( - i)).getSequence().length()) - { - del.addElement(sel.elementAt(i)); - } - else - { - del.addElement(sel.elementAt(i)); - } - } - } - } - } - - // Now delete the sequences - for (int i = 0; i < del.size(); i++) - { - deleteSequence((SequenceI) del.elementAt(i)); - } - - return del; - } /** */ public SequenceGroup findGroup(int i) diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index e14c1e9..19b5b1c 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -161,15 +161,6 @@ public interface AlignmentI */ public void removeGaps(); - /** - * Removes redundant sequences from alignment. - * - * @param threshold Remove all sequences above the given threshold. - * @param sel Set of sequences which will have redundant sequences removed from. - * - * @return All sequences below redundancy threshold. - */ - public Vector removeRedundancy(float threshold, Vector sel); /** * Finds group that sequence at index i in alignment is part of.