OpenTox Blog
You are here: Home » Data » Blogentries » Public » Knowledge Fair Table F - Techie Table

Knowledge Fair Table F - Techie Table

Posted by Sopasakis Pantelis at Sep 14, 2010 12:15 AM |

A description of the discussions and activities that will take place on the "Techie Table" during the OpenTox workshop in Rhodes (19 Sept. 2010).

OpenTox facilitators: Pantelis Sopasakis (NTUA), Fabian Buchwald (TUM)

Duration: 3 hours

Description of Activity:   The discussion will be organized in two parts: In the first part we are going to show how a developer can consume OpenTox web services from inside a Java application using some of our tools (like ToxOtis [5]), and including A&A (Authorization and Authentication). Using web clients and parsers, the participants will download and parse OpenTox resources such as compounds, features, datasets and models and inspect them from within their Java application. Exercises will include parsing of datasets and conversion into weka data objects (Instances), training of various models using NTUA, TUM and AMBIT algorithms (where necessary using also the A&A API). This will familiarize the participants with the direct consumption of OT web services on a more advanced level than using web interfaces and a more programmatic way than using plain curl. This will take about 45 minutes including discussion and questions.

In the second part of the activity, the group will build an OpenTox web service with our guidance. A clustering algorithm will be deployed for the sake of getting in touch with web services and having a better insight into the OpenTox API. First we will study the requirements of the OpenTox API and will formulate hypothetical curl commands for how a request would look like (in a top-down approach). Then we will proceed formulating an RDF representation of the algorithm discussing at the same time the structure of such a document and the information that should be found therein. Jena will be used as an RDF editor/parser, which will be quite useful to developers that want to get involved in a contemporary project involving web semantics. We will briefly detail the storing of models and present the underlying database tables structure. Weka will be used to materialize the XMeans algorithm. The whole effort will boil down to ca. 500 lines of source code including the use of various Java libraries such as Restlet, Weka and Jena. Participants will also get in touch with the back end of an OpenTox web service. This will take about 75 minutes. During the remaining time we will discuss various challenges a developer can face and how they could be overcome.

Experience Expected:  A moderate acquaintance with Java is needed to join the table. The participant should know how to use some IDE of his/her preference and know how to create a Java application and load libraries. Some acquaintance with HTTP and web services is also helpful.


Preparation before joining the table:  We would suggest that participants examine the OpenTox API to gain a better insight into the OpenTox services. The API is available from the OpenTox web site at Before joining the table, the participants should have installed the following on their machines:

  1. Java, version 1.6. On a Linux machine, install the packages 'sun-java6-jre' and 'sun-java6-jdk' (For example on an Ubuntu machine type 'sudo apt-get install sun-java6-jre sun-java6-jdk'). For other operating systems, you can download and install Java from . Mac OSX supports its own version of Java.

  2. Java DB (Apache Derby) version 10.6.1. Download the jars from Load it in to your IDE (e.g. Netbeans) as a library.

  3. Install the SSL certificate from on your Java VM. This can be accomplished using the Java class found at: (provided by Sun Microsystems, Inc.)


Optional applications the users are suggested to install:

  1. cURL: Install cURL from or simply type 'sudo apt-get install curl'
  2. An IDE to help you organize your source code and libraries.
  3. Git: Download and install git from Git can be also found in the Linux repositories. For instance, on an Ubuntu machine you can install it typing 'sudo apt-get install git-core'.

  4. Protégé: Download and run Protégé, an ontology editor that will let you examine the ontology used in OpenTox to describe resources such as algorithms, compounds, features etc. Protégé can be found at Use Protégé to view the ontology at Installation of Protégé will help developers get a better insight regarding what happens behind the scenes and fathom the very structure of OpenTox.


The following Java libraries should be downloaded and loaded in your IDE (All libraries used in our projects are free and open source): [Alternatively you can download exactly what you need from - It is much easier to go this way, but you will get a better insight if you go through the following steps].

  1. Restlet, version 2.0 milestone 7: Download it from the URL: Read about Restlet at and find some example applications at Restlet is a very useful free and open source tool for creating web services. Note that you will have to include only the following jars in your classpath:

    1. com.sun.grizzly
    2. com.sun.grizzl.util
    3. org.apache.commons.collections
    5. org.apache.commons.lang
    6. org.apache.commons.logging
    7. org.apache.commons.pool
    8. org.apache.lucene
    9. org.restlet.ext.grizzly
    10. org.restlet.ext.wadl
    11. org.restlet.ext.xml
    12. org.restlet
    All the above jars are included in the distribution of Restlet. Including extra jars in your classpath can cause compilation and/or runtime errors.
  2. Xstream, version 1.3.1: Download Xstream from:

  3. JAMA (Jama Matrix Algebra Package): Download Java, version 1.0.2 from
  4. Jena, version 2.6.2: Download Jena from

  5. Download Reflections, version 0.9.5. from

  6. Weka 3.6.0. can be downloaded from Weka is a well known machine learning library for Java.

  7. Download iText version 5.0.1. from iText is a PDF editor for Java.

  8. Download and examine the source code of YAQP (Yet Another QSAR Project), from Click on the “Download Source” button or using git, type 'git clone git://'



After installing all of the above on your laptop, you will have to bring it with you on the table ;-)


Techincal Support: If you need help installing any of the above software or libraries, please contact Pantelis Sopasakis via email at or reach him at MSN: If you have more general questions about technical developments on the project and wish to participate, you can join the OpenTox development mailing list, available as an option on completing the join registration form on the OpenTox web site.


  1. The OpenTox web site:

  2. Restful Web Services: Read also this note on our web site:

  3. OWL Validation Online Tool:

  4. RDF Validation Online service by W3C: (Also produces graphical representations of RDF documents)

  5. ToxOtis: A tool containing web clients, RDF parsers, bridges between the OpenTox ontology and your application, an easy to use authentication interface and much more. ToxOtis is still under development and the source code can be found at
Document Actions