-
Notifications
You must be signed in to change notification settings - Fork 10
Implementing Galaxy tool.
Galaxy is an open, web-based platform for data intensive biomedical research. Whether on the free public server or your own instance, you can perform, reproduce, and share complete analyses.
Eoulsan can interpret a galaxytools XML file to create a step in a workflow. For more information about galaxy tools: The Galaxy Project website
The following code defines an XML example for Galaxy in Eoulsan:
<tool id="bam2bedgraph" name="bam2bedgraph">
<description>Convert bam files to bigwig file</description>
<command>bamCoverage -b $input_bam -bai $input_bai -o $output_bedgraph -of bedgraph</command>
<inputs>
<param format="bam" name="input_bam" type="data" label="Source file"/>
<param format="bai" name="input_bai" type="data" label="Source file"/>
</inputs>
<outputs>
<data format="bedgraph" name="output_bedgraph" />
</outputs>
</tool>
Here is a list of the supported galaxy tools tags by eoulsan:
-
<tool>
tag, has two mandatory elementsid
andname
, which are necessary for eoulsan. -
<description>
tag obviously contains the tool's description. -
<command>
tag contains the command line of the tool you want to use. -
<inputs>
tag containsparam
tags, defining the input files for the galaxy step. - for each
<param>
tag ininputs
tag, you can define an input file -
<outputs>
tag containsdata
tags, defining the output files of the galaxy step. - for each
<data>
tag inoutputs
tag, you can define an output file -
<conditional>
tag is a container for conditional parameters (must contain<when>
tag and command line is then wrapped in an if-else statement).
Eoulsan currently only supports the previously defined tags from galaxy tools XML files.
dataformat
also need to be defined. See the Eoulsan dataformat wiki section for more informations.
Eoulsan also implements additional function to manage docker images.
You can execute a command through an available docker image, using interpreter="docker"
and dockerimage
elements in command
tag. When you use Docker as interpreter, you can also define a fallback interpreter if Docker is not installed on the system (e.g. interpreter="docker,bash"
).
Here is an example:
<command interpreter="docker,bash" dockerimage="genomicpariscentre/deeptools:1.5.12">
bamCoverage -b $input_bam -bai $input_bai -o $output_bedgraph -of bedgraph
</command>
It is also possible to launch the value of the command tag as a command when Docker isn't available (ie, interpreter="docker,"
).
The location of galaxy tools and formats XML files need to be specified to Eoulsan.
Either add to .eoulsan
file in your home folder:
main.format.path=/home/firmo/tests/galaxy/eoulsan-tools/formats
main.galaxy.tool.path=/home/firmo/tests/galaxy/eoulsan-tools/galaxytools
An alternative, in the workflow.xml
file
<parameter>
<name>main.galaxy.tool.path</name>
<value>/home/firmo/tests/galaxy/eoulsan-tools/galaxytools</value>
</parameter>
<parameter>
<name>main.format.path</name>
<value>/home/firmo/tests/galaxy/eoulsan-tools/formats</value>
</parameter>
Note: Those parameter can even be a link to a repository.
Here is an example:
main.format.path=https://raw.githubusercontent.com/GenomicParisCentre/eoulsan-tools/master/formats
main.galaxy.tool.path=https://raw.githubusercontent.com/GenomicParisCentre/eoulsan-tools/master/galaxytools