Hi Will, It looks like a bug to me. This was originally added back in 2012, https://bitbucket.org/galaxy/galaxy-central/commits/02fe49c3d251 I submitted a fix for whitespace in 2013, https://bitbucket.org/galaxy/galaxy-central/commits/da5a5077ef1ebffa9e0ad903... Looking at the current code, yes, there does appear to be a logical flaw here: # Versioning for tools self.version_string_cmd = None version_cmd = root.find("version_command") if version_cmd is not None: self.version_string_cmd = version_cmd.text.strip() 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 i.e. self.interpreter is used, rather than version_cmd_interpreter Possible fix: $ hg diff lib/galaxy/tools/__init__.py diff -r 75be6c49a65d lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py Wed May 14 22:49:44 2014 -0400 +++ b/lib/galaxy/tools/__init__.py Thu Jun 19 17:19:18 2014 +0100 @@ -1234,7 +1234,7 @@ 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 + self.version_string_cmd = version_cmd_interpreter + " " + command_line # Parallelism for tasks, read from tool config. parallelism = root.find("parallelism") if parallelism is not None and parallelism.get("method"): Regards, Peter On Thu, Jun 19, 2014 at 4:21 PM, Will Holtz <wholtz@lygos.com> wrote:
The documentation for the version_command tag doesn't mention it can take an interpreter option: https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Cversion_comm...
I looked at the code in lib/galaxy/tools/__init__.py to see how this was implemented. I was surprised to see that if the interpreter option is passed to version_command, then the interpreter value from the command tag is used in generating the version number response. The version_command interpreter value is never used. For example, I tried the following:
<version_command interpreter="foobar">myPythonTool -v</version_command>
<command interpreter="python">myPythonTool someCheetahCode</command>
And Galaxy successfully got the version number. Is this the expected behavior?
-Will
___________________________________________________________ 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: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/