Hi Sascha I don't quite understand your question... $sReference.ref is the variable you are looking for, isn't-it? Regards, Hans On 09/04/2012 11:40 AM, Sascha Kastens wrote:
Hi all!
I am facing a simple problem but can’t find a solution to solve it.
Before I start describing my problem here is the code from my tool:
<conditional name="sReference">
<param name="reference" type="select" label="Select a reference genome" help="">
<option value="mm9_64">mm9_64</option>
<option value="hg19">hg19</option>
<option value="custom">custom (from history, fasta)</option>
</param>
<when value="mm9_64">
<param name="ref" type="hidden" value="7596a73211022433" />
</when>
<when value="hg19">
<param name="ref" type="hidden" value="f73725d4339c9140" />
</when>
<when value="custom">
<param name="ref" type="hidden" value="b5d0b09143f99c68" />
<param name="cReference" format="fasta" type="data" label="Select the reference genome" />
</when>
</conditional>
<conditional name="sCuffcompare">
<param name="cuffcompare" type="boolean" truevalue="yes" falsevalue="no" label="Run Cuffcompare?" help="" />
<when value="yes">
<conditional name="sRefannotation">
<param name="refannotation" type="select" label="Will you select a reference annotation from your history or use a GATC supported one?" help="" >
<option value="no_ref">No reference annotation</option>
<option value="supported">Supported</option>
<option value="history">History</option>
</param>
<when value="supported">
<param name="index" type="select" label="Select reference annotation" help="">
<options from_file="gatc_transcriptome_annotations.loc">
<column name="name" index="2" />
<column name="value" index="3" />
<filter type="sort_by" column="2" />
<filter type="param_value" ref="sReference.reference" column="0"/>
<validator type="no_options" message="No annotations are available for the selected reference genome"/>
</options>
</param>
</when>
<when value="history">
<param name="cAnnotation" format="gtf" type="data" label="Select the reference annotation" />
</when>
<when value="no_ref" />
</conditional>
</when>
<when value="no" />
</conditional>
As you might see from the code above I am trying to filter the contents for <param name="index" type="select" label="Select reference annotation" help="">
based on the selected value in <param name="reference" type="select" label="Select a reference genome" help="">
(<filter type="param_value" ref="sReference.reference" column="0"/>). As soon as I try to load this configuration
I get the error KeyError: ’sReference.reference’. So it seems, that the tool cannot access the key sReference.reference. I figured out that the tool can access only the "top"
key from the conditional, i.e. I can use <filter type="param_value" ref="sReference" column="0"/> and no error appears while reloading the tools config. But this
is not useful because sReference does not contain any value for filtering.
Does anybody know how the tool can access variables/keys under a conditonal tag without being within the conditional tag itself?
Thanks for any help/hints/advice!
Cheers,
Sascha
___________________________________________________________ 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: