Define path to UNIREF database in conf/Executable.properties
authorSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 14 Oct 2013 09:58:40 +0000 (10:58 +0100)
committerSasha Sherstnev <a.sherstnev@dundee.ac.uk>
Mon, 14 Oct 2013 09:58:40 +0000 (10:58 +0100)
conf/Executable.properties
runner/compbio/runner/predictors/Jpred.java
webservices/compbio/ws/client/Jws2Client.java

index a4f1aa3..cbc8474 100644 (file)
@@ -218,7 +218,13 @@ aacon.limits.file        = conf/settings/AAConLimits.xml
 local.jpred.bin        = binaries/src/jpred/jpred.pl\r
 #cluster.jpred.bin      = /home/jabaws/binaries/src/jpred/jpred.pl\r
 # These paths will be converted to absolute if relative.\r
-jpred.bin.env          = BLASTMAT#binaries/src/jpred/data/blast;UNIREFDB#binaries/src/jpred/unirefdb;\r
+jpred.bin.env          = BLASTMAT#binaries/src/jpred/data/blast\r
+# The varible jpred.data.uniref.path define a path to Uniref90 files used by Jpred. If \r
+# you install the database to a different path chenge the variable here\r
+jpred.data.uniref.path = /data/UNIREFdb\r
+# WARNING!!! \r
+# Redefine jpred.data.uniref.name if you do undestand what the variable means\r
+jpred.data.uniref.name = cluster\r
 ### This parameters specifies the directory where the matrices files are stored\r
 jpred.presets.file     = conf/settings/JpredPresets.xml\r
 jpred.parameters.file  = conf/settings/JpredParameters.xml\r
index 12f9487..0e08e0a 100644 (file)
@@ -40,7 +40,8 @@ import compbio.metadata.ResultNotAvailableException;
 /**\r
  * Command line\r
  * \r
- * jpred.pl -in d16vpa_.fas -outfile res_d16vpa_ -dbname ported_db -dbpath /data/UNIREFdb -ncpu 4\r
+ * jpred.pl -in d16vpa_.fas -outfile res_d16vpa_ -dbname ported_db -dbpath\r
+ * /data/UNIREFdb -ncpu 4\r
  * \r
  * @author asherstnev\r
  * \r
@@ -59,15 +60,17 @@ public class Jpred extends SkeletalExecutable<Jpred> {
        public static final String STAT_FILE = "stat.txt";\r
 \r
        public Jpred() {\r
+               String dbpath = ph.getProperty("jpred.data.uniref.path");\r
+               String dbname = ph.getProperty("jpred.data.uniref.name");\r
                addParameters(Arrays.asList("-logfile " + STAT_FILE));\r
-               addParameters(Arrays.asList("-jabaws"));\r
+               addParameters(Arrays.asList("-dbpath " + dbpath));\r
+               addParameters(Arrays.asList("-dbname " + dbname));\r
        }\r
 \r
        // HashMap<Method, float[]>\r
        @SuppressWarnings("unchecked")\r
        @Override\r
-       public JpredAlignment getResults(String workDirectory)\r
-                       throws ResultNotAvailableException {\r
+       public JpredAlignment getResults(String workDirectory) throws ResultNotAvailableException {\r
                JpredAlignment annotations = null;\r
                try {\r
                        InputStream inStream = new FileInputStream(new File(workDirectory, getOutput()));\r
@@ -129,7 +132,8 @@ public class Jpred extends SkeletalExecutable<Jpred> {
 \r
        @Override\r
        public CommandBuilder<Jpred> getParameters(ExecProvider provider) {\r
-               // If number of cores is provided, set it for the cluster execution only!\r
+               // If number of cores is provided, set it for the cluster execution\r
+               // only!\r
                if (provider == Executable.ExecProvider.Cluster) {\r
                        int cpunum = SkeletalExecutable.getClusterCpuNum(getType());\r
                        cpunum = (cpunum == 0) ? 1 : cpunum;\r
index 095d8fd..daeb8fa 100644 (file)
@@ -467,8 +467,8 @@ public class Jws2Client {
                                jobId = msaws.align(fastalist);\r
                        }\r
                        System.out.println("\ncalling program.........");\r
-                       long startTime = System.nanoTime();\r
                        /*\r
+                       long startTime = System.nanoTime();\r
                        while (JobStatus.RUNNING == msaws.getJobStatus(jobId)) {\r
                                Thread.sleep(1000);\r
                                long endTime = System.nanoTime();\r