Hi Peter,

1. I would not recommend using truevalue= in boolean parm values inside of 
conditionals are the behaviour is buggy! (I will post a test example in another 
post)

2, In the when statement the boolean values must be LOWER case as in
<when value="true">

3. In the <command> the Boolean values are CAPITALIZED as in 
#if str($bdg_options.bdg2) == 'True'

3a. or better yet  do not cast to string but just do
#if $bdg_options.bdg2

Christian
University of Manchester

________________________________________
From: galaxy-dev [galaxy-dev-boun...@lists.galaxyproject.org] on behalf of 
Peter Briggs [peter.bri...@manchester.ac.uk]
Sent: Tuesday, May 19, 2015 3:01 PM
To: galaxy-dev@lists.galaxyproject.org
Subject: [galaxy-dev] Can't set value of conditional boolean parameter in       
tool tests

Hello

I've encountered a problem with my tool tests when using a boolean as
the "control" parameter within a conditional: it doesn't appear to be
possible to change the value from the default "true" or "false" values
within the tests.

For example if I have a boolean 'bdg2' which controls a conditional
block and which defaults to its falsevalue:

   ...
   <conditional name="bdg_options">
     <param name="bdg2" type="boolean" checked="False"
           truevalue="-B2" falsevalue="" label="Save pileups in bedGraph?" />
     <when value="-B2">
   ...

and then try to set the value within a test using:

     <param name="bdg_options|bdg2" value="true" />

then the value remains unchanged from the default when the tests are
run. (Similarly if I set checked="True" then the value in the tests is
always "True" regardless of the value I try to set.)

I've tried various ways of referencing the parameter (e.g.
'bdg_options|bdg2', 'bdg2' and 'bdg_options') but none of these work for me.

Am I doing something obviously wrong? (nb this is a different problem
from my previous post about setting boolean values in tests - that works
fine for booleans which are not conditional control parameters).

I've made a small example tool to investigate the issue, the files are here:

https://gist.github.com/pjbriggs/c27e4366dfcdd6d96cb2

and using planemo 0.11.1 to run the tests.

(On a side note, it also seems that within the <command> section, the
values returned for this type of boolean only ever appear to be 'True'
or 'False' - but it seems okay to match against the truevalue and
falsevalues in the <when> tag.)

Thanks for any help,

Best wishes

Peter

--
Peter Briggs peter.bri...@manchester.ac.uk
Bioinformatics Core Facility University of Manchester
B.1083 Michael Smith Bldg Tel: (0161) 2751482
___________________________________________________________
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/
___________________________________________________________
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/

Reply via email to