import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
-import jalview.gui.AlignFrame;
import jalview.gui.JvOptionPane;
import java.io.File;
@Test(groups = { "Functional" })
public void secondaryStructureForRNASequence() throws Exception
{
- AlignFrame al = new FileLoader(false).LoadFileWaitTillLoaded(aliFile,
- DataSourceType.PASTE);
- al.loadJalviewDataFile(annFile, DataSourceType.PASTE, null, null);
+ AlignmentI al = new AppletFormatAdapter().readFile(aliFile,
+ DataSourceType.PASTE, jalview.io.FileFormat.Fasta);
+ AnnotationFile aaf = new AnnotationFile();
+ aaf.readAnnotationFile(al, annFile, DataSourceType.PASTE);
+ al.getAlignmentAnnotation()[0].visible = true;
// TODO: create a better 'save as <format>' pattern
- String stockholmFile = new jalview.io.StockholmFile(al.getViewport()
- .getAlignment()).print(al.getViewport().getAlignment()
- .getSequencesArray(), true);
+ StockholmFile sf = new StockholmFile(al);
- AlignFrame newAl = new FileLoader(false).LoadFileWaitTillLoaded(
- stockholmFile, DataSourceType.PASTE);
+ String stockholmFile = sf.print(al.getSequencesArray(), true);
- testAlignmentEquivalence(al.getViewport().getAlignment(), newAl
- .getViewport().getAlignment(), true, true);
+ AlignmentI newAl = new AppletFormatAdapter().readFile(stockholmFile,
+ DataSourceType.PASTE, jalview.io.FileFormat.Stockholm);
+ // AlignmentUtils.showOrHideSequenceAnnotations(newAl.getViewport()
+ // .getAlignment(), Arrays.asList("Secondary Structure"), newAl
+ // .getViewport().getAlignment().getSequences(), true, true);
+ testAlignmentEquivalence(al, newAl, true, true);
}
}