Multiple output, not known until tool run
I'm integrating a tool which will have multiple output datasets, the number of which cannot be known until runtime. I'm able to create the files, but they don't appear in the history pane; as you can see in the copy of my xml below, I have set force_history_refresh="True". They are actually created and reside in the dataset directory alongside the primary output file. I've cloned the sample file from the wiki page: http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput, in the section Number of Output datasets cannot be determined until tool run. I've found similar queries using a search engine, but the responses refer the user to the sample xml on that page. Here is my adaptation of the sample xml: <tool id="multi_output_aks1" name="Multiple output" force_history_refresh="True"> <description>example</description> <command interpreter="/usr/bin/ruby">aks_multiple.rb $input1 $output1 $output1.id $__new_file_path__</command> <inputs> <param format="text" name="input1" type="data" label="My file"/> </inputs> <outputs> <data format="text" name="output1" label="Main output for ${input1}" /> </outputs> </tool> Did I miss something in my adaptation? Is the wiki sample wrong? Is Galaxy broken? (Downloaded yesterday--How does one tell the Galaxy version?) Thanks for any advice. -Al
Al, This is a slightly tricky thing to get right, and we don't have any actual tools that have implemented it yet. However, I just ran through the example from the wiki and I did get it to work. I'm also using a very recent version (changest 4453:73c4c66ff3dd). From your XML segment, that part looks right, so I am not sure what's going wrong. If you refresh the history pane after the files should have appeared, do they show up then? If not, then there is probably something wrong with the way they are being referred to within your ruby file. Note that it is very important that you follow the naming convention precisely. So the files should be named like: first output (treat as "regular" output variable names): <output1> second output: primary_<output1.id>_output2_visible_<file_datatype> third output: primary_<output1.id>_output3_visible_<file_datatype> etc. <file_datatype> should be a recognized Galaxy datatype. I believe that if you name them a little differently, they will still be created in the __new_file_path__ location, but Galaxy won't recognize them as extra outputs. If you still have trouble getting it to work, I can send you the sample code I used (XML + Python) to see it work (it's more complete than what's on the wiki). Regards, Kelly On Oct 19, 2010, at 2:25 PM, Al Simons wrote:
I'm integrating a tool which will have multiple output datasets, the number of which cannot be known until runtime. I'm able to create the files, but they don't appear in the history pane; as you can see in the copy of my xml below, I have set force_history_refresh="True". They are actually created and reside in the dataset directory alongside the primary output file. I've cloned the sample file from the wiki page: http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput , in the section Number of Output datasets cannot be determined until tool run. I've found similar queries using a search engine, but the responses refer the user to the sample xml on that page.
Here is my adaptation of the sample xml:
<tool id="multi_output_aks1" name="Multiple output" force_history_refresh="True"> <description>example</description> <command interpreter="/usr/bin/ruby">aks_multiple.rb $input1 $output1 $output1.id $__new_file_path__</command> <inputs> <param format="text" name="input1" type="data" label="My file"/> </inputs> <outputs> <data format="text" name="output1" label="Main output for $ {input1}" /> </outputs> </tool>
Did I miss something in my adaptation? Is the wiki sample wrong? Is Galaxy broken? (Downloaded yesterday--How does one tell the Galaxy version?)
Thanks for any advice. -Al _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Thanks, Kelly Your emphasis on the exact format pointed me back to my script to play with the output name. The short form is that my string for the "output" field contained an underscore, which threw off your name parser, since (I assume) it splits on "_". This restriction might want to make its way into the wiki. Thanks for your help. -Al ________________________________________ From: Kelly Vincent [kpvincent@bx.psu.edu] Sent: Thursday, October 21, 2010 11:37 AM To: Al Simons Cc: galaxy-dev@bx.psu.edu Subject: Re: [galaxy-dev] Multiple output, not known until tool run Al, This is a slightly tricky thing to get right, and we don't have any actual tools that have implemented it yet. However, I just ran through the example from the wiki and I did get it to work. I'm also using a very recent version (changest 4453:73c4c66ff3dd). From your XML segment, that part looks right, so I am not sure what's going wrong. If you refresh the history pane after the files should have appeared, do they show up then? If not, then there is probably something wrong with the way they are being referred to within your ruby file. Note that it is very important that you follow the naming convention precisely. So the files should be named like: first output (treat as "regular" output variable names): <output1> second output: primary_<output1.id>_output2_visible_<file_datatype> third output: primary_<output1.id>_output3_visible_<file_datatype> etc. <file_datatype> should be a recognized Galaxy datatype. I believe that if you name them a little differently, they will still be created in the __new_file_path__ location, but Galaxy won't recognize them as extra outputs. If you still have trouble getting it to work, I can send you the sample code I used (XML + Python) to see it work (it's more complete than what's on the wiki). Regards, Kelly On Oct 19, 2010, at 2:25 PM, Al Simons wrote:
I'm integrating a tool which will have multiple output datasets, the number of which cannot be known until runtime. I'm able to create the files, but they don't appear in the history pane; as you can see in the copy of my xml below, I have set force_history_refresh="True". They are actually created and reside in the dataset directory alongside the primary output file. I've cloned the sample file from the wiki page: http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput , in the section Number of Output datasets cannot be determined until tool run. I've found similar queries using a search engine, but the responses refer the user to the sample xml on that page.
Here is my adaptation of the sample xml:
<tool id="multi_output_aks1" name="Multiple output" force_history_refresh="True"> <description>example</description> <command interpreter="/usr/bin/ruby">aks_multiple.rb $input1 $output1 $output1.id $__new_file_path__</command> <inputs> <param format="text" name="input1" type="data" label="My file"/> </inputs> <outputs> <data format="text" name="output1" label="Main output for $ {input1}" /> </outputs> </tool>
Did I miss something in my adaptation? Is the wiki sample wrong? Is Galaxy broken? (Downloaded yesterday--How does one tell the Galaxy version?)
Thanks for any advice. -Al _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
participants (2)
-
Al Simons
-
Kelly Vincent