+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.analysis;
import jalview.datamodel.Alignment;
Sequence s5 = new Sequence("s5", "AAAADDEDTTEE");
- SequenceGroup sg1 = new SequenceGroup(Arrays.asList(new SequenceI[]
- { s1, s2 }), "Group1", null, false, false, false, 0, 5);
+ SequenceGroup sg1 = new SequenceGroup(Arrays.asList(new SequenceI[] { s1,
+ s2 }), "Group1", null, false, false, false, 0, 5);
- SequenceGroup sg2 = new SequenceGroup(Arrays.asList(new SequenceI[]
- { s3, s4, s5 }), "Group2", null, false, false, false, 0, 5);
+ SequenceGroup sg2 = new SequenceGroup(Arrays.asList(new SequenceI[] { s3,
+ s4, s5 }), "Group2", null, false, false, false, 0, 5);
- AlignmentI alignment = new Alignment(new SequenceI[]
- { s1, s2, s3, s4, s5 });
+ AlignmentI alignment = new Alignment(
+ new SequenceI[] { s1, s2, s3, s4, s5 });
- int[] positions = new int[]
- { 1, 7, 9 };
+ int[] positions = new int[] { 1, 7, 9 };
- @Test(groups ={ "Functional" })
+ @Test(groups = { "Functional" })
public void testMakeGroupsWithBoth()
{
ArrayList<String> str = new ArrayList<String>();
SequenceGroup[] seqgroupsString = Grouping.makeGroupsFrom(
alignment.getSequencesArray(),
str.toArray(new String[str.size()]),
- Arrays.asList(new SequenceGroup[]
- { sg1, sg2 }));
+ Arrays.asList(new SequenceGroup[] { sg1, sg2 }));
ColumnSelection cs = new ColumnSelection();
for (int p : positions)
{
}
SequenceGroup[] seqgroupsColSel = Grouping.makeGroupsFromCols(
alignment.getSequencesArray(), cs,
- Arrays.asList(new SequenceGroup[]
- { sg1, sg2 }));
- AssertJUnit.assertEquals(seqgroupsString.length, seqgroupsColSel.length);
+ Arrays.asList(new SequenceGroup[] { sg1, sg2 }));
+ AssertJUnit
+ .assertEquals(seqgroupsString.length, seqgroupsColSel.length);
for (int p = 0; p < seqgroupsString.length; p++)
{
AssertJUnit.assertEquals(seqgroupsString[p].getName(),