import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.gui.AlignFrame;
import jalview.gui.JvOptionPane;
import java.io.File;
}
}
}
+
+ String aliFile = ">Dm\nAAACCCUUUUACACACGGGAAAGGG";
+ String annFile = "JALVIEW_ANNOTATION\n# Created: Thu May 04 11:16:52 BST 2017\n\n"
+ + "SEQUENCE_REF\tDm\nNO_GRAPH\tsecondary structure\tsecondary structure\t"
+ + "(|(|(|(|, .|, .|, .|, .|)|)|)|)|\t0.0\nROWPROPERTIES\t"
+ + "secondary structure\tscaletofit=true\tshowalllabs=true\tcentrelabs=false";
+
+ @Test(groups = { "Functional" })
+ public void secondaryStructureForRNASequence() throws Exception
+ {
+ AlignFrame al = new FileLoader(false).LoadFileWaitTillLoaded(aliFile,
+ DataSourceType.PASTE);
+ al.loadJalviewDataFile(annFile, DataSourceType.PASTE, null, null);
+
+ // TODO: create a better 'save as <format>' pattern
+ String stockholmFile = new jalview.io.StockholmFile(al.getViewport()
+ .getAlignment()).print(al.getViewport().getAlignment()
+ .getSequencesArray(), true);
+
+ AlignFrame newAl = new FileLoader(false).LoadFileWaitTillLoaded(
+ stockholmFile, DataSourceType.PASTE);
+
+ testAlignmentEquivalence(al.getViewport().getAlignment(), newAl
+ .getViewport().getAlignment(), true, true);
+
+ }
}