clientsgenerator.py
allows auto-generation of Sample CLI Clients for
EMBL-EBI's Job Dispatcher Web Service Bioinformatics Tools.
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.
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
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
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
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.
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
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.
More documentation about EMBL-EBI Bioinformatics Web Services
If you have any problems, suggestions or comments for our services please contact us via EBI Support.
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.