parse history file/uploaded file with dynamic_options script
Hi All, I am a bit lost here. In my xml I have the following sections: <inputs> <param type="data" format="tabular" name="amplitudes" label="amplitude file"/> <param name="samples" type="select" refresh_on_change="true" display="checkboxes" multiple="true" label="Mark quality control samples" dynamic_options='get_column_names(amplitudes)'/> </inputs> <code file="dynamic_options.py" /> In my dynamic_options.py script, I want to parse the headers from 'amplitudes' file and show them in the checkboxes section. My problem seems to be the following. In python, amplitudes is a galaxy object: <galaxy.model.HistoryDatasetAssociation object at 0x7f4fc020a210> How do I parse/access this file to get the headers? It seems to be partly the same problem as asked last week in this conversation: http://dev.list.galaxyproject.org/Question-about-using-dynamic-options-and-r... Thanks! Linda -- Linda Bakker Bioinformatics Research Assistant Plant Research International, Wageningen UR Building 107 (Radix), room W1.Fa.054 Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands tel: +31-317-480756 email: linda.bakker@wur.nl
Hi Linda, I think your parameter definition will need to send the file_name of the HistoryDatasetAssociation, something like this... <param name="samples" type="select" refresh_on_change="true" display="checkboxes" multiple="true" label="Mark quality control samples" dynamic_options='get_column_names(amplitudes.file_name)’/> ...and then your get_column_names() method should open the file to read the headers. Let us know if this doesn’t work. Greg Von Kuster
On Sep 22, 2015, at 7:45 AM, Linda Bakker <linda.bakker@wur.nl> wrote:
Hi All,
I am a bit lost here.
In my xml I have the following sections:
<inputs> <param type="data" format="tabular" name="amplitudes" label="amplitude file"/> <param name="samples" type="select" refresh_on_change="true" display="checkboxes" multiple="true" label="Mark quality control samples" dynamic_options='get_column_names(amplitudes)'/> </inputs>
<code file="dynamic_options.py" />
In my dynamic_options.py script, I want to parse the headers from 'amplitudes' file and show them in the checkboxes section.
My problem seems to be the following.
In python, amplitudes is a galaxy object: <galaxy.model.HistoryDatasetAssociation object at 0x7f4fc020a210>
How do I parse/access this file to get the headers?
It seems to be partly the same problem as asked last week in this conversation: http://dev.list.galaxyproject.org/Question-about-using-dynamic-options-and-r...
Thanks! Linda
-- Linda Bakker Bioinformatics Research Assistant Plant Research International, Wageningen UR Building 107 (Radix), room W1.Fa.054 Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands tel: +31-317-480756 email: linda.bakker@wur.nl
___________________________________________________________ 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: https://lists.galaxyproject.org/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Hi Greg, Wow that was easy! I was not expecting that. Thank you! Linda On 09/22/2015 03:41 PM, Von Kuster, Greg wrote:
Hi Linda,
I think your parameter definition will need to send the file_name of the HistoryDatasetAssociation, something like this...
<param name="samples" type="select" refresh_on_change="true" display="checkboxes" multiple="true" label="Mark quality control samples" dynamic_options='get_column_names(amplitudes.file_name)’/>
...and then your get_column_names() method should open the file to read the headers.
Let us know if this doesn’t work.
Greg Von Kuster
On Sep 22, 2015, at 7:45 AM, Linda Bakker <linda.bakker@wur.nl> wrote:
Hi All,
I am a bit lost here.
In my xml I have the following sections:
<inputs> <param type="data" format="tabular" name="amplitudes" label="amplitude file"/> <param name="samples" type="select" refresh_on_change="true" display="checkboxes" multiple="true" label="Mark quality control samples" dynamic_options='get_column_names(amplitudes)'/> </inputs>
<code file="dynamic_options.py" />
In my dynamic_options.py script, I want to parse the headers from 'amplitudes' file and show them in the checkboxes section.
My problem seems to be the following.
In python, amplitudes is a galaxy object: <galaxy.model.HistoryDatasetAssociation object at 0x7f4fc020a210>
How do I parse/access this file to get the headers?
It seems to be partly the same problem as asked last week in this conversation: http://dev.list.galaxyproject.org/Question-about-using-dynamic-options-and-r...
Thanks! Linda
-- Linda Bakker Bioinformatics Research Assistant Plant Research International, Wageningen UR Building 107 (Radix), room W1.Fa.054 Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands tel: +31-317-480756 email: linda.bakker@wur.nl
___________________________________________________________ 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: https://lists.galaxyproject.org/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
-- Linda Bakker Bioinformatics Research Assistant Plant Research International, Wageningen UR Building 107 (Radix), room W1.Fa.054 Droevendaalsesteeg 1, 6708 PB, Wageningen, The Netherlands tel: +31-317-480756 email: linda.bakker@wur.nl
participants (2)
-
Linda Bakker
-
Von Kuster, Greg