Command Line Client (CLI)

The JABAWS client is a Java application that lets you run the programs for which a JABAWS server provides web services. This command line application this is able to call any of the JABAWS web services on any instance of JABAWS Server available over the web. The basic client is useful if you would like to test or execute the programs provided by the JABAWS server in your own scripts, but you do not want to handle any web service specific details. The client is an open source software, so you can also use the source code to as an example how to manipulate with JABAWS web services in your own code. The JABA Web Services are WS-I compliant. This means that you can access them from any language that has libraries or functions for consuming interoperable SOAP web services. More information on how to develop software that access JABAWS services is provided in the documentation pages.

The command line client comes as a part of client package which you are welcome to download. The command line client can be used to align sequences using any of JABAWS supported web services. The client is OS independent and supports most of the functions which can be accessed programmatically via JABAWS API. Using this client you could align sequences using presets or custom parameters, please see examples of this below. Here is the list of options supported by the command line client.



Check if you are running the recommended version of Java.

You need Java 7 or higher installed in your machine to be able to run the JABAWS CLI client. Please see the Java web site for up to date instructions and downloads.


java -jar jabaws-full-client-2.2.0.jar
java -jar <path_to_jar_file> -h=host_and_context -s=serviceName ACTION [OPTIONS]
-h=<host_and_context> - a full URL to the JABAWS web server including context path e.g.
-s=<ServiceName> - one of [MafftWS, MuscleWS, ClustalWS, ClustalOWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS]

-i=<inputFile> - full path to fasta formatted sequence file, from which to align sequences
-parameters - lists parameters supported by web service
-presets - lists presets supported by web service
-limits - lists web services limits
Please note that if input file is specified other actions are ignored

 OPTIONS: (only for use with -i action):
-r=<presetName> - name of the preset to use
-o=<outputFile> - full path to the file where to write an alignment
-f=<parameterInputFile> - the name of the file with the list of parameters to use.

Please note that -r and -f options cannot be used together. Alignment is done with either preset or aparameters from the file, but not both!

Example Usage

Align sequences from input.fasta file using Mafft web service with default settings, print alignment in Clustal format to console.

java -jar jabaws-full-client-2.2.0.jar -h= -s=MafftWS -i=d:\input.fasta

Content of input.fasta file is show below (please note sequences has been trimmed for clarity)


Align as in above example, but write output alignment in a file out.clustal, using parameters defined in file

java -jar jabaws-full-client-2.2.0.jar -h=  -s=MafftWS -i=d:\input.fasta -o=d:\out.clustal

The content of the file is shown below


The format of the file is the same for all JABAWS web services. Parameters are specified in exactly the same way as for native executables - alignment programs like Mafft etc. So parameters which you can use with command line version of an alignment program can be used with JABAWS. Most of the settings controlling alignment process are supported, but because any output has to be handled by JABAWS, settings controlling output are not allowed to be changed. For a list of parameters supported by a web service see the next example. In parameters are separated by the new line, and name of the parameter is separated from its value with an equals sign. This format is constant no matter which JABAWS web service is used.

java -jar jabaws-full-client-2.2.0.jar -h= -s=MafftWS -parameters

The same client can be used to access JABAWS on different hosts. Just point the client to the host you want to use by changing the value of -h key.

For example you used -h= server, now you want to use another server to -h= This comes handy if your favorite server is off and you need to do the job yesterday.