Developing plugins for Teolen

Teolenn is a very customizable tool, you can use your own module at each step of Teolenn process.

Your plugin must be written in Java but it could call external tools or use scripting languages available on the Java platform.

You can provide your plugin for Teolenn as class file(s) or jar file(s) by adding your plug-in to the Teolenn CLASSPATH. To do it, edit teolenn.sh in the bin directory of the Teolenn installation, then add the path to your plug-in and dependencies after the declaration of the PLUGINS variable.

#!/bin/sh

#
# This script set the right classpath and start the application
#

# Get the path to this script
BASEDIR=`dirname $0`

# Set the Teolenn libraries path
LIBDIR=$BASEDIR/lib

# Set the memory in MiB needed by Teolenn (only Java part, not external tools)
# By Default 512
MEMORY=512

# Add here your plugins and dependencies
PLUGINS=

# Set the path to java
JAVA_CMD=java

# Launch Teolenn
$JAVA_CMD -server \
          -Xmx${MEMORY}m \ 
          -cp $LIBDIR/teolenn.jar:$LIBDIR/commons-math.jar:$LIBDIR/dom4j.jar:$LIBDIR/commons-cli.jar:$PLUGINS \ 
          fr.ens.transcriptome.teolenn.Main $*

The next table summaries, the java interface you need to implements for the type of plug-in you want to write:

Type Section in design file Interface to implements
Sequence filter sequencefilters SequenceFilter
Measurement measurements Measurements
Measurement filter measurementfilters MeasurementFilter
Selector selector SequenceSelector
Ouput outputs Output

Don't forget to register your plugin in the design file using the class tag. Note that measurements need only to be declared once in measurements section, not in selector section. The following sample show the declaration of a sequence filter plugin:

<sequencefilter>
    <name>sequencefilter</name>
    <class>com.example.mysequencefilter</class>
</sequencefilter>

For more specific information about plug-in development see the contribute page.