Question: No case matched value Error with use of conditional statements
gravatar for bankapur
3.6 years ago by
United States
bankapur0 wrote:


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>

#if str($sample_file) != "": -s "$sample_file"
 #end if
#if str($genome_annotation) != "":
     -n "$genome_annotation"
 #end if
#if str($trimmomatic) == "yestrimmomatic":
#end if
#if str($tophat) == "yestophat":
 #end if
#if str($cufflinks) == "yescufflinks":
#end if
 #if str($cufflinksannotation) == "yescufflinksannotation":
#end if
#if str($rnaseqc) == "yesrnaseqc":
#end if
 #if str($rrnaquantitation) == "yesrrnaquantitation":
#end if
#if str($rsem) == "yesrsem":
#end if
#if $threads > 1:
    -e "$threads"
#end if
#if $max_process > 1:
    -j "$max_process"
#end if
 #if $output_directory:
#end if
<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 name= "trimmomatic" type="select" label="Trimmomatic" display="checkboxes" multiple="true">
                   <option value="yestrimmomatic" selected="true">TRUE</option>
<conditional name="turn_on_cufflinks">
        <param name= "tophat" type="select" label="TopHat" display="checkboxes" multiple="true">
                    <option value="yestophat" selected="true">TRUE</option>
            <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>
                         <when value="yescufflinks">
                                 <param name= "cufflinksannotation" type="select" label="Cufflinks Annotation" display="checkboxes" multiple="true">
                                            <option value="yescufflinksannotation">TRUE</option>


Thank you 


conditional galaxy • 1.0k views
ADD COMMENTlink modified 3.6 years ago by Martin Čech ♦♦ 4.9k • written 3.6 years ago by bankapur0

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



ADD REPLYlink written 3.6 years ago by Hotz, Hans-Rudolf1.8k

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.

ADD REPLYlink written 3.6 years ago by bankapur0
gravatar for Hotz, Hans-Rudolf
3.6 years ago by
Hotz, Hans-Rudolf1.8k wrote:
unless, this is a new feature I am not yet aware of, I would write

#if $turn_on_cufflinks.tophat == "yestophat":


instead of:

#if str($tophat) == "yestophat":


Hope this helps, Hans-Rudolf


ADD COMMENTlink written 3.6 years ago by Hotz, Hans-Rudolf1.8k
Please log in to add an answer.


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