Change header template for a new version
[jabaws.git] / webservices / compbio / ws / client / Constraints.java
1 /* Copyright (c) 2011 Peter Troshin\r
2  *  \r
3  *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
4  * \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
7  * \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
11  * \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
14  * \r
15  * Any republication or derived work distributed in source code form\r
16  * must include this copyright and license notice.\r
17  */\r
18 package compbio.ws.client;\r
19 \r
20 class Constraints {\r
21 \r
22         final static String pseparator = "=";\r
23 \r
24         // Parameters for required command line options\r
25         final static String hostkey = "-h";\r
26         final static String servicekey = "-s";\r
27 \r
28         final static String listServices = "-list_services";\r
29         final static String testKey = "-test";\r
30 \r
31         // Actions\r
32         final static String inputkey = "-i";\r
33 \r
34         final static String paramList = "-parameters";\r
35         final static String presetList = "-presets";\r
36         final static String limitList = "-limits";\r
37 \r
38         // Options\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
43 \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
46                         " \r\n" + \r
47                         "Usage: <Class or Jar file name> -h=host_and_context <-s=serviceName> ACTION [OPTIONS] \r\n" + \r
48                         "\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
54                         "\r\n" + \r
55                         "ACTIONS: \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
59                         "                    sequences\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
63                         "\r\n" + \r
64                         "Please note that if input file is specified other actions are ignored\r\n" + \r
65                         "\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
70                         "\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
73                         "\r\n" + \r
74                         "EXAMPLES: \r\n" + \r
75                         "\r\n" + \r
76                         "1) List all available services on the host \r\n" + \r
77                         "\r\n" + \r
78                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -list_services\r\n" + \r
79                         "\r\n" + \r
80                         "2) Test Clustal web service \r\n" + \r
81                         "\r\n" + \r
82                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ClustalWS -test \r\n" + \r
83                         "\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
86                         "\r\n" + \r
87                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=ProbconsWS -i=input.txt -o=output.txt\r\n" + \r
88                         "\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
91                         "\r\n" + \r
92                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=DisemblWS -i=input.txt \r\n" + \r
93                         "\r\n" + \r
94                         "5) List all parameters available for AAconWS service \r\n" + \r
95                         "\r\n" + \r
96                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -parameters\r\n" + \r
97                         "\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
100                         "\r\n" + \r
101                         "Jws2Client -h=http://www.compbio.dundee.ac.uk/jabaws -s=AAconWS -i=input.txt -f=prm.txt \r\n" + \r
102                         "\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
105                         "\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
109                         "";\r
110 \r
111 }\r