{
private Alignment dataset;
- protected List<SequenceI> sequences;
+ private List<SequenceI> sequences;
protected List<SequenceGroup> groups;
return sequences.get(i);
}
}
+
return null;
}
public int getWidth()
{
int maxLength = -1;
-
+
for (int i = 0; i < sequences.size(); i++)
{
if (getSequenceAt(i).getLength() > maxLength)
maxLength = getSequenceAt(i).getLength();
}
}
-
+
return maxLength;
}
+ /*
+ @Override
+ public int getWidth()
+ {
+ final Wrapper temp = new Wrapper();
+
+ forEachSequence(new Consumer<SequenceI>()
+ {
+ @Override
+ public void accept(SequenceI s)
+ {
+ if (s.getLength() > temp.inner)
+ {
+ temp.inner = s.getLength();
+ }
+ }
+ }, 0, sequences.size() - 1);
+
+ return temp.inner;
+ }
+
+ public static class Wrapper
+ {
+ public int inner;
+ }*/
/**
* DOCUMENT ME!
AlignmentAnnotation annot = new AlignmentAnnotation(name, name,
new Annotation[1], 0f, 0f, AlignmentAnnotation.BAR_GRAPH);
annot.hasText = false;
- annot.setCalcId(new String(calcId));
+ if (calcId != null)
+ {
+ annot.setCalcId(new String(calcId));
+ }
annot.autoCalculated = autoCalc;
if (seqRef != null)
{