1 /* Copyright (c) 2011 Peter Troshin
\r
3 * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0
\r
5 * This library is free software; you can redistribute it and/or modify it under the terms of the
\r
6 * Apache License version 2 as published by the Apache Software Foundation
\r
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
\r
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
\r
10 * License for more details.
\r
12 * A copy of the license is in apache_license.txt. It is also available here:
\r
13 * @see: http://www.apache.org/licenses/LICENSE-2.0.txt
\r
15 * Any republication or derived work distributed in source code form
\r
16 * must include this copyright and license notice.
\r
18 package compbio.ws.client;
\r
22 final static String pseparator = "=";
\r
24 // Parameters for required command line options
\r
25 final static String hostkey = "-h";
\r
26 final static String servicekey = "-s";
\r
28 final static String listServices = "-list_services";
\r
29 final static String testKey = "-test";
\r
32 final static String inputkey = "-i";
\r
34 final static String paramList = "-parameters";
\r
35 final static String presetList = "-presets";
\r
36 final static String limitList = "-limits";
\r
39 final static String paramFile = "-f";
\r
40 final static String outputkey = "-o";
\r
41 final static String parameterkey = "-p";
\r
42 final static String presetkey = "-r";
\r
44 final static String help_text = "\r\n" +
\r
45 "JABAWS2 client August 2011 http://www.compbio.dundee.ac.uk/jabaws \r\n" +
\r
47 "Usage: <Class or Jar file name> -h=host_and_context <-s=serviceName> ACTION [OPTIONS] \r\n" +
\r
49 "-h=<host_context> - a full URL to the JABAWS web server including context \r\n" +
\r
50 " path e.g. http://10.31.1.159:8080/ws\r\n" +
\r
51 "-s=<ServiceName> - one of [MafftWS, MuscleWS, ClustalWS, ClustalOWS, TcoffeeWS, \r\n" +
\r
52 " ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS]\r\n" +
\r
53 " <serviceName> is required for all ACTIONS but -list_services\r\n" +
\r
56 "-list_services - list available services\r\n" +
\r
57 "-test - test service \r\n" +
\r
58 "-i=<inputFile> - full path to fasta formatted sequence file, from which to align \r\n" +
\r
60 "-parameters - lists parameters supported by web service\r\n" +
\r
61 "-presets - lists presets supported by web service\r\n" +
\r
62 "-limits - lists web services limits\r\n" +
\r
64 "Please note that if input file is specified other actions are ignored\r\n" +
\r
66 "OPTIONS (only for use with -i action):\r\n" +
\r
67 "-r=<presetName> - name of the preset to use\r\n" +
\r
68 "-o=<outputFile> - full path to the file where to write an alignment\r\n" +
\r
69 "-f=<PrmInputFile> - the name of the file with the list of parameters to use.\r\n" +
\r
71 "Please note that -r and -f options cannot be used together. Alignment is done with \r\n" +
\r
72 "either preset or a parameters from the file, but not both!\r\n" +
\r
76 "1) List all available services on the host \r\n" +
\r
78 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -list_services\r\n" +
\r
80 "2) Test Clustal web service \r\n" +
\r
82 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ClustalWS -test \r\n" +
\r
84 "3) Align sequence from file input.txt with Probcons. Record resulting alignment \r\n" +
\r
85 "into the output.txt \r\n" +
\r
87 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ProbconsWS -i=input.txt -o=output.txt\r\n" +
\r
89 "4) Calculate disorder with Disembl take input from input.txt, output results to \r\n" +
\r
90 "the console \r\n" +
\r
92 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=DisemblWS -i=input.txt \r\n" +
\r
94 "5) List all parameters available for AAconWS service \r\n" +
\r
96 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -parameters\r\n" +
\r
98 "6) Calculate conservation with AAConWS using LANDGRAF method, for Clustal alignment \r\n" +
\r
99 "from input.txt and report the scores to the console \r\n" +
\r
101 "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -i=input.txt -f=prm.txt \r\n" +
\r
103 "Where the content of prm.txt file is -m=LANDGRAF\r\n" +
\r
104 "The list of the supported parameters can be obtained as shown in the example 5. \r\n" +
\r
106 "Citation: Peter V. Troshin, James B. Procter and Geoffrey J. Barton - \"Java \r\n" +
\r
107 "Bioinformatics Analysis Web Services for Multiple Sequence Alignment - \r\n" +
\r
108 "JABAWS:MSA\" Bioinformatics 2011; doi: 10.1093/bioinformatics/btr304.\r\n" +
\r