Hi Joachim,
From Galaxy's perspective, java jar files fall into the category of a tool's dependencies, an area in which I'll be working significantly over the next several weeks.
For now, the best option is to place the jar files in a /jars subdirectory in your repository and include a README file in your repository that provides instructions for installing your tool. I've recently implemented support for displaying README files on the tool panel section selection page when installing a repository that contains one (this is not currently available in the galaxy dist repository, only in the central repository). Your README should instruct the installer that they'll need to manually create a link from Galaxy's ~/tool-data/shared/jars directory to the ~/jars directory in your repository. I'll figure out a way to handle this as part of my implementation for automatically handling tool dependencies, but the ~/jar directory in your repository should still be ok. Thanks! Greg Von Kuster On Apr 4, 2012, at 6:34 AM, Joachim Jacob wrote:
Hello,
I am looking for the way to go to include JAVA jar or classes into a Toolshed tool.
I noticed that JARs are gathered in galaxy-dist/tool-data/shared/jars. e.g. below:
java -jar "${GALAXY_DATA_INDEX_DIR}/shared/jars/gatk/GenomeAnalysisTK.jar"
What I did, I placed the java class next to the tool xml file, and called in the xml file the java class, using a static path (see below).
e.g.
<command> java -cp *~/galaxy-dist/tools/joatools* BaseCalls3 -l `head -2 $input | tail -1 | wc -c` -o $output_basecalls -q $output_qualities $input </command>
Can I use a GALAXY environment variable to refer to the directory of the tool? If so, then I can share with Toolshed my tool xml and java class file. Or is there another method I should follow?
Kind regards,
Joachim
-- Joachim Jacob, PhD
Rijvisschestraat 120, 9052 Zwijnaarde Tel: +32 9 244.66.34 Bioinformatics Training and Services (BITS) http://www.bits.vib.be @bitsatvib
___________________________________________________________ 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: