What gets passed to the Cheetah templating engine when a tool invocation is being built?

Inspired by a conversation with a colleague recently, I’m trying to find out if there is documentation anywhere on what is actually passed to the Cheetah template engine when building out the <command> part of a Galaxy tool at runtime. I.e. datasets have attributes like .element_identifier but what other attributes are there? The code for this seems to be galaxy/lib/galaxy/tools/evaluation.py at dev · galaxyproject/galaxy · GitHub so the question then is what is in the param_dict

I have dug through the code to try and make sense of this and of course looked at examples from tools-iuc but perhaps the developers can help document this? Then it could get added to the Galaxy development docs.

A meta question related to this is: where is the best place to ask such a question? I have historically used fora like the tools-iuc Matrix channel because of the high density of experts there, but of course Matrix chats are ephemeral and I’m never clear if tools-iuc chat is actually the best place to ask. The Galaxy Project web page does not offer much guidance on what forum is best for tool-development questions, unless I missed something.

Best regards everyone,
Peter

The most important variables in param_dict are the inputs, outputs and config files. Additionally the variables documented here Galaxy Tool XML File — Galaxy Project 24.2.3.dev0 documentation (code is here). There might be a few more for historic reasons.

The attributes name and element_identifier for datasets and collections, and that you can loop over collections and “multiple input”.

Hi Peter,

I don’t have an answer but your question reminds me of this Galaxy tool, perhaps it helps: galaxy-tools/inspect/inspect.xml at master · brinkmanlab/galaxy-tools · GitHub

Thanks Simon! That sounds like a fascinating tool whose output to read.

BTW on Matrix @bernt-matthias suggested that "I guess it boils down to: name and element_identifier for datasets and collections, and that you can loop over collections and “multiple input”. "

I definitely think name and element_identifier are the core bits here. I do wonder what else might be accessible… e.g. can one pick up the tags on a dataset somehow?

If I get a chance to stand up a Galaxy server I’ll try the tool Simon mentioned just to see what it says..