From: pvtroshin Date: Mon, 27 Jun 2011 13:48:11 +0000 (+0000) Subject: Build script improvements & updated util X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a8031c7bb61d42004304479a2bf4005d6bb2f8a2;p=jabaws.git Build script improvements & updated util git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4337 e3abac25-378b-4346-85de-24260fe3988d --- diff --git a/.classpath b/.classpath index c9e34d0..26035d7 100644 --- a/.classpath +++ b/.classpath @@ -11,7 +11,7 @@ - + diff --git a/WEB-INF/lib/compbio-util-1.4.jar b/WEB-INF/lib/compbio-util-1.4.jar index a7d9249..b97bb31 100644 Binary files a/WEB-INF/lib/compbio-util-1.4.jar and b/WEB-INF/lib/compbio-util-1.4.jar differ diff --git a/build.xml b/build.xml index 884ee5e..3d55caa 100644 --- a/build.xml +++ b/build.xml @@ -306,14 +306,14 @@ Packing binaries, and configuration files - + - + Jar file: Full WS client jar @@ -389,7 +389,10 @@ - + + + + diff --git a/lib/src/compbio-util-src-1.4.jar b/lib/src/compbio-util-src-1.4.jar index 40e5504..1df1551 100644 Binary files a/lib/src/compbio-util-src-1.4.jar and b/lib/src/compbio-util-src-1.4.jar differ diff --git a/runner/compbio/runner/_impl/BlastAll.java b/runner/compbio/runner/_impl/BlastAll.java index 5e4881f..947e240 100644 --- a/runner/compbio/runner/_impl/BlastAll.java +++ b/runner/compbio/runner/_impl/BlastAll.java @@ -78,11 +78,11 @@ public class BlastAll extends _SkeletalCommandBuilder { static List getTestArgs() { return Arrays - .asList(new String[] { + .asList(new String[]{ parBlastType + blastType.blastp, parDatabase + Environment.getBlastDatabasesDir() + dataBase.pdb, parEvalue + default_evalue, - parAlView }); + parAlView}); } public boolean removeOutput(String outfile) { diff --git a/runner/compbio/runner/_impl/BlastParameters.java b/runner/compbio/runner/_impl/BlastParameters.java index 377b37c..b5b3bdc 100644 --- a/runner/compbio/runner/_impl/BlastParameters.java +++ b/runner/compbio/runner/_impl/BlastParameters.java @@ -17,24 +17,23 @@ */ package compbio.runner._impl; - /** - * Utility class for common Blast parameters - * @author pvtroshin - * TODO + * Utility class for common Blast parameters + * + * @author pvtroshin TODO */ public class BlastParameters { - private BlastParameters() { } // prevent instantiation - + private BlastParameters() { + } // prevent instantiation + + static String outputName = "output.blast"; + static String outputProfileName = "output.profile"; static final String parInput = "-i"; static final String parDatabase = "-d "; static final String parOutput = "-o"; - static final String parEvalue= "-e"; + static final String parEvalue = "-e"; final static String parDel = " "; static final String parAlView = "-m 9"; - - - } diff --git a/testsrc/compbio/runner/_impl/RPSBlastTester.java b/testsrc/compbio/runner/_impl/RPSBlastTester.java deleted file mode 100644 index 7cd470f..0000000 --- a/testsrc/compbio/runner/_impl/RPSBlastTester.java +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (c) 2009 Peter Troshin - * - * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 - * - * This library is free software; you can redistribute it and/or modify it under the terms of the - * Apache License version 2 as published by the Apache Software Foundation - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache - * License for more details. - * - * A copy of the license is in apache_license.txt. It is also available here: - * @see: http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Any republication or derived work distributed in source code form - * must include this copyright and license notice. - */ -package compbio.runner._impl; - -import static org.testng.AssertJUnit.assertFalse; -import static org.testng.AssertJUnit.assertNotNull; -import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.fail; - -import java.text.ParseException; - -import org.ggf.drmaa.DrmaaException; -import org.ggf.drmaa.JobInfo; -import org.testng.annotations.Test; - -import compbio.engine.cluster.drmaa.ClusterUtil; -import compbio.engine.cluster.drmaa.JobRunner; -import compbio.engine.cluster.drmaa.StatisticManager; -import compbio.metadata.AllTestSuit; -import compbio.metadata.JobExecutionException; -import compbio.metadata.JobStatus; -import compbio.metadata.JobSubmissionException; - -public class RPSBlastTester { - - public static String test_input = "/homes/pvtroshin/TO1381.fasta"; - public static String test_outfile = "/homes/pvtroshin/TO1381.rpsblastpout"; - - @Test() - public void testGetTestCommand() { - System.out.println(RPSBlast.getTestCommand()); - } - - @Test() - public void testGetTestArgsCommand() { - System.out.println(RPSBlast.getTestArgs()); - } - - @Test(enabled = false, groups = { AllTestSuit.test_group_cluster, - AllTestSuit.test_group_runner }) - public void testBuildCommand() { - RPSBlast rpsblast = new RPSBlast(AllTestSuit.OUTPUT_DIR_ABSOLUTE); - // TODO rpsblast.setInput(test_input).setOutput(test_outfile); - // rpsblast.setParameters(RPSBlast.getTestArgs()); - - try { - JobRunner runner = JobRunner.getInstance(null); - assertNotNull("Runner is NULL", runner); - runner.executeJob(); - // assertNotNull(jobId1); - - JobStatus status = runner.getJobStatus(); - assertTrue(status == JobStatus.PENDING - || status == JobStatus.RUNNING); - JobInfo info = runner.getJobInfo(); - assertNotNull(info); - StatisticManager sm = new StatisticManager(info); - assertNotNull(sm); - try { - String time_s = sm.getCalculationTime(); - assertNotNull(time_s); - float time = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(time_s) - .floatValue(); - assertTrue(time > 0); - String exits = sm.getExitStatus(); - assertNotNull(exits); - int exitsInt = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(exits) - .intValue(); - // assertEquals(0, exitsInt); - System.out.println(sm.getAllStats()); - - } catch (ParseException e) { - e.printStackTrace(); - fail("Parse Exception: " + e.getLocalizedMessage()); - } - - assertTrue(sm.hasExited()); - assertFalse(sm.wasAborted()); - assertFalse(sm.hasDump()); - assertFalse(sm.hasSignaled()); - - } catch (DrmaaException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } catch (JobSubmissionException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } catch (JobExecutionException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } - } - -}