ToxOtis-core with Maven

From OpenTox
Jump to: navigation, search

ToxOtis is a Java interface to the predictive toxicology services of OpenTox. ToxOtis is being developed to help both those who need a painless way to consume OpenTox web services and for ambitious service providers that don't want to spend half of their time in RDF parsing and creation, database management and security measures. In this article it is explained how to use ToxOtis within your Maven project.

Contents

Τοξότης : Core Project

About

Latest Version:

+ 0.7.1 (Available from the OpenTox-NTUA and AMBIT repositories).

Authors:

  1. Sopasakis Pantelis
  2. Charalampos Chomenidis

Description

+ ToxOtis is the Greek word for Sagittarius, that actually means ‘archer’. ToxOtis is a Java interface to the predictive toxicology services of OpenTox. ToxOtis is being developed to help both those who need a painless way to consume OpenTox services and for ambitious service providers that don’t want to spend half of their time in RDF parsing and creation.

+ You can use ToxOtis to search in databases with chemical compounds, download a compound in any supported MIME type (e.g. SDF, SMILES, MOL etc), find a property for a compound (e.g. its LD 50 lethal dose concentration), publish your chemicals in an on-line database, train QSAR models (regression, classification, clustering etc) and lots of other functionalities. Incorporation of ToxOtis into your services will relieve you from the labour of creating RDF documents.

+ You can find full documentation here including numerous examples. For any questions don’t hesitate contact to the authors by sending a message to alphaville or hampos (on github ).

Use ToxOtis With Maven

Recently ToxOtis migrated to Maven so it becomes really easy for you to use ToxOtis in your Maven projects. ToxOtis, since version 0.5.2 (beta) is deployed on the AMBIT repository as a 3rd-party ‘artifact’. So, if you want to include the “core” module of ToxOtis in your project, simply put the following dependency in the pom file of your project:

<dependencies>
  <!-- ToxOtis Dependency -->
  <dependency>
    <groupId>org.opentox.toxotis</groupId>
    <artifactId>ToxOtis-core</artifactId>
    <version>0.5.2</version>
  </dependency>
  <!-- Other Dependencies you might have... -->
</dependencies>

and add once the following repository:

<repositories>
  <!-- OpenTox-NTUA repository -->
  <repository>
    <id>ambit-plovdiv</id>
    <url>http://opentox.ntua.gr:8081/nexus/content/repositories/releases</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

As an example we provide here a template pom.xml file you can use in your project if you need to make use of ToxOtis-Persistence:

<project    xmlns="http://maven.apache.org/POM/4.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.mygroup.myproject</groupId>
    <artifactId>ProjectId</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>NameOfMyProject</name>
    <url>http://myproject.com/myPage#home</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
	<!-- 
		Maven will automatically download ToxOtis-DB ( with 
		all its dependencies (like ToxOtis-core ) from the OpenTox-NTUA
		repository (see below at the repositories section).
	-->
        <dependency>
            <groupId>org.opentox.toxotis.database</groupId>
            <artifactId>ToxOtis-persistence</artifactId>
            <version>0.3</version>
        </dependency>
    </dependencies>

    <repositories>
        <!-- OpenTox-NTUA repository -->
        <repository>
            <id>ambit-plovdiv</id>
            <url>http://opentox.ntua.gr:8081/nexus/content/repositories/releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>bc-public</id>
            <name>Public Maven Repository at Brockmann-Consult</name>
            <url>http://www.brockmann-consult.de/mvn/os</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.1</version>
                    <configuration>
                        <source>1.6</ source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>        
    </build>
</project>

With Ant

If you prefer the ant-based ToxOtis the build.xml files are also distributed along with the source code. Alternatively run mvn ant:ant and create your own XML files for ant.

Source Code and Javadoc

You can manually download the latest version of the source code of ToxOtis from github either in zip or tar.gz format (click on the “Downloads” button). This is most likely to be a SNAPSHOT version. If you want the source code and/or the javadoc for a particular release version, here is an example source code (just choose the version you prefer):

<!-- Dependency for Javadoc -->
<dependency>
  <groupId>org.opentox.toxotis</groupId>
  <artifactId>ToxOtis-core</artifactId>
  <version>0.5.2</version>
  <classifier>javadoc</classifier>
</dependency>
<!-- Dependency for Sources -->
<dependency>
  <groupId>org.opentox.toxotis</groupId>
  <artifactId>ToxOtis-core</artifactId>
  <version>0.5.2</version>
  <classifier>sources</classifier>
</dependency>

Features

Freely distributed

This project is licensed under the GNU GPL license version 3.0. A copy of this license is found in the ./Licenses folder. Licenses for all dependencies of this project are also included in this directory. This project is being developed in the Automatic Control Lab of the School of Chemical Engineering, NTUA, Athens, Greece and is part of OpenTox; an EU funded FP7 research project.

Extensible

We work on various extensions for ToxOtis including modules that will facilitate external developers toward building their own web service applications or applications that need to consume OpenTox web services as client. Modules that provide extra security mechanisms and local account management, Hibernate support for ToxOtis to provide persistence for all core ToxOtis objects (Datasets, Algorithms, Models etc), Triple-storage database support (TDB) and lots of other features are under design and construction. The first release of ToxOtis-Persistence, a persistence module for ToxOtis, provides hibernate support for the core project.

License

This project, as well as all other projects developed by the NTUA developers team under OpeTox, is licensed under the GNU GPL license version 3. There is a considerable debate taking place in the open source community regarding the use of the GPL or LGPL, while a variety of other licenses can be found on the web as well. However it is GNU itself that prompts developers to use GPL (read this article). The license of this project (ToxOtis) is also inherited by its modules (ToxOtis-core, ToxOtis-persistence and ToxOtis-benchmark). Information about the licenses of the project are also provided in its pom.xml file including information about the involved developers and organizations.

Stay Tuned

Follow isToxic on Twitter and stay tuned with the latest updates!

Report an issue or feature request

Report and kind of issues/bug at https://github.com/alphaville/ToxOtis/issues - we are happy to receive feedback from ToxOtis users and fix possible issues.

References

  1. This wiki entry explaining how to use ToxOtis programmatically with plenty of examlpes and code snippets.
  2. Our blog on ToxOtis.
Personal tools