Webservice which implements FoldWS and returns String. Parameters.xml file
authorDaniel Barton <daluke.barton@gmail.com>
Mon, 12 Aug 2013 14:24:23 +0000 (15:24 +0100)
committerDaniel Barton <daluke.barton@gmail.com>
Mon, 12 Aug 2013 14:24:23 +0000 (15:24 +0100)
updated in line with the RunnerConfig schema.

14 files changed:
conf/Executable.properties
conf/settings/RNAalifoldParameters.xml
datamodel/compbio/data/sequence/SequenceUtil.java
runner/compbio/runner/Util.java
runner/compbio/runner/structure/RNAalifold.java
testsrc/compbio/runner/structure/RNAalifoldParametersTester.java
testsrc/compbio/ws/client/TestRNAalifoldWS.java
testsrc/testdata/RNAalifoldParameters.xml
webservices/compbio/data/msa/FoldWS.java
webservices/compbio/ws/client/Jws2Client.java
webservices/compbio/ws/client/WSTester.java
webservices/compbio/ws/server/RNAalifoldWS.java
webservices/compbio/ws/server/resource/RNAalifoldWS.wsdl
webservices/compbio/ws/server/resource/RNAalifoldWS_schema1.xsd

index 7944081..9641fb9 100644 (file)
@@ -185,6 +185,7 @@ iupred.parameters.file=conf/settings/IUPredParameters.xml
 #local.aacon.bin=/sw/java/latest/bin/java\r
 #cluster.aacon.bin=/sw/java/latest/bin/java\r
 # Path to the AACon library\r
+\r
 aacon.jar.file=binaries/windows/aaconservation.jar\r
 aacon.parameters.file=conf/settings/AAConParameters.xml\r
 aacon.presets.file=conf/settings/AAConPresets.xml\r
@@ -198,5 +199,5 @@ aacon.presets.file=conf/settings/AAConPresets.xml
 #####                                  RNAALIFOLD CONFIGURATION                         ######\r
 # just the windows binary at the moment\r
 local.rnaalifold.bin.windows=binaries/windows/ViennaRNA/RNAalifold.exe\r
-rnaalifold.parameters.file=conf/settings/RNAalifoldParamteres.xml\r
+rnaalifold.parameters.file=conf/settings/RNAalifoldParameters.xml\r
 \r
index 2561ec4..5ee3fc2 100644 (file)
                <name>Partition Function</name>
                <description>Output partition function and probability matrix</description>
                <optionNames>-p</optionNames>
+               <optionNames>--partfunc</optionNames>
+               <defaultValue>-p</defaultValue>
+       </options>
+       <options isRequired='false'>
+               <name>p0</name>
+               <description>deactivates the calculation of the pair probabilities</description>
+               <optionNames>-p0</optionNames>
        </options>
        <options isRequired='false'>
                <name>color</name>
                <optionNames>--noPS</optionNames>
        </options>
        <options isRequired='false'>
-               <name>Partition Function</name>
-               <description>Output partition function and probability matrix</description>
-               <optionNames>-p</optionNames>
-       </options>
-       <options isRequired='false'>
                <name>Circular</name>
                <description>Assume circular RNA molecule</description>
                <optionNames>-c</optionNames>
@@ -54,7 +56,7 @@
                <defaultValue>-g</defaultValue>
        </options>
        <options isRequired='false'>
-               <name>Dangling End Preset</name>
+               <name>d2</name>
                <description>dangling energies will be added for the bases adjacent to a helix on both sides</description>
                <optionNames>-d2</optionNames>
        </options>
                <optionNames>--ribosum_scoring</optionNames>
                <defaultValue>-r</defaultValue>
        </options>
+       <options isRequired='false'>
+               <name>d2</name>
+               <description>
+               Dangling energies are added for the bases adjacent to a helix on both sides
+               </description>
+               <optionNames>-d2</optionNames>
+       </options>
+       <options isRequired='false'>
+               <name>MEA Structure</name>
+               <description>Maximum Expected Accuracy Structure</description>
+               <optionNames>--MEA</optionNames>
+       </options>
 <!-- Constraints are entered on the command line followed by the input .aln file
         Causing problems for a batch RNAalifold execution system -->
 <!--  
                        <type>String</type>
                </validValue>
        </option> -->
+       
+       <prmSeparator> </prmSeparator>
        <parameters isRequired='false'>
-               <name>MEA structure</name>
-               <description>Maximum Expected Accuracy Structure</description>
-               <optionNames>--MEA</optionNames>
-               <defaultValue>1</defaultValue>
+               <name>Stochastic Backtrack</name>
+               <description>Compute a number of random structures</description>
+               <optionNames>-s</optionNames>
+<!--           Having multiple optionNames requires a default value but -->
+<!--                   in a parameter defaultValue refers to the argument -->
+<!--           <optionNames>-stochBT</optionNames> -->
+               <defaultValue>5</defaultValue>  
                <validValue>
-                       <type>Float</type>
+                       <type>Integer</type>
+                       <min>1</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
-<!--  ?Will Jabaws recognize that arguments for the following params must
-be of the form -s INT and &dash-stochBT=INT -->
-<!--   <parameters isRequired='false'> -->
-<!--           <name>Stochastic Backtrack</name> -->
-<!--           <description>Compute a number of random structures</description> -->
-<!--           <optionNames>-s</optionNames> -->
-               <!-- Having multiple optionNames requires a default value but
-                       in a parameter defaultValue refers to the argument -->
-<!--           <optionNames>-stochBT</optionNames> -->
-<!--           <defaultValue>5</defaultValue>  arbitrary -->
-<!--           <validValue> -->
-<!--                   <type>Int</type> -->
-<!--           </validValue> -->
-<!--   </parameters> -->
        <parameters isRequired='false'>
                <name>stochBT_en</name>
                <description>Print Backtrack structures</description>
                <optionNames>--stochBT_en</optionNames>
                <defaultValue>5</defaultValue>  <!-- arbitrary -->
                <validValue>
-                       <type>Int</type>
+                       <type>Integer</type>
+                       <min>1</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -136,13 +145,20 @@ be of the form -s INT and &dash-stochBT=INT -->
                <defaultValue>1.07</defaultValue>
                <validValue>
                        <type>Float</type>
+                       <min>0</min>
+                       <max>100</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
                <name>bppmThreshold</name>
                <description>Threshold for base pair probabilities</description>
                <optionNames>--bppmThreshold</optionNames>
-               <defaultValue>1e-6</defaultValue>
+               <defaultValue>0.000001</defaultValue>
+               <validValue>
+                       <type>Float</type>
+                       <min>0.0000000000001</min>
+                       <max>1.0</max>
+               </validValue>
        </parameters>
        <parameters isRequired='false'>
                <name>Temperature</name>
@@ -151,7 +167,9 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <optionNames>-temp</optionNames> -->
                <defaultValue>37</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>-274</min>
+                       <max>1000000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -161,7 +179,9 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <optionNames>-dangles</optionNames> -->
                <defaultValue>2</defaultValue>
                <validValue>
-                       <type>Int</type>
+                       <type>Integer</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -170,7 +190,9 @@ be of the form -s INT and &dash-stochBT=INT -->
                <optionNames>--cfactor</optionNames>
                <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -179,7 +201,9 @@ be of the form -s INT and &dash-stochBT=INT -->
                <optionNames>--nfactor</optionNames>
                <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        
@@ -188,35 +212,42 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <name>Ribosum File</name> -->
 <!--           <description>Use Specified Ribosum Matrix</description> -->
 <!--           <optionNames>-R</optionNames> -->
-<!--           <optionNames>-ribosum_file</optionNames> --> <!-- commentx2 -->
+<!--           <optionNames>-ribosum_file</optionNames>  -->
 <!--   </parameters> -->
 <!--   <parameters isRequired='false'> -->
 <!--           <name>Paramfile</name> -->
 <!--           <description>Use Energy parameters from a file</description> -->
 <!--           <optionNames>-P</optionNames> -->
-<!--           <optionNames>-paramFile</optionNames> --> <!-- commentx2 -->
+<!--           <optionNames>-paramFile</optionNames>  -->
 <!--           <validValue> -->
 <!--                   <type>String</type> -->
 <!--           </validValue> -->
 <!--   </parameters> -->
        
+       <!-- The values of this parameter are in the form of a comma separated
+                       list of allowed pairs. This makes a complete parameter list
+                       too large to be represented as a list of possible values
+                       How to deal with this? -->
+                       <!--  just support the most biologically viable pairs? -->
+       
        <parameters isRequired='false'>
                <name>Allow Pairs</name>
-               <descrition>allow pairs in addition to AU, GC and GU</descrition>
+               <description>allow pairs in addition to AU, GC and GU</description>
                <optionNames>--nsp</optionNames>
                <defaultValue>-GA</defaultValue>
+               <possibleValues>-GA</possibleValues>
+               <possibleValues>-AG</possibleValues>
+       </parameters>
+       <!--  Is dependant on -p (partfunc) -->
+       <parameters isRequired='false'>
+               <name>betaScale</name>
+               <description>Set scaling of Boltzmann factors</description>
+               <optionNames>--betaScale</optionNames>
+               <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>String</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
-       <!--  Is dependant on -p (partfunc) -->
-<!--   <parameters isRequired='false'> -->
-<!--           <name>betaScale</name> -->
-<!--           <description>Set scaling of Boltzmann factors</description> -->
-<!--           <optionNames>-betaScale</optionNames> -->
-<!--           <defaultValue>1.0</defaultValue> -->
-<!--           <validValue> -->
-<!--                   <type>Double</type> -->
-<!--           </validValue> -->
-<!--   </parameters> -->
 </runnerConfig>
\ No newline at end of file
index 548e57d..884315d 100644 (file)
@@ -761,7 +761,7 @@ public final class SequenceUtil {
        /*\r
         * Reads and parses the output of an RNAalifold job \r
         * \r
-        * Currently only in the defualt no args format\r
+        * OUT OF USE\r
         */\r
        public static RNAstruct readRNAalifoldResults(InputStream results) {\r
                if (results == null) {\r
index f033bf0..c6cb33f 100644 (file)
@@ -20,6 +20,8 @@ package compbio.runner;
 \r
 import java.io.File;\r
 import java.io.FileInputStream;\r
+import java.io.FileReader;\r
+import java.io.BufferedReader;\r
 import java.io.FileNotFoundException;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
@@ -151,20 +153,55 @@ public final class Util {
                }\r
        }\r
        \r
-       public static final RNAstruct readRNAStructFile(String workDirectory,\r
+       // OUT OF USE\r
+       \r
+//     public static final RNAstruct readRNAStructFile(String workDirectory,\r
+//                     String structFile) throws IOException, FileNotFoundException {\r
+//             assert !compbio.util.Util.isEmpty(workDirectory);\r
+//             assert !compbio.util.Util.isEmpty(structFile);\r
+//             File sfile = new File(compbio.engine.client.Util.getFullPath(\r
+//                             workDirectory, structFile));\r
+//             if(!(sfile.exists() && sfile.length() > 0)) {\r
+//                     throw new FileNotFoundException("Result for the jobId "\r
+//                                     + workDirectory + "with file name " + structFile\r
+//                                     + " is not found!");\r
+//             }\r
+//             return compbio.data.sequence.SequenceUtil.readRNAalifoldResults(\r
+//                             new FileInputStream(sfile));\r
+//     }\r
+       \r
+       public static String readRNAStruct(String workDirectory,\r
                        String structFile) throws IOException, FileNotFoundException {\r
                assert !compbio.util.Util.isEmpty(workDirectory);\r
                assert !compbio.util.Util.isEmpty(structFile);\r
                File sfile = new File(compbio.engine.client.Util.getFullPath(\r
                                workDirectory, structFile));\r
-               log.trace("RNAALIFOLD OUTPUT FILE PATH: " + sfile.getAbsolutePath());\r
                if(!(sfile.exists() && sfile.length() > 0)) {\r
                        throw new FileNotFoundException("Result for the jobId "\r
                                        + workDirectory + "with file name " + structFile\r
                                        + " is not found!");\r
                }\r
-               return compbio.data.sequence.SequenceUtil.readRNAalifoldResults(\r
-                               new FileInputStream(sfile));\r
+               return readFile(sfile);\r
+       }\r
+       \r
+       public static String readFile(File inputFile) throws \r
+                       FileNotFoundException, IOException {\r
+\r
+               BufferedReader input    = new BufferedReader(new FileReader(inputFile));\r
+\r
+               String file = new String();\r
+               String line = new String();\r
+\r
+               while (true) {\r
+                       line = input.readLine();\r
+\r
+                       if (line != null) {\r
+                               file = file + line + "\r\n";\r
+                       } else break;\r
+               }\r
+               // Close file\r
+               input.close();\r
+               return file;\r
        }\r
        \r
        \r
index 3871ea9..52a784c 100644 (file)
@@ -6,10 +6,7 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
 
-//imports for filereader method
-import java.io.FileReader;
-import java.io.BufferedReader;
-import java.io.File;
+
 
 
 
@@ -61,11 +58,10 @@ public class RNAalifold extends SkeletalExecutable<RNAalifold>
        @SuppressWarnings("unchecked")
        @Override
        // PlaceHolder method
-       public RNAstruct getResults(String workDirectory)
+       public String getResults(String workDirectory)
                        throws ResultNotAvailableException {
                try {
-                       // System.out.println("Specialread " + Util.readRNAStructFile(workDirectory, getOutput()).toString());
-                       return Util.readRNAStructFile(workDirectory, getOutput());
+                       return Util.readRNAStruct(workDirectory, getOutput());
                        
                } catch (FileNotFoundException e) {
                        log.error(e.getMessage(), e.getCause());
index 21ed5d4..b93cd18 100644 (file)
@@ -70,11 +70,8 @@ public class RNAalifoldParametersTester {
                                        rnaalifoldConfigFile)), RunnerConfig.class);
                        // set Name value separator
                        rnaalifoldConfig.setPrmSeparator(" ");
-                       log.info("prmSeparator: " + rnaalifoldConfig.getPrmSeparator());
                        rnaalifoldOpc = new OptionCombinator(rnaalifoldConfig);
                        
-                       log.info("Num options: " + rnaalifoldOpc.getAllOptions().size());
-                       log.info("Num params: " + rnaalifoldOpc.getAllParameters().size());
                        
                        
                } catch (JAXBException e) {
@@ -124,42 +121,146 @@ public class RNAalifoldParametersTester {
                }
        }
        
-       @Test(groups = { AllTestSuit.test_group_runner })
+       
+       
+       @Test
        public void testOptions() {
-               test(rnaalifoldOpc.getAllOptions());
+               // populate list of incompatable pairs by their names. todo
+               List<List<String>> failPairs = new ArrayList<List<String>>();
+
+               
+               // test the parameters without -g option
+               test(removeParam(rnaalifoldOpc.getAllOptions(), "G-Quadruplex"));
+               // now test without -c option
+               test(removeParam(rnaalifoldOpc.getAllOptions(), "Circular"));
        }
        
-       @Test(groups = { AllTestSuit.test_group_runner })
+
+       // Prints all the incompatible option pairs 
+       // (-c, -g) and (-p, -p0)
+       
+       @Test
        public void testOptionPairs() throws ResultNotAvailableException {
                List<Option<?>> pair = new ArrayList<Option<?>>();
                List<Option<?>> options = rnaalifoldOpc.getAllOptions();
-               int numpairs = 0;
+               List<List<String>> failedOptionPairs = new ArrayList<List<String>>();
+               
+               boolean failed = true;
                for (int i = 0; i<options.size(); i++) {
                        for (int j = i; j<options.size(); j++) {
                                if (i != j) {
-                                       //System.out.println("special numOptions: " + options.size());
-                                       //System.out.println("special loop varaibles:-  (i,j): (" + i + "," + j +")");
                                        pair.clear();
                                        pair.add(options.get(i)); pair.add(options.get(j));
-                                       log.info("option pair to test: " + pair);
-                                       // I want to catch ResultNotAvailableException here so 
-                                       // I can return a list of imcompatable options but
-                                       // singleTest calls a fail() method...
-                                       // can i fail the test and continue running?
-                                       test(pair);
-                                       
-                                       //System.out.println("special numpairstested: " + ++numpairs);
+                                       List<String> args = rnaalifoldOpc.argumentsToCommandString(pair);
+                                       try { 
+                                               failed = singleRun(args);
+                                       } catch (ResultNotAvailableException e) {
+                                               System.out.println("Results not available: " + e.getMessage());
+                                               failed = true;
+                                       } catch (JobSubmissionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (JobExecutionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (IOException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       }
+                                       if (failed == true) {
+                                               failedOptionPairs.add(args);
+                                       }
                                }
                        }
                }
+               System.out.println("failedOptionPairs: " + failedOptionPairs);
+               
        }
-
+       
+       // tests for incompatible Pairs of Parameters 
+       // there are none however the --betascale parameter requires -p
+       
+       @Test
+       public void testParameterPairs() throws ResultNotAvailableException {
+               List<Parameter<?>> pair = new ArrayList<Parameter<?>>();
+               List<Parameter<?>> Parameters = rnaalifoldOpc.getAllParameters();
+               List<List<String>> failedParameterPairs = new ArrayList<List<String>>();
+               
+               
+               boolean failed = true;
+               for (int i = 0; i<Parameters.size(); i++) {
+                       for (int j = i; j<Parameters.size(); j++) {
+                               if (i != j) {
+                                       pair.clear();
+                                       pair.add(Parameters.get(i)); pair.add(Parameters.get(j));
+                                       List<String> args = rnaalifoldOpc.argumentsToCommandString(pair);
+                                       args.add("-p"); // --betascale requires -p
+                                       try { 
+                                               failed = singleRun(args);
+                                       } catch (ResultNotAvailableException e) {
+                                               System.out.println("Results not available: " + e.getMessage());
+                                               failed = true;
+                                       } catch (JobSubmissionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (JobExecutionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (IOException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       }
+                                       if (failed == true) {
+                                               failedParameterPairs.add(args);
+                                       }
+                               }
+                       }
+               }
+               System.out.println("failedParameterPairs: " + failedParameterPairs);
+               
+       }
+       
+       
+       // removes an argument from the list by name
+       public <U extends Option<?>> List<U> removeParam(List<U> optionList, String name) {
+               List<U> newL = new ArrayList<U>();
+               for (int i = 0; i < optionList.size(); i++) {
+                       System.out.println(name.equals(optionList.get(i).getName()));
+                       if (!name.equals(optionList.get(i).getName())) {
+                               
+                               newL.add(optionList.get(i));
+                       }
+                               
+               }
+               return newL;
+       }
+       
+       public <U extends Option<?>> List<U> removeParams(List<U> optionList, List<String> names) {
+               for (int i = 0; i < names.size(); i++) {
+                       optionList = removeParam(optionList, names.get(i));
+               }
+               return optionList;
+       }
+       
+       
        @Test(groups = { AllTestSuit.test_group_runner })
        public void testParameters() {
                List<Parameter<?>> params = rnaalifoldOpc.getAllParameters();
+               System.out.println("param list: " + params);
                Collections.shuffle(params);
-               test(params);
+               // test with -p for betascale option
+               List<String> precursor = new ArrayList<String>();
+               precursor.add("-p");
+               
+               test(params, precursor);
        }
+       
+       // incompatible pairs of arguments are
+       /*
+        * the -c and -g options
+        * the -d2 option and the -d option
+        * the -p and -p0 option
+        */
 
        @Test(groups = { AllTestSuit.test_group_runner })
        public void testArguments() {
@@ -169,19 +270,63 @@ public class RNAalifoldParametersTester {
                test(options);
        }
        
-       /*
-       void test(Map<Parameter<?>, String> paramValue) {
-               List<Parameter<?>> paramList = new ArrayList<Parameter<?>>(paramValue
-                               .keySet());
-               for (int i = 0; i < paramValue.size(); i++) {
-                       List<String> args = rnaalifoldOpc.parametersToCommandString(paramList, 
-                                       paramValue);
-                       singleTest(args);
-                       Collections.shuffle(paramList);
+       // This test supercedes the testParameterPair() and testOptionPair()
+       // tests by testing all pairs of arguments
+       
+       
+       @Test
+       public void testAllPairs() throws ResultNotAvailableException {
+               List<Option<?>> pair = new ArrayList<Option<?>>();
+               List<Option<?>> options = rnaalifoldOpc.getAllOptions();
+               
+               // take out -p options so it can be added to all commands later
+               options = removeParam(options, "Partition Function");
+               
+               options.addAll(rnaalifoldOpc.getAllParameters());
+               List<List<String>> failedOptionPairs = new ArrayList<List<String>>();
+               
+               boolean failed = true;
+               for (int i = 0; i<options.size(); i++) {
+                       for (int j = i; j<options.size(); j++) {
+                               if (i != j) {
+                                       pair.clear();
+                                       pair.add(options.get(i)); pair.add(options.get(j));
+                                       List<String> args = rnaalifoldOpc.argumentsToCommandString(pair);
+                                       // add -p
+                                       args.add("-p");
+                                       try { 
+                                               failed = singleRun(args);
+                                       } catch (ResultNotAvailableException e) {
+                                               System.out.println("Results not available: " + e.getMessage());
+                                               failed = true;
+                                       } catch (JobSubmissionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (JobExecutionException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       } catch (IOException e) {
+                                               e.printStackTrace();
+                                               fail(e.getLocalizedMessage());
+                                       }
+                                       if (failed == true) {
+                                               failedOptionPairs.add(args);
+                                       }
+                               }
+                       }
                }
-               log.info("NUMBER OF COMBINATION TESTED: " + paramValue.size());
+               System.out.println("failedOptionPairs: " + failedOptionPairs);
        }
-       */
+       
+       /*
+        *  This test method stolen from the other parameter testing classes
+        *  the only purpose of the Collections.shuffle(params) and the for loop
+        *  is to test giving the executable the parameters in different orders
+        *  which leads to a lot of (unnecessary?) tests with an argument list
+        *  as long as this one.
+        *  
+        */
+       
        
        void test(List<? extends Option<?>> params) {
                for (int i = 0; i < params.size(); i++) {
@@ -192,6 +337,18 @@ public class RNAalifoldParametersTester {
                log.info("NUMBER OF COMBINATION TESTED: " + params.size());
        }
        
+       // because some parameters presuppose the -p option
+       
+       void test(List<? extends Option<?>> params, List<String> precursor) {
+
+               for (int i = 0; i < params.size(); i++) {
+                       List<String> args = rnaalifoldOpc.argumentsToCommandString(params);
+                       args.addAll(precursor);
+                       singleTest(args);
+                       Collections.shuffle(params);
+               }
+               log.info("NUMBER OF COMBINATION TESTED: " + params.size());
+       }
        @Test
        void singleParamTest() {
                //List<Parameter<?>> params = rnaalifoldOpc.getAllParameters();
@@ -199,7 +356,8 @@ public class RNAalifoldParametersTester {
                
                //List<String> args = rnaalifoldOpc.argumentsToCommandString(params);
                List<String> args = new ArrayList<String>();
-               args.add("-T 37"); args.add("-S 1.07"); args.add("--stochBT_en=10");
+               args.add("-T 37"); args.add("-S 1.07"); args.add("--stochBT_en 10");
+               // replace "=" with " " to fail test
                args.add("--MEA=1");
                System.out.println("special: args: " + args);
                singleTest(args);
@@ -219,7 +377,10 @@ public class RNAalifoldParametersTester {
                        LocalRunner lr = new LocalRunner(confRNAalifold);
                        lr.executeJob();
                        confRNAalifold = (ConfiguredExecutable<RNAalifold>) lr.waitForResult();
-                       assertNotNull(confRNAalifold.getResults());
+                       assertNotNull(confRNAalifold.getResults(), "results is null");
+                       
+                       //System.out.println("Results: \n" + confRNAalifold.getResults());
+                       
                        File errors = new File(confRNAalifold.getWorkDirectory(),
                                        ExecutableWrapper.PROC_ERR_FILE);
                        if (errors.length() != 0) {
@@ -243,4 +404,42 @@ public class RNAalifoldParametersTester {
                }
        }
        
+       /* A version of singleTest that continues running instead of calling
+        * fail() when it encounters a problem
+        * 
+        * Used to identify incompatible options and parameters
+        * returns -1 on failure
+        * 
+        * Bad Progamming practice? 
+        */
+       
+       
+       boolean singleRun(List<String> params) throws JobSubmissionException,
+                       JobExecutionException, IOException, ResultNotAvailableException {
+               boolean fail = true;
+               log.info("Using arguments: " + params);
+               RNAalifold rnaalifold = new RNAalifold();
+               rnaalifold.setInput(AllTestSuit.test_input_aln).setOutput(test_outfile);
+
+               ConfiguredExecutable<RNAalifold> confRNAalifold = Configurator
+                               .configureExecutable(rnaalifold, ExecProvider.Local);
+               // Add options to the executable
+               confRNAalifold.addParameters(params);
+               LocalRunner lr = new LocalRunner(confRNAalifold);
+               lr.executeJob();
+               confRNAalifold = (ConfiguredExecutable<RNAalifold>) lr.waitForResult();
+               
+               //System.out.println("Results: \n" + confRNAalifold.getResults());
+               
+               if (confRNAalifold.getResults() != null) fail = false;
+               File errors = new File(confRNAalifold.getWorkDirectory(),
+                               ExecutableWrapper.PROC_ERR_FILE);
+               if (errors.length() != 0) {
+                       log.error("PROBLEMS:\n " + FileUtil.readFileToString(errors));
+               }
+               assertTrue(errors.length() == 0, "Run with arguments : " + params
+                               + " FAILED!");
+               Collections.shuffle(params);
+               return fail;
+               }
 }
index 2d392f7..b061fcc 100644 (file)
@@ -1,5 +1,6 @@
 package compbio.ws.client;
 
+import compbio.metadata.AllTestSuit;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
 import static org.testng.Assert.fail;
@@ -17,10 +18,10 @@ import javax.xml.ws.WebServiceException;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
+import compbio.data.msa.FoldWS;
 import compbio.data.msa.JABAService;
 import compbio.data.msa.SequenceAnnotation;
 import compbio.data.sequence.Alignment;
-import compbio.data.structure.FoldWS;
 import compbio.data.sequence.RNAstruct;
 import compbio.data.sequence.ClustalAlignmentUtil;
 import compbio.data.sequence.ConservationMethod;
@@ -37,47 +38,50 @@ import compbio.metadata.ResultNotAvailableException;
 import compbio.metadata.RunnerConfig;
 import compbio.metadata.UnsupportedRuntimeException;
 import compbio.metadata.WrongParameterException;
-
 import compbio.runner.conservation.AACon;
 import compbio.util.SysPrefs;
 import compbio.ws.server.RNAalifoldWS;
 
+
 public class TestRNAalifoldWS {
        
        FoldWS<RNAalifoldWS> foldws;
        
-//     @BeforeTest(groups = {AllTestSuit.test_group_webservices})
-//     void initConnection() {
-//             
-//             try {
-//                     JABAService client = Jws2Client.connect(
-//                                     "http://localhost:8080/jabaws", Services.RNAalifoldWS);
-//                     foldws = (FoldWS<RNAalifoldWS>) client;
-//             } catch (ConnectException e) {
-//                     e.printStackTrace();
-//                     fail(e.getMessage());
-//             } catch (WebServiceException e) {
-//                     e.printStackTrace();
-//                     fail(e.getMessage());
-//             }
-//     }
+       @BeforeTest(groups = {AllTestSuit.test_group_webservices})
+       void initConnection() {
+               
+               try {
+                       JABAService client = Jws2Client.connect(
+                                       "http://localhost:8080/jabaws", Services.RNAalifoldWS);
+                       foldws = (FoldWS<RNAalifoldWS>) client;
+               } catch (ConnectException e) {
+                       e.printStackTrace();
+                       fail(e.getMessage());
+               } catch (WebServiceException e) {
+                       e.printStackTrace();
+                       fail(e.getMessage());
+               }
+       }
 
        
        @Test(groups = {AllTestSuit.test_group_webservices})
        public void testFold() throws FileNotFoundException, IOException,
                        UnknownFileFormatException {
                
-               String CURRENT_DIRECTORY = SysPrefs.getCurrentDirectory()
-                               + File.separator;
+//             String CURRENT_DIRECTORY = SysPrefs.getCurrentDirectory()
+//                             + File.separator;
                
                Alignment aln = ClustalAlignmentUtil.readClustalFile(new FileInputStream(
-                               CURRENT_DIRECTORY + "testsrc" + File.separator + "testdata"
-                                       + File.separator + "unfolded_RF00031.aln"));
+                               AllTestSuit.test_input_aln));
                
                try {
-                       String jobId = foldws.fold(aln);
+                       List<Option<RNAalifoldWS>> options  = new ArrayList<Option<RNAalifoldWS>>();
+                       options.add(foldws.getRunnerOptions().getArgumentByOptionName("--mis"));
+                       System.out.println("TestRNAalifoldWS: print options: " + options.toString());
+                       String jobId = foldws.customFold(aln, options);
                        System.out.println("J: " + jobId);
-                       RNAstruct result = foldws.getResult(jobId);
+                       String result = foldws.getResult(jobId);
+                       System.out.println("fold results: \n" + result);
                        assertNotNull(result);
                        
                } catch (UnsupportedRuntimeException e) {
@@ -92,7 +96,10 @@ public class TestRNAalifoldWS {
                } catch (ResultNotAvailableException e) {
                        e.printStackTrace();
                        fail(e.getMessage());
-               } 
+               } catch (WrongParameterException e) {
+                       e.printStackTrace();
+                       fail(e.getMessage());
+               }
        }
 }
        
index 2561ec4..845f480 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
-<runnerConfig>
+<runnerConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                       xsi:noNamespaceSchemaLocation="RunnerConfigSchema.xsd">
        <runnerClassName>compbio.runner.structure.RNAalifold</runnerClassName>
        <options isRequired='false'>
                <name>Endgaps</name>
                <name>Partition Function</name>
                <description>Output partition function and probability matrix</description>
                <optionNames>-p</optionNames>
+               <optionNames>--partfunc</optionNames>
+               <defaultValue>-p</defaultValue>
+       </options>
+       <options isRequired='false'>
+               <name>p0</name>
+               <description>deactivates the calculation of the pair probabilities</description>
+               <optionNames>-p0</optionNames>
        </options>
        <options isRequired='false'>
                <name>color</name>
                <optionNames>--noPS</optionNames>
        </options>
        <options isRequired='false'>
-               <name>Partition Function</name>
-               <description>Output partition function and probability matrix</description>
-               <optionNames>-p</optionNames>
-       </options>
-       <options isRequired='false'>
                <name>Circular</name>
                <description>Assume circular RNA molecule</description>
                <optionNames>-c</optionNames>
@@ -54,7 +57,7 @@
                <defaultValue>-g</defaultValue>
        </options>
        <options isRequired='false'>
-               <name>Dangling End Preset</name>
+               <name>d2</name>
                <description>dangling energies will be added for the bases adjacent to a helix on both sides</description>
                <optionNames>-d2</optionNames>
        </options>
                <optionNames>--ribosum_scoring</optionNames>
                <defaultValue>-r</defaultValue>
        </options>
+       <options isRequired='false'>
+               <name>d2</name>
+               <description>
+               Dangling energies are added for the bases adjacent to a helix on both sides
+               </description>
+               <optionNames>-d2</optionNames>
+       </options>
+       <options isRequired='false'>
+               <name>MEA Structure</name>
+               <description>Maximum Expected Accuracy Structure</description>
+               <optionNames>--MEA</optionNames>
+       </options>
 <!-- Constraints are entered on the command line followed by the input .aln file
         Causing problems for a batch RNAalifold execution system -->
 <!--  
                        <type>String</type>
                </validValue>
        </option> -->
+       
+       <prmSeparator> </prmSeparator>
        <parameters isRequired='false'>
-               <name>MEA structure</name>
-               <description>Maximum Expected Accuracy Structure</description>
-               <optionNames>--MEA</optionNames>
-               <defaultValue>1</defaultValue>
+               <name>Stochastic Backtrack</name>
+               <description>Compute a number of random structures</description>
+               <optionNames>-s</optionNames>
+<!--           Having multiple optionNames requires a default value but -->
+<!--                   in a parameter defaultValue refers to the argument -->
+<!--           <optionNames>-stochBT</optionNames> -->
+               <defaultValue>5</defaultValue>  
                <validValue>
-                       <type>Float</type>
+                       <type>Integer</type>
+                       <min>1</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
-<!--  ?Will Jabaws recognize that arguments for the following params must
-be of the form -s INT and &dash-stochBT=INT -->
-<!--   <parameters isRequired='false'> -->
-<!--           <name>Stochastic Backtrack</name> -->
-<!--           <description>Compute a number of random structures</description> -->
-<!--           <optionNames>-s</optionNames> -->
-               <!-- Having multiple optionNames requires a default value but
-                       in a parameter defaultValue refers to the argument -->
-<!--           <optionNames>-stochBT</optionNames> -->
-<!--           <defaultValue>5</defaultValue>  arbitrary -->
-<!--           <validValue> -->
-<!--                   <type>Int</type> -->
-<!--           </validValue> -->
-<!--   </parameters> -->
        <parameters isRequired='false'>
                <name>stochBT_en</name>
                <description>Print Backtrack structures</description>
                <optionNames>--stochBT_en</optionNames>
                <defaultValue>5</defaultValue>  <!-- arbitrary -->
                <validValue>
-                       <type>Int</type>
+                       <type>Integer</type>
+                       <min>1</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -136,13 +146,20 @@ be of the form -s INT and &dash-stochBT=INT -->
                <defaultValue>1.07</defaultValue>
                <validValue>
                        <type>Float</type>
+                       <min>0</min>
+                       <max>100</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
                <name>bppmThreshold</name>
                <description>Threshold for base pair probabilities</description>
                <optionNames>--bppmThreshold</optionNames>
-               <defaultValue>1e-6</defaultValue>
+               <defaultValue>0.000001</defaultValue>
+               <validValue>
+                       <type>Float</type>
+                       <min>0.0000000000001</min>
+                       <max>1.0</max>
+               </validValue>
        </parameters>
        <parameters isRequired='false'>
                <name>Temperature</name>
@@ -151,7 +168,9 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <optionNames>-temp</optionNames> -->
                <defaultValue>37</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>-274</min>
+                       <max>1000000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -161,7 +180,9 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <optionNames>-dangles</optionNames> -->
                <defaultValue>2</defaultValue>
                <validValue>
-                       <type>Int</type>
+                       <type>Integer</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -170,7 +191,9 @@ be of the form -s INT and &dash-stochBT=INT -->
                <optionNames>--cfactor</optionNames>
                <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        <parameters isRequired='false'>
@@ -179,7 +202,9 @@ be of the form -s INT and &dash-stochBT=INT -->
                <optionNames>--nfactor</optionNames>
                <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>Double</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
        
@@ -188,35 +213,42 @@ be of the form -s INT and &dash-stochBT=INT -->
 <!--           <name>Ribosum File</name> -->
 <!--           <description>Use Specified Ribosum Matrix</description> -->
 <!--           <optionNames>-R</optionNames> -->
-<!--           <optionNames>-ribosum_file</optionNames> --> <!-- commentx2 -->
+<!--           <optionNames>-ribosum_file</optionNames>  -->
 <!--   </parameters> -->
 <!--   <parameters isRequired='false'> -->
 <!--           <name>Paramfile</name> -->
 <!--           <description>Use Energy parameters from a file</description> -->
 <!--           <optionNames>-P</optionNames> -->
-<!--           <optionNames>-paramFile</optionNames> --> <!-- commentx2 -->
+<!--           <optionNames>-paramFile</optionNames>  -->
 <!--           <validValue> -->
 <!--                   <type>String</type> -->
 <!--           </validValue> -->
 <!--   </parameters> -->
        
+       <!-- The values of this parameter are in the form of a comma separated
+                       list of allowed pairs. This makes a complete parameter list
+                       too large to be represented as a list of possible values
+                       How to deal with this? -->
+                       <!--  just support the most biologically viable pairs? -->
+       
        <parameters isRequired='false'>
                <name>Allow Pairs</name>
-               <descrition>allow pairs in addition to AU, GC and GU</descrition>
+               <description>allow pairs in addition to AU, GC and GU</description>
                <optionNames>--nsp</optionNames>
                <defaultValue>-GA</defaultValue>
+               <possibleValues>-GA</possibleValues>
+               <possibleValues>-AG</possibleValues>
+       </parameters>
+       <!--  Is dependant on -p (partfunc) -->
+       <parameters isRequired='false'>
+               <name>betaScale</name>
+               <description>Set scaling of Boltzmann factors</description>
+               <optionNames>--betaScale</optionNames>
+               <defaultValue>1.0</defaultValue>
                <validValue>
-                       <type>String</type>
+                       <type>Float</type>
+                       <min>0</min>
+                       <max>100000</max>
                </validValue>
        </parameters>
-       <!--  Is dependant on -p (partfunc) -->
-<!--   <parameters isRequired='false'> -->
-<!--           <name>betaScale</name> -->
-<!--           <description>Set scaling of Boltzmann factors</description> -->
-<!--           <optionNames>-betaScale</optionNames> -->
-<!--           <defaultValue>1.0</defaultValue> -->
-<!--           <validValue> -->
-<!--                   <type>Double</type> -->
-<!--           </validValue> -->
-<!--   </parameters> -->
 </runnerConfig>
\ No newline at end of file
index 9f0d4d8..4a99b9f 100644 (file)
@@ -53,7 +53,7 @@ public interface FoldWS<T>
                        throws UnsupportedRuntimeException, LimitExceededException,
                        JobSubmissionException, WrongParameterException;
        
-       RNAstruct getResult(@WebParam(name = "jobId") String jobId)
+       String getResult(@WebParam(name = "jobId") String jobId)
                throws ResultNotAvailableException;
                        
 }
index 888ec5f..a06a6fa 100644 (file)
@@ -161,8 +161,10 @@ public class Jws2Client {
                        customOptions = MetadataHelper.processParameters(prms,\r
                                        msaws.getRunnerOptions());\r
                }\r
+//             System.out.println("The Options read from the command line: " + customOptions);\r
+               \r
                Alignment alignment = null;\r
-               RNAstruct rnastruct = null;\r
+               String rnastruct = null;\r
                if (inputFile != null) {\r
                        Writer writer = null;\r
                        if (outFile != null) {\r
@@ -185,7 +187,7 @@ public class Jws2Client {
                                rnastruct = fold(inputFile, (FoldWS<T>) foldws, preset, customOptions);\r
                                // No IOHelper method for rnastruct/String yet\r
                                if (writer != null) {\r
-                                       writer.write(rnastruct.toString());\r
+                                       writer.write(rnastruct);\r
                                }\r
                        }\r
                        writer.close();\r
@@ -532,14 +534,14 @@ public class Jws2Client {
         *            Preset to use optional\r
         * @param customOptions\r
         *            file which contains new line separated list of options\r
-        * @return RNAstruct\r
+        * @return String\r
         */\r
        \r
-       static <T> RNAstruct fold(File file, FoldWS<T> foldws, Preset<T> preset,\r
+       static <T> String fold(File file, FoldWS<T> foldws, Preset<T> preset,\r
                        List<Option<T>> customOptions) {\r
                FileInputStream instream = null;\r
                Alignment alignment = null;\r
-               RNAstruct rnastruct = null;\r
+               String rnastruct = null;\r
                try {\r
                        instream = new FileInputStream(file);\r
                        alignment = ClustalAlignmentUtil.readClustalFile(instream);\r
@@ -559,8 +561,6 @@ public class Jws2Client {
                        System.out.println("\n\ncalling fold.........");\r
                        Thread.sleep(1000);\r
                        rnastruct = foldws.getResult(jobId);\r
-                       log.info("log test print results:\n" + rnastruct.toString());\r
-                       System.out.println("print test results:\n " + rnastruct.toString());\r
                                \r
                } catch (IOException e) {\r
                        System.err.println("Exception while reading the input file. Exception details: ");\r
index c6eaf76..5b0d760 100644 (file)
@@ -35,9 +35,11 @@ import javax.xml.ws.WebServiceException;
 import compbio.data.msa.JABAService;\r
 import compbio.data.msa.Metadata;\r
 import compbio.data.msa.MsaWS;\r
+import compbio.data.msa.FoldWS;\r
 import compbio.data.msa.SequenceAnnotation;\r
 import compbio.data.sequence.Alignment;\r
 import compbio.data.sequence.FastaSequence;\r
+import compbio.data.sequence.Program;\r
 import compbio.data.sequence.ScoreManager;\r
 import compbio.data.sequence.SequenceUtil;\r
 import compbio.metadata.JobStatus;\r
@@ -74,6 +76,8 @@ public class WSTester {
                        + "ASDAAPEH------------PGIALWLHALE-DAGQAEAAA---AYTRAHQLLPEEPYITAQLLNAVA\n"\r
                        + "";\r
 \r
+       \r
+       \r
        static final List<FastaSequence> seqs = loadSeqs();\r
 \r
        private static final String FAILED = "FAILED";\r
@@ -206,6 +210,15 @@ public class WSTester {
                testMetadata(msaws);\r
                return succeed;\r
        }\r
+       \r
+       private <T> boolean testFoldWS(FoldWS<T> foldws) throws Exception {\r
+               assert foldws != null;\r
+               \r
+               boolean succeed = testDefaultFold(foldws);\r
+               \r
+               // testMetadata(foldws);\r
+               return succeed;\r
+       }\r
        /**\r
         * Call most of web services functions and check the output\r
         * \r
@@ -230,6 +243,8 @@ public class WSTester {
                        } else if (wservice instanceof SequenceAnnotation) {\r
                                return testSequenceAnnotationWS(\r
                                                (SequenceAnnotation<T>) wservice, service);\r
+                       } else if (wservice instanceof FoldWS) {\r
+                               return testFoldWS( (FoldWS<T>) wservice);\r
                        } else {\r
                                throw new UnsupportedOperationException("The service: "\r
                                                + wservice.getClass() + " is not supported! ");\r
@@ -360,6 +375,38 @@ public class WSTester {
                }\r
                return succeed;\r
        }\r
+       \r
+       /**\r
+        * Fold using default settings\r
+        * \r
+        * @param <T>\r
+        * @param foldws\r
+        * @throws UnsupportedRuntimeException\r
+        */\r
+       \r
+       private <T> boolean testDefaultFold(FoldWS<T> foldws) throws Exception {\r
+               writer.print("Testing fold with default parameters:");\r
+               // load the input from the aligned fasta string at the top of the file\r
+               Alignment al = new Alignment(loadAlignment(), Program.CLUSTAL, '-');\r
+               String rs = null;\r
+               boolean succeed = false;\r
+               \r
+               String taskId = foldws.fold(al);\r
+               writer.print("\nQuerying job status...");\r
+               JobStatus status = foldws.getJobStatus(taskId);\r
+               while (status != JobStatus.FINISHED) {\r
+                       Thread.sleep(1000);\r
+                       status = foldws.getJobStatus(taskId);\r
+               }\r
+               writer.println(OK);\r
+               writer.print("Retrieving results...");\r
+               rs = foldws.getResult(taskId);\r
+               succeed = true;\r
+               if (rs != null) {\r
+                       writer.println(OK);\r
+               }\r
+               return succeed;\r
+       }\r
        /**\r
         * Test JWS2 web services\r
         * \r
index f838b16..cafb173 100644 (file)
@@ -102,7 +102,7 @@ public class RNAalifoldWS implements FoldWS<RNAalifold> {
        }
        
        @SuppressWarnings("unchecked")
-       public RNAstruct getResult(String jobId) throws ResultNotAvailableException {
+       public String getResult(String jobId) throws ResultNotAvailableException {
                
                WSUtil.validateJobId(jobId);
                AsyncExecutor asyncEngine = Configurator.getAsyncEngine(jobId);
index 5c07638..fea5adb 100644 (file)
   <message name="pullExecStatisticsResponse">
     <part name="parameters" element="tns:pullExecStatisticsResponse"/>
   </message>
-  <message name="getJobStatus">
-    <part name="parameters" element="tns:getJobStatus"/>
-  </message>
-  <message name="getJobStatusResponse">
-    <part name="parameters" element="tns:getJobStatusResponse"/>
-  </message>
   <message name="cancelJob">
     <part name="parameters" element="tns:cancelJob"/>
   </message>
   <message name="cancelJobResponse">
     <part name="parameters" element="tns:cancelJobResponse"/>
   </message>
+  <message name="getJobStatus">
+    <part name="parameters" element="tns:getJobStatus"/>
+  </message>
+  <message name="getJobStatusResponse">
+    <part name="parameters" element="tns:getJobStatusResponse"/>
+  </message>
   <message name="getRunnerOptions">
     <part name="parameters" element="tns:getRunnerOptions"/>
   </message>
   <message name="getLimitResponse">
     <part name="parameters" element="tns:getLimitResponse"/>
   </message>
-  <message name="getPresets">
-    <part name="parameters" element="tns:getPresets"/>
-  </message>
-  <message name="getPresetsResponse">
-    <part name="parameters" element="tns:getPresetsResponse"/>
-  </message>
   <message name="getLimits">
     <part name="parameters" element="tns:getLimits"/>
   </message>
   <message name="getLimitsResponse">
     <part name="parameters" element="tns:getLimitsResponse"/>
   </message>
+  <message name="getPresets">
+    <part name="parameters" element="tns:getPresets"/>
+  </message>
+  <message name="getPresetsResponse">
+    <part name="parameters" element="tns:getPresetsResponse"/>
+  </message>
   <portType name="FoldWS">
     <operation name="getResult">
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getResultRequest" message="tns:getResult"/>
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/pullExecStatisticsRequest" message="tns:pullExecStatistics"/>
       <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/pullExecStatisticsResponse" message="tns:pullExecStatisticsResponse"/>
     </operation>
-    <operation name="getJobStatus">
-      <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusRequest" message="tns:getJobStatus"/>
-      <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusResponse" message="tns:getJobStatusResponse"/>
-    </operation>
     <operation name="cancelJob">
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/cancelJobRequest" message="tns:cancelJob"/>
       <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/cancelJobResponse" message="tns:cancelJobResponse"/>
     </operation>
+    <operation name="getJobStatus">
+      <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusRequest" message="tns:getJobStatus"/>
+      <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getJobStatusResponse" message="tns:getJobStatusResponse"/>
+    </operation>
     <operation name="getRunnerOptions">
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getRunnerOptionsRequest" message="tns:getRunnerOptions"/>
       <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getRunnerOptionsResponse" message="tns:getRunnerOptionsResponse"/>
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitRequest" message="tns:getLimit"/>
       <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitResponse" message="tns:getLimitResponse"/>
     </operation>
-    <operation name="getPresets">
-      <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsRequest" message="tns:getPresets"/>
-      <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsResponse" message="tns:getPresetsResponse"/>
-    </operation>
     <operation name="getLimits">
       <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitsRequest" message="tns:getLimits"/>
       <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getLimitsResponse" message="tns:getLimitsResponse"/>
     </operation>
+    <operation name="getPresets">
+      <input wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsRequest" message="tns:getPresets"/>
+      <output wsam:Action="http://msa.data.compbio/01/01/2010/FoldWS/getPresetsResponse" message="tns:getPresetsResponse"/>
+    </operation>
   </portType>
   <binding name="RNAalifoldWSPortBinding" type="tns:FoldWS">
     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
         <soap:body use="literal"/>
       </output>
     </operation>
-    <operation name="getJobStatus">
+    <operation name="cancelJob">
       <soap:operation soapAction=""/>
       <input>
         <soap:body use="literal"/>
         <soap:body use="literal"/>
       </output>
     </operation>
-    <operation name="cancelJob">
+    <operation name="getJobStatus">
       <soap:operation soapAction=""/>
       <input>
         <soap:body use="literal"/>
         <soap:body use="literal"/>
       </output>
     </operation>
-    <operation name="getPresets">
+    <operation name="getLimits">
       <soap:operation soapAction=""/>
       <input>
         <soap:body use="literal"/>
         <soap:body use="literal"/>
       </output>
     </operation>
-    <operation name="getLimits">
+    <operation name="getPresets">
       <soap:operation soapAction=""/>
       <input>
         <soap:body use="literal"/>
index 5c6f88d..43f9e11 100644 (file)
 
   <xs:complexType name="getResultResponse">
     <xs:sequence>
-      <xs:element name="return" type="tns:rnAstruct" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-
-  <xs:complexType name="rnAstruct" final="extension restriction">
-    <xs:sequence>
-      <xs:element name="sequence" type="xs:string" minOccurs="0"/>
-      <xs:element name="structure" type="xs:string" minOccurs="0"/>
-      <xs:element name="minEnergy" type="xs:float" minOccurs="0"/>
-      <xs:element name="energySum1" type="xs:float" minOccurs="0"/>
-      <xs:element name="energySum2" type="xs:float" minOccurs="0"/>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
 
     </xs:sequence>
   </xs:complexType>
 
-  <xs:complexType name="getLimits">
-    <xs:sequence/>
-  </xs:complexType>
-
-  <xs:complexType name="getLimitsResponse">
-    <xs:sequence>
-      <xs:element name="return" type="tns:limitsManager" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-
-  <xs:complexType name="limitsManager">
-    <xs:sequence>
-      <xs:element name="runnerClassName" type="xs:string" minOccurs="0"/>
-      <xs:element name="limit" type="tns:limit" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-    </xs:sequence>
-  </xs:complexType>
-
-  <xs:complexType name="limit">
-    <xs:sequence>
-      <xs:element name="preset" type="xs:string" minOccurs="0"/>
-      <xs:element name="seqNumber" type="xs:int"/>
-      <xs:element name="seqLength" type="xs:int"/>
-    </xs:sequence>
-    <xs:attribute name="isDefault" type="xs:boolean" use="required"/>
-  </xs:complexType>
-
   <xs:complexType name="getPresets">
     <xs:sequence/>
   </xs:complexType>
     </xs:sequence>
   </xs:complexType>
 
+  <xs:complexType name="getLimits">
+    <xs:sequence/>
+  </xs:complexType>
+
+  <xs:complexType name="getLimitsResponse">
+    <xs:sequence>
+      <xs:element name="return" type="tns:limitsManager" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="limitsManager">
+    <xs:sequence>
+      <xs:element name="runnerClassName" type="xs:string" minOccurs="0"/>
+      <xs:element name="limit" type="tns:limit" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="limit">
+    <xs:sequence>
+      <xs:element name="preset" type="xs:string" minOccurs="0"/>
+      <xs:element name="seqNumber" type="xs:int"/>
+      <xs:element name="seqLength" type="xs:int"/>
+    </xs:sequence>
+    <xs:attribute name="isDefault" type="xs:boolean" use="required"/>
+  </xs:complexType>
+
   <xs:complexType name="getLimit">
     <xs:sequence>
       <xs:element name="presetName" type="xs:string" minOccurs="0"/>