This question was cross-posted on "Adding custom tools: resolving (external ) XML entities"

I'd like to replace fragments of XML code in my custom tool declaration.

My first idea was to use XML entities but it seems that the XML engine doesn't resolve them.

(BTW: I know I can replace/declare things in $PATH and tool_dependencies.xml )

Another idea was to use <macros><token...> but I cannot make it work (see )

my macros definition:

<?xml version="1.0"?>
<token name="@JAVA_EXE@">/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java</token>
<token name="@JVM_OPTIONS@">-Xmx500m</token>
</macros> my tool definition: as a test, I echoed the value of @JAVA_EXE@ in /tmp/galaxy.txt (the macro was *not replaced* )

<?xml version="1.0" encoding="UTF-8"?>
<tool id="com_github_lindenb_jvarkit_tools_misc_VcfHead" name="VcfHead" version="e098748b85acd5158a1ce612bd3d46e60948b9db" hidden="false">
<description>Print the first lines of a VCF</description>
<command>echo "@JAVA_EXE@" &gt; /tmp/galaxy.txt &amp;&amp; zcat -f ${input} | @JAVA_EXE@ @JVM_OPTIONS@ -cp /commun/data/packages/htsjdk/dist/apache-ant-1.8.2-bzip2.jar:/commun/data/packages/htsjdk/dist/htsjdk-1.112.jar:/commun/data/packages/htsjdk/dist/commons-jexl-2.1.1.jar:/commun/data/packages/htsjdk/dist/commons-logging-1.1.1.jar:/commun/data/packages/jvarkit-git/vcfhead.jar -n ${number} 2&gt; /dev/null &gt; ${output}</command>
<param format="vcf" name="input" type="data" label="Source VCF" optional="false"/> <param name="number" type="integer" value="10" label="Number of rows" optional="true"/>
<data format="input" name="output" metadata_source="input"/>
</tool> the output of 'hg tip'

changeset: 9312:788cd3d06541
tag: tip
parent: 9310:19f6e62bd372
parent: 9311:d7f37a2fe690
user: Nate Coraor <>
date: Mon Apr 08 12:30:08 2013 -0400
summary: Merged stable. what's wrong in my <macros> definition ? Thanks.

Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

To search Galaxy mailing lists use the unified search at:

Reply via email to