Setting Environment Variables For Galaxy'S Tools
1
1
Entering edit mode
11.5 years ago
corn8bit ▴ 140

I'm using a locally installed tool in my tool shed (it's picard) and I want to pass it picard's install directory.

When installing picard through galaxy it sets up special galaxy-only environment variables using the tool_dependencies.xml file which each picard tool xml wrapper references. I want to edit one of these variables (JAVA_JAR_PATH) and assign it my own picard install's path. But if I just edit it from:

<action type="set_environment">
  <environment_variable name="JAVA_JAR_PATH" action="set_to">$INSTAL_DIR</environment_variable>
</action>

to

<action type="set_environment">
  <environment_variable name="JAVA_JAR_PATH" action="set_to">"/opt/mydir/picard-tools-1.79/"
  </environment_variable>
</action>

it shows up as empty when I call it in the xml wrapper. How can I set this variable so that picard's xml tools can access it? Like:

<command interpreter="python"> picard_wrapper.py \$JAVA_JAR_PATH/MarkDuplicates.jar </command>
galaxy xml linux picard • 4.4k views
ADD COMMENT
1
Entering edit mode
11.5 years ago
Björn ▴ 670

Editing the tool_dependencies.xml only has effect if you reinstall the tool. In that case the new JAVA_JAR_PATH will be sourced. I think the " are not needed in your modifications.

As far as I understood you correctly you want to use your own picard and not that one shiped with the Tool Shed, right? Please try to remove the tool dependency completely (you can do that through the admin menu) and set the JAVA_JAR_PATH manually before starting galaxy.

Please keep in mind that you loose reproducibility if you do not use the tool shed tools completely and that is not recommended. Is the picard version to old?

Hope that helps, Bjoern

ADD COMMENT
0
Entering edit mode

I have to use an older custom picard because I have to replicate some exact data, otherwise I'd use the Tool Shed version certainly.

If I'm understanding you right you're saying I should set JAVA_JAR_PATH in every file that uses it? I'd prefer if I could just set it once somewhere. Many files source it and it may need changing a lot. I'll try moving the set_environment command from the dependency file to one of the scripts and see if that works.

ADD REPLY
1
Entering edit mode

No you can set it in .bashrc or elsewhere, but it needs to be visible for galaxy and your dependency must be deinstalled. What the Tool Shed did is sourcing the path to picard (the tool shed picard) in a new env.sh file and that is sourced before the tool is executed. You need to deactivate it (with deinstalling the dependency) and using your own JAVA_JAR_PATH (set in .bashrc).

ADD REPLY

Login before adding your answer.

Traffic: 2729 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6