import jalview.datamodel.SequenceI;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
}
}
}
+
+ /*
+ * get selected columns (in the order they were selected);
+ * note this could include right-to-left ranges
+ */
int[] spos = new int[cs.getSelected().size()];
int width = -1;
int i = 0;
spos[i++] = pos.intValue();
}
- /*
- * ensure column selection is in ascending order
- */
- Arrays.sort(spos);
-
for (i = 0; i < sequences.length; i++)
{
int slen = sequences[i].getLength();
AlignmentI alignment = new Alignment(
new SequenceI[] { s1, s2, s3, s4, s5 });
+ /*
+ * test for the case where column selections are not added in
+ * left to right order
+ */
+ int[] positions = new int[] { 7, 9, 1 };
+
@Test(groups = { "Functional" })
public void testMakeGroupsWithBoth()
{
- int[] positions = new int[] { 1, 7, 9 };
String[] str = new String[alignment.getHeight()];
int seq = 0;
for (SequenceI s : alignment.getSequences())
alignment.getSequencesArray(), str,
Arrays.asList(new SequenceGroup[] { sg_12, sg_345 }));
- /*
- * test for the case where column selections are not added in
- * left to right order
- */
- positions = new int[] { 7, 9, 1 };
ColumnSelection cs = new ColumnSelection();
for (int p : positions)
{