From bc469bb898fd42c92d9b8b70660b4c94a93b3118 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 25 Sep 2013 16:36:24 +0100 Subject: [PATCH] JAL-1365 test that RNAAliFold service settings are stored and recovered from Jalview projects --- test/jalview/ws/jabaws/RNAStructExportImport.java | 40 ++++++++++----------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index a2c361b..2753e64 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -48,30 +48,30 @@ public class RNAStructExportImport @BeforeClass public static void setUpBeforeClass() throws Exception { - - + jalview.bin.Cache.initLogger(); disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); - + for (Jws2Instance svc : disc.getServices()) { - + if (svc.getServiceTypeURI().toLowerCase().contains("rnaalifoldws")) { rnaalifoldws = svc; } } - + System.out.println("State of rnaalifoldws: " + rnaalifoldws); - - if (rnaalifoldws == null) System.exit(0); - + + if (rnaalifoldws == null) + System.exit(0); + jalview.io.FileLoader fl = new jalview.io.FileLoader(false); - + af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE); - + assertNotNull("Couldn't load test data ('" + testseqs + "')", af); - + } @AfterClass @@ -87,13 +87,11 @@ public class RNAStructExportImport @Test public void testRNAStructExport() { - - + alifoldClient = new RNAalifoldClient(rnaalifoldws, af, null, null); - + af.getViewport().getCalcManager().startWorker(alifoldClient); - - + do { try @@ -104,10 +102,9 @@ public class RNAStructExportImport } ; } while (af.getViewport().getCalcManager().isWorking()); - - + AlignmentI orig_alig = af.getViewport().getAlignment(); - + testAnnotationFileIO("Testing RNAalifold Annotation IO", orig_alig); } @@ -116,11 +113,10 @@ public class RNAStructExportImport { try { - // what format would be appropriate for RNAalifold annotations? + // what format would be appropriate for RNAalifold annotations? String aligfileout = new FormatAdapter().formatSequences("PFAM", al.getSequencesArray()); - - + String anfileout = new AnnotationFile().printAnnotations( al.getAlignmentAnnotation(), al.getGroups(), al.getProperties()); -- 1.7.10.2