ArrayList<int[]> gl = new ArrayList<int[]>();
int p = 0;
List<SequenceGroup> sgs;
- synchronized (sgs=al.getGroups())
+ synchronized (sgs = al.getGroups())
{
- for (SequenceGroup sg : sgs)
- {
- if (sg.getSize() < minsize)
- {
- throw new NoValidInputDataException("Group contains less than "
- + minsize + " sequences.");
- }
- // TODO: refactor to sequenceGroup for efficiency -
- // getAlignmentRowInterval(AlignmentI al)
- int[] se = null;
- for (SequenceI sq : sg.getSequencesInOrder(al))
+ for (SequenceGroup sg : sgs)
{
- p = al.findIndex(sq);
- if (se == null)
+ if (sg.getSize() < minsize)
{
- se = new int[]
- { p, p };
+ throw new NoValidInputDataException("Group contains less than "
+ + minsize + " sequences.");
}
- else
+ // TODO: refactor to sequenceGroup for efficiency -
+ // getAlignmentRowInterval(AlignmentI al)
+ int[] se = null;
+ for (SequenceI sq : sg.getSequencesInOrder(al))
+ {
+ p = al.findIndex(sq);
+ if (se == null)
+ {
+ se = new int[]
+ { p, p };
+ }
+ else
+ {
+ if (p < se[0])
+ se[0] = p;
+ if (p > se[1])
+ se[1] = p;
+ }
+ }
+ if (se != null)
{
- if (p < se[0])
- se[0] = p;
- if (p > se[1])
- se[1] = p;
+ gl.add(se);
}
}
- if (se != null)
- {
- gl.add(se);
- }
- }
}
// are there any more sequences ungrouped that should be added as a single
// remaining group ? - these might be at the start or the end
"Separator character between elements of vector", true, ",",
sep, Arrays.asList(new String[]
{ " ", ",", ";", "\t", "|" }), null));
- lst.add(new IntegerParameter("minsize", "Minimum size of partition allowed by service", true, 1, minsize, 1,0));
- lst.add(createMolTypeOption("type", "Sequence type", false, type, molType.MIX));
+ lst.add(new IntegerParameter("minsize",
+ "Minimum size of partition allowed by service", true, 1,
+ minsize, 1, 0));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ molType.MIX));
return lst;
}