*/
package jalview.io;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
int maxLength = 0;
/**
- * Sequences to be added to form a new alignment.
+ * Sequences to be added to form a new alignment. TODO: remove vector in this
+ * class
*/
protected Vector<SequenceI> seqs;
*
* @param al
*/
- public void addAnnotations(Alignment al)
+ public void addAnnotations(AlignmentI al)
{
addProperties(al);
for (int i = 0; i < annotations.size(); i++)
}
+ /**
+ * register sequence groups on the alignment for **output**
+ *
+ * @param al
+ */
public void addSeqGroups(AlignmentI al)
{
this.seqGroups = al.getGroups();
* @note implicitly called by addAnnotations()
* @param al
*/
- public void addProperties(Alignment al)
+ public void addProperties(AlignmentI al)
{
if (properties != null && properties.size() > 0)
{
return newickStrings == null ? 0 : newickStrings.size();
}
+ public void addGroups(AlignmentI al)
+ {
+
+ for (SequenceGroup sg : getSeqGroups())
+ {
+ al.addGroup(sg);
+ }
+ }
+
}