Hi All,

We have been trying to use a param with type boolean in a conditional.
Because of the Case inconsistency between the when clause (lower case) and the 
command clause (Capitalized) we tried to use the truevalue options.

For example (Full xml and code attached)
 <conditional name="bdg_options2">
    <param name="bdg2" type="boolean" checked="false"
       truevalue="changed" falsevalue="unchanged" label="Boolean 2" />
    <when value="changed">
    <when value="unchanged">

Unfortunately this showed up various bugs.

1. The value set by truevalue="..." works in the when but is lost in the 
<command> where it reverst back to True/False
   (Both in Galaxy and Planemo)

2. In Planemo you can change a param which defaults to True to False but you 
can not change a param that defaults to False to True
    -Works ok in Galaxy

3. In Planemo you can use the value set by falsevalue="xyz" to set the boolean 
param but ONLY to change a true to a false but not a false to a true.

Christian Brenninkmeijer

PS. If the attachments do not work I will repost with the full xml and code
<tool id="Peters boolean_issue2" name="Peter's Boolean test issue 2" version="1.2">
<description>Demonstrate issue with using booleans in Galaxy tests</description>
<command interpreter="bash">
  $output_1 $bdg1 $bdg_options.bdg2
  #if str($bdg_options.bdg2) == 'True'
     -B2 $bdg_options.spmr
     #if str($bdg_options.make_bigwig) == 'True'
     #end if
  #end if
  <!-- Normal boolean -->
  <param name="bdg1" type="boolean" checked="False"
	 truevalue="-B1" falsevalue="" label="Save pileups in bedGraph?" />
  <!-- Boolean used for conditional -->
  <conditional name="bdg_options">
    <param name="bdg2" type="boolean" checked="False"
	   label="Save pileups in bedGraph?" />
    <when value="true">
      <param name="spmr" type="boolean" checked="False"
	     truevalue="--SPMR" falsevalue="" label="Use --SPMR?" />
      <param name="make_bigwig" type="boolean" checked="true"
	     truevalue="True" falsevalue="" label="Generate bigWig?" />
    <when value="false">
      <!-- Display nothing -->
  <data name="output_1" format="txt" label="Values of booleans" />
    <!-- #0: don't set any params explicitly -->
    <output name="output_1">
	<has_line line="Values are False" />
    <!-- #1: set non-conditional boolean only to true -->
    <param name="bdg1" value="true" />
    <output name="output_1">
	<has_line line="Values are -B1 False" />
    <!-- #2: (try to) set conditional boolean to true using 'bdg2' -->
    <param name="bdg1" value="True" />
    <param name="bdg2" value="True" />
    <output name="output_1">
	<has_line line="Values are -B1 True -B2 --make-big-wig" />

Attachment: galaxy_boolean_test_issue2.sh
Description: galaxy_boolean_test_issue2.sh

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:

To search Galaxy mailing lists use the unified search at:

Reply via email to