Hi all,

if we try to wrap a single script-tool, for example bismark [1], it has
its own version number and should be included in <version_command>.
I would like to ship bismark with the wrapper. That means that bismark
is not included in PATH, but exists next to the bismark_wrapper.xml
file. That isn't a problem for the <command> tag, but for the
<version_command> tag, because it assumes the executed tool in PATH.
Attached is a patch that adds the same <command> logic to
<version_command> if a interpreter is specified.


[1] http://www.bioinformatics.babraham.ac.uk/projects/bismark/
diff -r cc03427724cf lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py	Wed Sep 26 14:24:16 2012 +0200
+++ b/lib/galaxy/tools/__init__.py	Sun Oct 07 01:14:28 2012 +0200
@@ -954,6 +954,12 @@
         version_cmd = root.find("version_command")
         if version_cmd is not None:
             self.version_string_cmd = version_cmd.text
+            version_cmd_interpreter = version_cmd.get( "interpreter", None )
+            if version_cmd_interpreter:
+                executable = self.version_string_cmd.split()[0]
+                abs_executable = os.path.abspath(os.path.join(self.tool_dir, executable))
+                command_line = self.version_string_cmd.replace(executable, abs_executable, 1)
+                self.version_string_cmd = self.interpreter + " " + command_line
         # Parallelism for tasks, read from tool config.
         parallelism = root.find("parallelism")
         if parallelism is not None and parallelism.get("method"):
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:


Reply via email to