Redundant Remove Redundancy Removed
authoramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:34:14 +0000 (13:34 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:34:14 +0000 (13:34 +0000)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/AlignmentI.java

index b1f625d..daae7c5 100755 (executable)
@@ -277,56 +277,6 @@ public class Alignment implements AlignmentI
         sequences.removeElementAt(i);\r
     }\r
 \r
-    /**\r
-     * DOCUMENT ME!\r
-     *\r
-     * @param threshold DOCUMENT ME!\r
-     * @param sel DOCUMENT ME!\r
-     *\r
-     * @return DOCUMENT ME!\r
-     */\r
-    public Vector removeRedundancy(float threshold, Vector sel)\r
-    {\r
-        Vector del = new Vector();\r
-\r
-        for (int i = 1; i < sel.size(); i++)\r
-        {\r
-            for (int j = 0; j < i; j++)\r
-            {\r
-                // Only do the comparison if either have not been deleted\r
-                if (!del.contains((SequenceI) sel.elementAt(i)) ||\r
-                        !del.contains((SequenceI) sel.elementAt(j)))\r
-                {\r
-                    // use PID instead of Comparison (which is really not pleasant)\r
-                    float pid = Comparison.PID((SequenceI) sel.elementAt(j),\r
-                            (SequenceI) sel.elementAt(i));\r
-\r
-                    if (pid >= threshold)\r
-                    {\r
-                        // Delete the shortest one\r
-                        if (((SequenceI) sel.elementAt(j)).getSequence().length() > ((SequenceI) sel\r
-                                                                                         .elementAt(\r
-                                    i)).getSequence().length())\r
-                        {\r
-                            del.addElement(sel.elementAt(i));\r
-                        }\r
-                        else\r
-                        {\r
-                            del.addElement(sel.elementAt(i));\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        }\r
-\r
-        // Now delete the sequences\r
-        for (int i = 0; i < del.size(); i++)\r
-        {\r
-            deleteSequence((SequenceI) del.elementAt(i));\r
-        }\r
-\r
-        return del;\r
-    }\r
 \r
     /**    */\r
     public SequenceGroup findGroup(int i)\r
index e14c1e9..19b5b1c 100755 (executable)
@@ -161,15 +161,6 @@ public interface AlignmentI
      */\r
     public void removeGaps();\r
 \r
-    /**\r
-     * Removes redundant sequences from alignment.\r
-     *\r
-     * @param threshold Remove all sequences above the given threshold.\r
-     * @param sel Set of sequences which will have redundant sequences removed from.\r
-     *\r
-     * @return All sequences below redundancy threshold.\r
-     */\r
-    public Vector removeRedundancy(float threshold, Vector sel);\r
 \r
     /**\r
      * Finds group that sequence at index i in alignment is part of.\r