Question: tool.xml : multiple but optional data
1
gravatar for plindenbaum
2.1 years ago by
plindenbaum • 90
France
plindenbaum • 90 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 COMMENT • link • modified 2.1 years ago by jmchilton ♦ 1.1k • written 2.1 years ago by plindenbaum • 90

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

ADD REPLY • link written 2.1 years ago by plindenbaum • 90
2
gravatar for jmchilton
2.1 years ago by
jmchilton ♦ 1.1k
United States
jmchilton ♦ 1.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 COMMENT • link written 2.1 years ago by jmchilton ♦ 1.1k

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

ADD REPLY • link written 2.1 years ago by plindenbaum • 90

It worked. Thanks ! :-)

ADD REPLY • link written 2.1 years ago by plindenbaum • 90
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