assertTrue("Differing numbers of dataset sequence annotation\nOriginally "+olddsann+" and now "+newdsann,olddsann==newdsann);
System.out.println("Read in same number of annotations as originally present ("+olddsann+")");
}
+ @Test
+ public void testTCoffeeScores() throws Exception
+ {
+ String inFile = "examples/uniref50.fa",inAnnot="examples/uniref50.score_ascii";
+ String tfile = File.createTempFile("JalviewTest", ".jvp").getAbsolutePath();
+ AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(inFile, FormatAdapter.FILE);
+ assertTrue("Didn't read input file "+inFile, af!=null);
+ af.loadJalviewDataFile(inAnnot, FormatAdapter.FILE, null,null);
+ assertTrue(
+ "Didn't set T-coffee colourscheme",
+ af.getViewport().getGlobalColourScheme().getClass()
+ .equals(jalview.schemes.TCoffeeColourScheme.class));
+ assertTrue(
+ "Recognise T-Coffee score from string",
+ jalview.schemes.ColourSchemeProperty.getColour(af.getViewport()
+ .getAlignment(),
+ jalview.schemes.ColourSchemeProperty.getColourName(af
+ .getViewport().getGlobalColourScheme())) != null);
+
+ assertTrue("Failed to store as a project.",af.saveAlignment(tfile, "Jalview"));
+ af.closeMenuItem_actionPerformed(true);
+ af=null;
+ af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, FormatAdapter.FILE);
+ assertTrue("Failed to import new project", af!=null);
+ assertTrue("Didn't set T-coffee colourscheme for imported project.",af.getViewport().getGlobalColourScheme().getClass().equals(jalview.schemes.TCoffeeColourScheme.class));
+ System.out.println("T-Coffee score shading successfully recovered from project.");
+ }
}