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
*/\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