else if (format.equals(JSONFile.FILE_DESC))
{
alignFile = new JSONFile(inFile, type);
- al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- ((JSONFile) alignFile).setViewport(viewport);
- for (SequenceGroup sg : alignFile.getSeqGroups())
- {
- al.addGroup(sg);
- }
-
- return al;
}
else if (format.equals(HtmlFile.FILE_DESC))
{
alignFile = new HtmlFile(inFile, type);
- al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- for (SequenceGroup sg : alignFile.getSeqGroups())
- {
- al.addGroup(sg);
- }
- return al;
}
else if (format.equals("RNAML"))
{
{
alignFile = new Gff3File(inFile, type);
}
-
+ // Standard boilerplate for creating alignment from parser
+ alignFile.setViewport(viewport);
+
al = new Alignment(alignFile.getSeqsAsArray());
alignFile.addAnnotations(al);
+ alignFile.addGroups(al);
+
return al;
} catch (Exception e)
{