Question: tool.xml : multiple but optional data
1
gravatar for plindenbaum
2.1 years ago by
plindenbaum90
France
plindenbaum90 wrote:

Hi all,

I'm trying to wrap a tool where there is an optional+multiple param declared as:

<command>
(...)
#if $input_intervals :
#for $idx, $rgn in enumerate( $input_intervals ):
   -B "${rgn}"
#end for
#end if
(...)
</command>

(...)

<inputs>
    <param name="input_intervals" optional="true"  multiple="true" type="data" format="bed,picard_interval_list,vcf" label="Regions"/>
(...)

I leave the param empty, and I get an error:

'DatasetListWrapper' object has no attribute 'value'

if I remove the test : #if $input_intervals :, then the tool is launched but galaxy creates a "None"

 -B None

current status :

:-P

tool param xml wrapper • 819 views
ADD COMMENTlink modified 2.1 years ago by jmchilton1.1k • written 2.1 years ago by plindenbaum90

Note: the <param> xml and the cheetah code are in fact inserted with a macro.xml.

ADD REPLYlink written 2.1 years ago by plindenbaum90
2
gravatar for jmchilton
2.1 years ago by
jmchilton1.1k
United States
jmchilton1.1k wrote:

I'm very sorry for the inconvenience and counter intuitiveness of the way empty selections are handled here. I've opened a PR against Galaxy to spell out what is going on in the documentation and to provide an example of how to work with an empty selection drawing from your example. It is here - https://github.com/galaxyproject/galaxy/pull/3024. Hope it helps.

ADD COMMENTlink written 2.1 years ago by jmchilton1.1k

Thank you John , I'll have a look at this on monday morning !

ADD REPLYlink written 2.1 years ago by plindenbaum90

It worked. Thanks ! :-)

ADD REPLYlink written 2.1 years ago by plindenbaum90
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 165 users visited in the last hour