JWS2 client
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 8 Jun 2011 17:36:31 +0000 (17:36 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Wed, 8 Jun 2011 17:36:31 +0000 (17:36 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4237 e3abac25-378b-4346-85de-24260fe3988d

webservices/compbio/ws/client/Constraints.java
webservices/compbio/ws/client/Jws2Client.java
webservices/compbio/ws/client/client_help.txt [new file with mode: 0644]

index 08b06ac..6cb6992 100644 (file)
@@ -8,6 +8,9 @@ class Constraints {
        final static String hostkey = "-h";\r
        final static String servicekey = "-s";\r
 \r
+       final static String listServices = "-list_services";\r
+       final static String testKey = "-test";\r
+\r
        // Actions\r
        final static String inputkey = "-i";\r
 \r
@@ -21,4 +24,71 @@ class Constraints {
        final static String parameterkey = "-p";\r
        final static String presetkey = "-r";\r
 \r
+       final static String help_text = "\r\n"\r
+                       + "JABAWS client v2.0 June 2011 http://www.compbio.dundee.ac.uk/jabaws \r\n"\r
+                       + " \r\n"\r
+                       + "Usage: <Class or Jar file name> -h=host_and_context <-s=serviceName> ACTION [OPTIONS] \r\n"\r
+                       + "\r\n"\r
+                       + "-h=<host_context>  - a full URL to the JABAWS web server including context \r\n"\r
+                       + "                     path e.g. http://10.31.1.159:8080/ws\r\n"\r
+                       + "-s=<ServiceName>   - one of [MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, \r\n"\r
+                       + "                     AAConWS, JronnWS, DisemblWS, GlobPlotWS]\r\n"\r
+                       + "                     <serviceName> is required for all ACTIONS but -list_services\r\n"\r
+                       + "\r\n"\r
+                       + "ACTIONS: \r\n"\r
+                       + "-list_services    - list available services\r\n"\r
+                       + "-test             - test service \r\n"\r
+                       + "-i=<inputFile>    - full path to fasta formatted sequence file, from which to align \r\n"\r
+                       + "                    sequences\r\n"\r
+                       + "-parameters       - lists parameters supported by web service\r\n"\r
+                       + "-presets          - lists presets supported by web service\r\n"\r
+                       + "-limits           - lists web services limits\r\n"\r
+                       + "\r\n"\r
+                       + "Please note that if input file is specified other actions are ignored\r\n"\r
+                       + "\r\n"\r
+                       + "OPTIONS (only for use with -i action):\r\n"\r
+                       + "-r=<presetName>   - name of the preset to use\r\n"\r
+                       + "-o=<outputFile>   - full path to the file where to write an alignment\r\n"\r
+                       + "-f=<PrmInputFile> - the name of the file with the list of parameters to use.\r\n"\r
+                       + "\r\n"\r
+                       + "Please note that -r and -f options cannot be used together. Alignment is done with \r\n"\r
+                       + "either preset or a parameters from the file, but not both!\r\n"\r
+                       + "\r\n"\r
+                       + "EXAMPLES: \r\n"\r
+                       + "\r\n"\r
+                       + "1) List all available services on the host \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -list_services\r\n"\r
+                       + "\r\n"\r
+                       + "2) Test Clustal web service \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ClustalWS -test \r\n"\r
+                       + "\r\n"\r
+                       + "3) Align sequence from file input.txt with Probcons. Record resulting alignment \r\n"\r
+                       + "into the output.txt \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ProbconsWS -i=input.txt -o=output.txt\r\n"\r
+                       + "\r\n"\r
+                       + "4) Calculate disorder with Disembl take input from input.txt, output results to \r\n"\r
+                       + "the console \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=DisemblWS -i=input.txt \r\n"\r
+                       + "\r\n"\r
+                       + "5) List all parameters available for AAconWS service \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -parameters\r\n"\r
+                       + "\r\n"\r
+                       + "6) Calculate conservation with AAConWS using LANDGRAF method, for Clustal alignment \r\n"\r
+                       + "from input.txt and report  the scores to the console \r\n"\r
+                       + "\r\n"\r
+                       + "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -i=input.txt -f=prm.txt \r\n"\r
+                       + "\r\n"\r
+                       + "Where the content of prm.txt file is -m=LANDGRAF\r\n"\r
+                       + "The list of the supported parameters can be obtained as shown in the example 5. \r\n"\r
+                       + "\r\n"\r
+                       + "Citation: Peter V. Troshin, James B. Procter and Geoffrey J. Barton - \"Java \r\n"\r
+                       + "Bioinformatics Analysis Web Services for Multiple Sequence Alignment - \r\n"\r
+                       + "JABAWS:MSA\" Bioinformatics 2011; doi: 10.1093/bioinformatics/btr304.\r\n"\r
+                       + "";\r
+\r
 }\r
index f3ca471..a0c95d1 100644 (file)
 \r
 package compbio.ws.client;\r
 \r
-import static compbio.ws.client.Constraints.hostkey;\r
 import static compbio.ws.client.Constraints.inputkey;\r
-import static compbio.ws.client.Constraints.limitList;\r
 import static compbio.ws.client.Constraints.outputkey;\r
 import static compbio.ws.client.Constraints.paramFile;\r
-import static compbio.ws.client.Constraints.paramList;\r
-import static compbio.ws.client.Constraints.presetList;\r
-import static compbio.ws.client.Constraints.presetkey;\r
-import static compbio.ws.client.Constraints.pseparator;\r
-import static compbio.ws.client.Constraints.servicekey;\r
 \r
 import java.io.Closeable;\r
 import java.io.File;\r
@@ -445,46 +438,7 @@ public class Jws2Client {
         * @param exitStatus\r
         */\r
        static void printUsage(int exitStatus) {\r
-               System.out.println();\r
-               System.out.println("Usage: <Class or Jar file name> " + hostkey\r
-                               + pseparator + "host_and_context " + servicekey + pseparator\r
-                               + "serviceName ACTION [OPTIONS] ");\r
-               System.out.println();\r
-               System.out\r
-                               .println(hostkey\r
-                                               + pseparator\r
-                                               + "<host_and_context> - a full URL to the JWS2 web server including context path e.g. http://10.31.1.159:8080/ws");\r
-               System.out.println(servicekey + pseparator + "<ServiceName> - one of "\r
-                               + Arrays.toString(Services.values()));\r
-               System.out.println();\r
-               System.out.println("ACTIONS: ");\r
-               System.out\r
-                               .println(inputkey\r
-                                               + pseparator\r
-                                               + "<inputFile> - full path to fasta formatted sequence file, from which to align sequences");\r
-               System.out.println(paramList\r
-                               + " - lists parameters supported by web service");\r
-               System.out.println(presetList\r
-                               + " - lists presets supported by web service");\r
-               System.out.println(limitList + " - lists web services limits");\r
-               System.out\r
-                               .println("Please note that if input file is specified other actions are ignored");\r
-\r
-               System.out.println();\r
-               System.out.println("OPTIONS (only for use with -i action):");\r
-\r
-               System.out.println(presetkey + pseparator\r
-                               + "<presetName> - name of the preset to use");\r
-               System.out\r
-                               .println(outputkey\r
-                                               + pseparator\r
-                                               + "<outputFile> - full path to the file where to write an alignment");\r
-               System.out\r
-                               .println("-f=<parameterInputFile> - the name of the file with the list of parameters to use.");\r
-               System.out\r
-                               .println("Please note that -r and -f options cannot be used together. "\r
-                                               + "Alignment is done with either preset or a parameters from the file, but not both!");\r
-\r
+               System.out.println(Constraints.help_text);\r
                System.exit(exitStatus);\r
        }\r
 \r
diff --git a/webservices/compbio/ws/client/client_help.txt b/webservices/compbio/ws/client/client_help.txt
new file mode 100644 (file)
index 0000000..7c70d4f
--- /dev/null
@@ -0,0 +1,65 @@
+\r
+JABAWS client v2.0 June 2011 http://www.compbio.dundee.ac.uk/jabaws \r
\r
+Usage: <Class or Jar file name> -h=host_and_context <-s=serviceName> ACTION [OPTIONS] \r
+\r
+-h=<host_context>  - a full URL to the JABAWS web server including context \r
+                     path e.g. http://10.31.1.159:8080/ws\r
+-s=<ServiceName>   - one of [MafftWS, MuscleWS, ClustalWS, TcoffeeWS, ProbconsWS, \r
+                     AAConWS, JronnWS, DisemblWS, GlobPlotWS]\r
+                     <serviceName> is required for all ACTIONS but -list_services\r
+\r
+ACTIONS: \r
+-list_services    - list available services\r
+-test             - test service \r
+-i=<inputFile>    - full path to fasta formatted sequence file, from which to align \r
+                    sequences\r
+-parameters       - lists parameters supported by web service\r
+-presets          - lists presets supported by web service\r
+-limits           - lists web services limits\r
+\r
+Please note that if input file is specified other actions are ignored\r
+\r
+OPTIONS (only for use with -i action):\r
+-r=<presetName>   - name of the preset to use\r
+-o=<outputFile>   - full path to the file where to write an alignment\r
+-f=<PrmInputFile> - the name of the file with the list of parameters to use.\r
+\r
+Please note that -r and -f options cannot be used together. Alignment is done with \r
+either preset or a parameters from the file, but not both!\r
+\r
+EXAMPLES: \r
+\r
+1) List all available services on the host \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -list_services\r
+\r
+2) Test Clustal web service \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ClustalWS -test \r
+\r
+3) Align sequence from file input.txt with Probcons. Record resulting alignment \r
+into the output.txt \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ProbconsWS -i=input.txt -o=output.txt\r
+\r
+4) Calculate disorder with Disembl take input from input.txt, output results to \r
+the console \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=DisemblWS -i=input.txt \r
+\r
+5) List all parameters available for AAconWS service \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -parameters\r
+\r
+6) Calculate conservation with AAConWS using LANDGRAF method, for Clustal alignment \r
+from input.txt and report  the scores to the console \r
+\r
+Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -i=input.txt -f=prm.txt \r
+\r
+Where the content of prm.txt file is -m=LANDGRAF\r
+The list of the supported parameters can be obtained as shown in the example 5. \r
+\r
+Citation: Peter V. Troshin, James B. Procter and Geoffrey J. Barton - "Java \r
+Bioinformatics Analysis Web Services for Multiple Sequence Alignment - \r
+JABAWS:MSA" Bioinformatics 2011; doi: 10.1093/bioinformatics/btr304.\r