Build script improvements & updated util
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Mon, 27 Jun 2011 13:48:11 +0000 (13:48 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Mon, 27 Jun 2011 13:48:11 +0000 (13:48 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4337 e3abac25-378b-4346-85de-24260fe3988d

.classpath
WEB-INF/lib/compbio-util-1.4.jar
build.xml
lib/src/compbio-util-src-1.4.jar
runner/compbio/runner/_impl/BlastAll.java
runner/compbio/runner/_impl/BlastParameters.java
testsrc/compbio/runner/_impl/RPSBlastTester.java [deleted file]

index c9e34d0..26035d7 100644 (file)
@@ -11,7 +11,7 @@
        <classpathentry kind="lib" path="WEB-INF/lib/drmaa.jar"/>\r
        <classpathentry kind="lib" path="WEB-INF/lib/derby.jar"/>\r
        <classpathentry kind="lib" path="WEB-INF/lib/log4j-1.2.15.jar"/>\r
-       <classpathentry kind="lib" path="WEB-INF/lib/compbio-util-1.4.jar"/>\r
        <classpathentry kind="lib" path="WEB-INF/lib/compbio-annotations-1.0.jar"/>\r
+       <classpathentry kind="lib" path="WEB-INF/lib/compbio-util-1.4.jar"/>\r
        <classpathentry kind="output" path="WEB-INF/classes"/>\r
 </classpath>\r
index a7d9249..b97bb31 100644 (file)
Binary files a/WEB-INF/lib/compbio-util-1.4.jar and b/WEB-INF/lib/compbio-util-1.4.jar differ
index 884ee5e..3d55caa 100644 (file)
--- a/build.xml
+++ b/build.xml
                <echo>Packing binaries, and configuration files</echo>\r
                <zip destfile="${full-jaba-client-pack}" >\r
                        <zipgroupfileset file="${binaries}" />\r
-                       <zipfileset dir="conf" prefix="conf">\r
+                       <zipfileset dir="conf" prefix="conf" >\r
                                <exclude name="**/temp/**"/>\r
                        </zipfileset>\r
                        <fileset file="${full-jaba-client}" />\r
                </zip>\r
        </target>\r
 \r
-\r
+       \r
        <target name="full-jaba-jar" description="Pack datamodel, engine, runners, configuration, binaries and webservices" depends="compile">\r
                <echo>Jar file: Full WS client jar</echo>\r
                <delete file="${full-jaba-client}">\r
                        </zipfileset>\r
                        <zipfileset dir="${basedir}/ExecutionStatistic" prefix="ExecutionStatistic" />\r
                        <zipfileset dir="${basedir}/jobsout" prefix="jobsout" excludes="**/*"/>\r
-                       <zipfileset dir="${basedir}/conf" prefix="conf" excludes="**/log4j.properties*"/>\r
+                       <zipfileset dir="conf" prefix="conf" >\r
+                               <exclude name="**/temp/**"/>\r
+                               <exclude name="**/log4j.properties*"/>\r
+                       </zipfileset>\r
                        <!-- Add JABAWS web site apart from the binary archive -->\r
                        <zipfileset dir="${basedir}/website" excludes="archive/**, devel*.html, tests/**, template.html"/>\r
                        <zipfileset dir="." includes="${full-jaba-client}" fullpath="WEB-INF/lib/jaba-client.jar"/>\r
index 40e5504..1df1551 100644 (file)
Binary files a/lib/src/compbio-util-src-1.4.jar and b/lib/src/compbio-util-src-1.4.jar differ
index 5e4881f..947e240 100644 (file)
@@ -78,11 +78,11 @@ public class BlastAll extends _SkeletalCommandBuilder {
 \r
        static List<String> getTestArgs() {\r
                return Arrays\r
-                               .asList(new String[] {\r
+                               .asList(new String[]{\r
                                                parBlastType + blastType.blastp,\r
                                                parDatabase + Environment.getBlastDatabasesDir()\r
                                                                + dataBase.pdb, parEvalue + default_evalue,\r
-                                               parAlView });\r
+                                               parAlView});\r
        }\r
 \r
        public boolean removeOutput(String outfile) {\r
index 377b37c..b5b3bdc 100644 (file)
  */\r
 package compbio.runner._impl;\r
 \r
-\r
 /**\r
- * Utility class for common Blast parameters \r
- * @author pvtroshin\r
- * TODO\r
+ * Utility class for common Blast parameters\r
+ * \r
+ * @author pvtroshin TODO\r
  */\r
 public class BlastParameters {\r
 \r
-       private BlastParameters() { } // prevent instantiation \r
-       \r
+       private BlastParameters() {\r
+       } // prevent instantiation\r
+\r
+       static String outputName = "output.blast";\r
+       static String outputProfileName = "output.profile";\r
        static final String parInput = "-i";\r
        static final String parDatabase = "-d ";\r
        static final String parOutput = "-o";\r
-       static final String parEvalue= "-e";    \r
+       static final String parEvalue = "-e";\r
        final static String parDel = " ";\r
        static final String parAlView = "-m 9";\r
 \r
-       \r
-\r
-       \r
 }\r
diff --git a/testsrc/compbio/runner/_impl/RPSBlastTester.java b/testsrc/compbio/runner/_impl/RPSBlastTester.java
deleted file mode 100644 (file)
index 7cd470f..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (c) 2009 Peter Troshin\r
- *  \r
- *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0     \r
- * \r
- *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
- *  Apache License version 2 as published by the Apache Software Foundation\r
- * \r
- *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
- *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
- *  License for more details.\r
- * \r
- *  A copy of the license is in apache_license.txt. It is also available here:\r
- * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
- * \r
- * Any republication or derived work distributed in source code form\r
- * must include this copyright and license notice.\r
- */\r
-package compbio.runner._impl;\r
-\r
-import static org.testng.AssertJUnit.assertFalse;\r
-import static org.testng.AssertJUnit.assertNotNull;\r
-import static org.testng.AssertJUnit.assertTrue;\r
-import static org.testng.AssertJUnit.fail;\r
-\r
-import java.text.ParseException;\r
-\r
-import org.ggf.drmaa.DrmaaException;\r
-import org.ggf.drmaa.JobInfo;\r
-import org.testng.annotations.Test;\r
-\r
-import compbio.engine.cluster.drmaa.ClusterUtil;\r
-import compbio.engine.cluster.drmaa.JobRunner;\r
-import compbio.engine.cluster.drmaa.StatisticManager;\r
-import compbio.metadata.AllTestSuit;\r
-import compbio.metadata.JobExecutionException;\r
-import compbio.metadata.JobStatus;\r
-import compbio.metadata.JobSubmissionException;\r
-\r
-public class RPSBlastTester {\r
-\r
-       public static String test_input = "/homes/pvtroshin/TO1381.fasta";\r
-       public static String test_outfile = "/homes/pvtroshin/TO1381.rpsblastpout";\r
-\r
-       @Test()\r
-       public void testGetTestCommand() {\r
-               System.out.println(RPSBlast.getTestCommand());\r
-       }\r
-\r
-       @Test()\r
-       public void testGetTestArgsCommand() {\r
-               System.out.println(RPSBlast.getTestArgs());\r
-       }\r
-\r
-       @Test(enabled = false, groups = { AllTestSuit.test_group_cluster,\r
-                       AllTestSuit.test_group_runner })\r
-       public void testBuildCommand() {\r
-               RPSBlast rpsblast = new RPSBlast(AllTestSuit.OUTPUT_DIR_ABSOLUTE);\r
-               // TODO rpsblast.setInput(test_input).setOutput(test_outfile);\r
-               // rpsblast.setParameters(RPSBlast.getTestArgs());\r
-\r
-               try {\r
-                       JobRunner runner = JobRunner.getInstance(null);\r
-                       assertNotNull("Runner is NULL", runner);\r
-                       runner.executeJob();\r
-                       // assertNotNull(jobId1);\r
-\r
-                       JobStatus status = runner.getJobStatus();\r
-                       assertTrue(status == JobStatus.PENDING\r
-                                       || status == JobStatus.RUNNING);\r
-                       JobInfo info = runner.getJobInfo();\r
-                       assertNotNull(info);\r
-                       StatisticManager sm = new StatisticManager(info);\r
-                       assertNotNull(sm);\r
-                       try {\r
-                               String time_s = sm.getCalculationTime();\r
-                               assertNotNull(time_s);\r
-                               float time = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(time_s)\r
-                                               .floatValue();\r
-                               assertTrue(time > 0);\r
-                               String exits = sm.getExitStatus();\r
-                               assertNotNull(exits);\r
-                               int exitsInt = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(exits)\r
-                                               .intValue();\r
-                               // assertEquals(0, exitsInt);\r
-                               System.out.println(sm.getAllStats());\r
-\r
-                       } catch (ParseException e) {\r
-                               e.printStackTrace();\r
-                               fail("Parse Exception: " + e.getLocalizedMessage());\r
-                       }\r
-\r
-                       assertTrue(sm.hasExited());\r
-                       assertFalse(sm.wasAborted());\r
-                       assertFalse(sm.hasDump());\r
-                       assertFalse(sm.hasSignaled());\r
-\r
-               } catch (DrmaaException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               } catch (JobSubmissionException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               } catch (JobExecutionException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               }\r
-       }\r
-\r
-}\r