Skip to content

ebi-jdispatcher/webservice-clients-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Service Clients Generator

clientsgenerator.py allows auto-generation of Sample CLI Clients for EMBL-EBI's Job Dispatcher Web Service Bioinformatics Tools.

How to use it

Download the source code or clone the repository:

git clone https://github.com/ebi-jdispatcher/webservice-clients-generator.git

Specially if you have no root access to your machine, you might need to use virtualenv. Prepare a virtual environment where all the Python dependencies will be installed. This project has been developed and tested with Python 3.6.5.

virtualenv -p `which python` env
source ./env/bin/activate
# deactivate

A full list of Python dependencies is provided in requirements.txt. Install dependencies with:

pip install --upgrade -r requirements.txt

Now run the program to generate python clients for all supported EBI tools, they will be placed in the dist folder. All available clients are listed in clients.ini.

Generating clients

Run the following commands to generate Python, Perl and Java clients for all the Bioinformatics tools provided.

# only python clients
python clientsgenerator.py python
# python, perl and java clients
python clientsgenerator.py python,perl,java

Alternatively, use --client <client_name> to get only a selected client.

python clientsgenerator.py python,perl,java --client clustalo

Running the generated clients

Python clients

The same virtualenv use to run the generator tool will have all the requirements to run the Python clients. An example test for Clustal Omega Python client:

python dist/clustalo.py --email <your@email.com> --sequence sp:wap_rat,sp:wap_mouse,sp:wap_pig

Perl clients

In order to run Perl clients, Perl (tested version 5.22.0) needs to installed as well as two dependencies (LWP and XML::Simple). Install these with:

# To install Perl dependencies run (you might need sudo)
cpan LWP
cpan XML::Simple

An example test for Clustal Omega Perl client:

perl dist/clustalo.pl --email <your@email.com> --sequence sp:wap_rat,sp:wap_mouse,sp:wap_pig

Java clients

In order to run Java clients, OpenJDK 8 (tested version 1.8.0_161") as well as ant (tested version 1.10.5), needs to installed. Note that OpenJDK 9 and above are not currently supported. There are different build instructions for Windows and Linux clients.

Windows

The Java source code needs to be compiled with ant as follows:

# if ant build fails on the first run, try the ant command line again
cd dist
ant -lib lib && rm -rf bin lib && cd -

An example test for Clustal Omega Java client:

java -jar dist/clustalo.jar --email <your@email.com> --sequence sp:wap_rat,sp:wap_mouse,sp:wap_pig

Linux and OSX

The Java source code needs to be compiled:

cd dist && ./make_jars.sh

This creates JARS files which can be executed directly. An example test for Clustal Omega Java client:

dist/clustalo.jar --email <your@email.com> --sequence sp:wap_rat,sp:wap_mouse,sp:wap_pig

The windows example above using java -jar will also work.

Documentation

More documentation about EMBL-EBI Bioinformatics Web Services

Contact and Support

If you have any problems, suggestions or comments for our services please contact us via EBI Support.

License

The European Bioinformatics Institute - EMBL-EBI, is an Intergovernmental Organization which, as part of the European Molecular Biology Laboratory family, focuses on research and services in bioinformatics.

Apache License 2.0. See license for details.