Question: No case matched value Error with use of conditional statements
    
    0
        
bankapur • 0 wrote:
Hi,
I am trying to integrate my own tool into galaxy on a local instance. My galaxy UI is designed such that when a user selects Tophat only then can he choose cufflinks and if cufflinks is true only then can a user select cufflinks annotation (a classic use case of <conditional> statement).
I get a "ValueError: ('No case matched value:', 'turn_on_cufflinks', [u'yestophat']) " error with the xml code I used. Will highly appreciate it if someone could make me understand why this error occurs and any ideas on how to correct it.
Here is a piece of xml file that I wrote to do the above mentioned:
<tool id="rnaseq_pipeline_test" name="rnaseq_pipeline">
<description>Running RNASEQ Pipeline</description>
<command>
#if str($sample_file) != "":
    make_config.py -s "$sample_file"
 #end if
#if str($genome_annotation) != "":
     -n "$genome_annotation"
 #end if
#if str($trimmomatic) == "yestrimmomatic":
    -t
#end if
#if str($tophat) == "yestophat":
    -o
 #end if
#if str($cufflinks) == "yescufflinks":
    -c
#end if
 #if str($cufflinksannotation) == "yescufflinksannotation":
    -a
#end if
#if str($rnaseqc) == "yesrnaseqc":
    -q
#end if
 #if str($rrnaquantitation) == "yesrrnaquantitation":
    -r
#end if
#if str($rsem) == "yesrsem":
    -m
#end if
#if $threads > 1:
    -e "$threads"
#end if
#if $max_process > 1:
    -j "$max_process"
#end if
 #if $output_directory:
     "$output_directory"
#end if
</command>
<inputs>
<param name= "sample_file" type="data" value="samples.txt" format="tabular" label="Sample File:"/>
<param name= "genome_annotation" type="select" label="Choose Genome Annotation:">
            <option value="/seq/regev_genome_portal/RESOURCES/candida/C_albicans_SC5314_version_A21-s02-m01-r01/Config/C_albicans_SC5314_extend100.config">C_albic    ans_SC5314_version_A21-s02-m01-r01[candida]</option>
</param>
<param name= "trimmomatic" type="select" label="Trimmomatic" display="checkboxes" multiple="true">
                   <option value="yestrimmomatic" selected="true">TRUE</option>
</param>
<conditional name="turn_on_cufflinks">
        <param name= "tophat" type="select" label="TopHat" display="checkboxes" multiple="true">
                    <option value="yestophat" selected="true">TRUE</option>
        </param>
            <when value = "yestophat">
                      <conditional name="turn_on_cufflinks_annotation">
                          <param name= "cufflinks" type="select" label="Cufflinks display="checkboxes" multiple="true">
                                <option value="yescufflinks"selected="true">TRUE</option>
                         </param>
                         <when value="yescufflinks">
                                 <param name= "cufflinksannotation" type="select" label="Cufflinks Annotation" display="checkboxes" multiple="true">
                                            <option value="yescufflinksannotation">TRUE</option>
                                </param>
                         </when>
         </conditional>
   </when>
</conditional>
Thank you
Asma
    ADD COMMENT
    • link
    
    
        
        •
        
            
            
        
    
    
            
            modified 3.6 years ago
            
                by 
Martin Čech ♦♦ 4.9k
            
            •
        
        written 
        3.6 years ago by 
bankapur • 0
    
            
I don't see a problem at a first look. I assume the error happens in the command line tag. It is probably best to show the complete xml file
Hans-Rudolf
I have edited my original post to include the entire xml file at this point. Let me know if you find error in the way the command line is constructed.