From a8031c7bb61d42004304479a2bf4005d6bb2f8a2 Mon Sep 17 00:00:00 2001 From: pvtroshin Date: Mon, 27 Jun 2011 13:48:11 +0000 Subject: [PATCH] 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 --- .classpath | 2 +- WEB-INF/lib/compbio-util-1.4.jar | Bin 14264 -> 14305 bytes build.xml | 9 +- lib/src/compbio-util-src-1.4.jar | Bin 11234 -> 11249 bytes runner/compbio/runner/_impl/BlastAll.java | 4 +- runner/compbio/runner/_impl/BlastParameters.java | 19 ++-- testsrc/compbio/runner/_impl/RPSBlastTester.java | 109 ---------------------- 7 files changed, 18 insertions(+), 125 deletions(-) delete mode 100644 testsrc/compbio/runner/_impl/RPSBlastTester.java 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 a7d9249e14eedadecc7435fa4cf675f1c67d410d..b97bb316fb1760aacb508b2fdfc47ed34f359b73 100644 GIT binary patch delta 2085 zcmZ9Ndpr|t8^_H|5+dd>#^ZcgPO+J@l5>uQ5QT>1(3}>-Y&99R(#kQFLy{gjChK8B zh_NBB91=#67C9f|&7RNu&wKxIe}C6~Uw>TJU*CqvsYpQ=2OtkW*THcJ8_N__1KR%q z@;C5LML_}-IrIal9k7-JSOahZ9+)n|2|{260Z!19cLfOk=`m})UlYaR<>D%&WGblR zJa;f+!BWX8xxHa3qQ?+7g}GxWrAlFL;-Q)dE8&5^1_eua`clpXVQyV!E%X@G9(j*_ zz2>%Bo!ZU$&&38Acn~Gye2I!*u7XAHEM08hLGOv|oK_ z1N)y0deT4nea^;DX4_RP_Q5qrfmihDR5CcRUi3-ZZ1E<6o#-k?QyRTE^ea*9V!tk- z(t3$NmRN$HTwPP6iL@J7EhOE+nbAbTNbWW7Bz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>4GrVQ?1j)V*C%XjyU?CmB4qFp#G+P&(z-`EN~Cl*ZJtz+00Ko;d?^hOGIHviE=QHv zCNLBY+@SS!S($YXiHQMwTFtmL?Hj2Ttkp4R;fc#PKPJM0WKJL65@}tc_2ydN?#`y8 zBjQD?(nhYxm-AWMTg1q44>R*-V(n1N(;U zSU-K|9&kaP#QMLA+_Is_s$xBL8L9GK=-Yy&Ve9^A&_-ai6fWIZ#nmhPJ|Xeq5Q zI4P+Zf|Rc?_EI8Dk4i~2J^p|0Y%#S}->_+1VBqp6AOK(q0swYNE&ZQyFNv(js?k$r x*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 40e5504c625aa7b5c319949c36e821aca2c2d1e4..1df1551bc6a18fd01902101e5af99f856063e6b6 100644 GIT binary patch delta 1110 zcmV-c1gZPtSMgU3P)h>@3IG5A002vD+mQ_@14?Y$u{cH-4J>TiJ_d8nEY|}709=!c z7b$;jZ`?Kv{(J%QA9(kn^(BKY8}?;AWLPn@Sb?Dp+U^JFY@V%7whT$WBq;LVM@oM8 zWgP}I2z<6B@*yAcpXq7^$rE_p+O^wz+{(+i);VZ|#s;z%I zNsk<<)R79NRJ5BFI;i{G{lvs^oGC;$fT)4n_Ce(6<6SZZ6(N#s>n8>`-I0u|K%CW$ z-*Tv{mA8-aX5|az#1Iw1R(O9l_JpC97F0)>CDD1<@C2#!X#vToK>)Wso;CLY<6~2K zRbsy<*^GEPQp-^rG&+OIcsOtiG*y2F>&*|r&1!`$8eN{gNr4ceqyF(u`oe7?1ma*E zWTb}DONjHxS~9f?nEwXHQuz*GK^iM=(pp+sj@pO;+ocwS-@G^eE%VjG#VzqV{(C-) z8Ag}G(#2Uk_zEF6D)iD~JXhXv<4}=MmdOlpyN9P>yqhp!(Koh=?M%91%bzCgWFu*g-CrIw`18@yLCUY?rkQL4TuCi`G3qoc>4S(z$;__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^qqg7<6gF< zqvpxNT;RpQ}Q)IH{aMN|? zt!Iz7|Kgd)5%R}p9k8cEkT>w@$=(~>TS4@ds>bXf!|}zF4@--qAadNbMVkCBYaU{3 zc2tml#=U|h&a;~VA{E=~oz-RQkn12_FLUQXeYQ#)`KlGu^m zZ-^4>f{OcBxTOM5;JxnmJq7+yJgS@%JG8}6^Jki3#4m@}q3pOdy6OmqK*)HZGq|SLUA7sgT4!b@Q|1JVINbr z?rDhD=STb)y9eF5R*p&=Q_}g)?F!^~rzzFB_NVqi9?{$Kk)8uKPUwR)(|f>6&K_&i zPx8`R4Hp4b`)EaSx;NN?Al9mMnUIqgvmr!()d`rQ!5JOVAhU)WCJh6VX4jLiC^!R> zX4kXoD3bvV&Slp=-wC~M$O8ZXL6eFqUjcfP>MBP9^&FER9T}5MD=GntlXoja0{AAA NyelsTkthHF000w)66OE^ 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()); - } - } - -} -- 1.7.10.2