Is there a way to pass key =value pairs to the output files in a programmatic way? (Tags? Metadata?)
Hi, I am trying to pass some key-value pairs to the result of a tool (such as the original sample name) but I cannot find a way to do this in the galaxy XML tool definitions. I am simply trying to retain in all the data files I produce, the name of the original sample which the results are related to. Now I have to follow the history of a result just to see which original data file sample my results came from (and when using hidden files, this is almost impossible, since all results refer to some arbitrary number my data set had ("Tophat on data 30" is not going to help me, if I have 140 samples with all the same name)... Is there some way to pass some key-value pairs to a tools output? Can tags be assigned in the Tool definition? Can I set metadata tags programmatically? Any help would be appreciated... Regards, Thon de Boer, Ph.D. Bioinformatics Guru LinkedIn Profile
I digged some more and I guess I could use the rename dataset option in a workflow, but I can't find how I can rename a dataset using the original input name. I tried to use the same notation as those used in the tools (such as ${input.name}) but that just treats the input.name as a user provided parameter, which is NOT my intention. Is there any way I can rename a dataset using information from the orginal input dataset name? It seems a trivially obvious thing to be able to do, but I can't figure it out...Hopefully this is just an oversight on my part! Regards, Thon de Boer, Ph.D. Bioinformatics Guru LinkedIn Profile On Dec 31, 2011, at 2:26 PM, Thon deBoer wrote:
Hi,
I am trying to pass some key-value pairs to the result of a tool (such as the original sample name) but I cannot find a way to do this in the galaxy XML tool definitions.
I am simply trying to retain in all the data files I produce, the name of the original sample which the results are related to. Now I have to follow the history of a result just to see which original data file sample my results came from (and when using hidden files, this is almost impossible, since all results refer to some arbitrary number my data set had ("Tophat on data 30" is not going to help me, if I have 140 samples with all the same name)...
Is there some way to pass some key-value pairs to a tools output? Can tags be assigned in the Tool definition? Can I set metadata tags programmatically?
Any help would be appreciated...
Regards,
Thon de Boer, Ph.D. Bioinformatics Guru LinkedIn Profile
___________________________________________________________ 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:
On Sat, Dec 31, 2011 at 11:43 PM, Thon deBoer <thondeboer@me.com> wrote:
I digged some more and I guess I could use the rename dataset option in a workflow, but I can't find how I can rename a dataset using the original input name. I tried to use the same notation as those used in the tools (such as ${input.name}) but that just treats the input.name as a user provided parameter, which is NOT my intention.
Is there any way I can rename a dataset using information from the orginal input dataset name? It seems a trivially obvious thing to be able to do, but I can't figure it out...Hopefully this is just an oversight on my part!
From memory, if the input file parameter is called foo, you can use ${foo.name}, and there is also something called $on_string used in an example here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
Peter
Thanks, but ${foo.name} did not work in the workflow to rename an output file. It takes ${foo.name} to be a user provided parameter. ${foo.name} will definitely work in tool definitions, but that means I have to change ALL the default tool names for all the tool in galaxy...Surely there must be a way to rename an output file to the original input file in the workflow step "Rename Dataset"? Regards, Thon de Boer, Ph.D. Bioinformatics Guru +1-650-799-6839 thondeboer@me.com LinkedIn Profile On Dec 31, 2011, at 4:17 PM, Peter Cock wrote:
On Sat, Dec 31, 2011 at 11:43 PM, Thon deBoer <thondeboer@me.com> wrote:
I digged some more and I guess I could use the rename dataset option in a workflow, but I can't find how I can rename a dataset using the original input name. I tried to use the same notation as those used in the tools (such as ${input.name}) but that just treats the input.name as a user provided parameter, which is NOT my intention.
Is there any way I can rename a dataset using information from the orginal input dataset name? It seems a trivially obvious thing to be able to do, but I can't figure it out...Hopefully this is just an oversight on my part!
From memory, if the input file parameter is called foo, you can use ${foo.name}, and there is also something called $on_string used in an example here: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax
Peter
On Sun, Jan 1, 2012 at 12:29 AM, Thon Deboer <thondeboer@me.com> wrote:
Thanks, but ${foo.name} did not work in the workflow to rename an output file. It takes ${foo.name} to be a user provided parameter.
${foo.name} will definitely work in tool definitions, but that means I have to change ALL the default tool names for all the tool in galaxy...Surely there must be a way to rename an output file to the original input file in the workflow step "Rename Dataset"?
Sorry - I thought you were still talking about tool XML files. I'm not sure that there are any dynamic variables you can use in the workflow rename action to access properties of the tool that created the history item - but being able to use ${tool.param_name} or ${tool.input_file.name} or something like that could be quite powerful (where my made up syntax is $tool for the tool which created the history entry, and then dot and a tool parameter as named in the tool's XML). It would be possible even to expose those fields via the web interface, but for a first pass having an expert user type them in by hand would work. Interesting idea... I wonder what the Galaxy team think? Peter
Hi, I do not know for input but if you look at the json galaxy format (not the XML for a specific tool, the json format use to import/export a workflow, which describe how tools follow), you could rename a file with the "post_job_actions" tag. The path for this tag in JSON tree is { « steps »: { « Step number » : { Then, indicates the name you want for your file with "RenameDatasetAction(...)", where (...) is the name of the original file, define in the "output > name" tag ({ "steps": { "Step number" : { "tool": { "output" ). Good luck. -Regards, Remy 2012/1/1 Peter Cock <p.j.a.cock@googlemail.com>
On Sun, Jan 1, 2012 at 12:29 AM, Thon Deboer <thondeboer@me.com> wrote:
Thanks, but ${foo.name} did not work in the workflow to rename an output file. It takes ${foo.name} to be a user provided parameter.
${foo.name} will definitely work in tool definitions, but that means I have to change ALL the default tool names for all the tool in galaxy...Surely there must be a way to rename an output file to the original input file in the workflow step "Rename Dataset"?
Sorry - I thought you were still talking about tool XML files.
I'm not sure that there are any dynamic variables you can use in the workflow rename action to access properties of the tool that created the history item - but being able to use ${tool.param_name} or ${tool.input_file.name} or something like that could be quite powerful (where my made up syntax is $tool for the tool which created the history entry, and then dot and a tool parameter as named in the tool's XML). It would be possible even to expose those fields via the web interface, but for a first pass having an expert user type them in by hand would work.
Interesting idea... I wonder what the Galaxy team think?
Peter ___________________________________________________________ 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:
participants (4)
-
Peter Cock
-
remy d1
-
Thon Deboer
-
Thon deBoer