On 02/06/2012 03:54 PM, Sarah Diehl wrote:
I'm only guessing here, but maybe the issue is that the parameter names are all the same (namely "model"). Did you try with only unique names? Especially this one:
<param name="models" type="select" label="model source" help="History or installed models?" value="local">
should get it's own name.
Thank you, that was the first step to the solution. In fact I had used different names before and failed, but what I left out was using $ModelSource as a prefix to the actual variable name. I had to rename the selection parameter "model" for local or history, the two alternative parameters could stay with the same name ("model"), since they are used mutually exclusive. Then, using $ModelSource.model would give the correct result. Cheers, Holger
Sarah
On 02/06/2012 03:38 PM, Holger Klein wrote:
Dear all,
I'm working on a tool wrapper which for a sequence scoring tool. It's supposed to score sequences either using a library installed to galaxy (tool-data/models.loc) or datasets from the user history.
I tried to implement this behavior using the<conditional> /<when value> mechanism, simplified code follows below.
Using locally installed models (from models.loc) fails with "NotFound: cannot find 'models'", although in the details view of the failed tool run "model database" points to the right file.
Using the model file from the history works.
Defining _only_ locally installed models from models.loc also works (removing the<conditional> stuff and leaving only the part inside<when value='local'> </when>).
The commandline might look a bit strange but is correct.
Can anybody spot what is going wrong here?
Regards, Holger
--
<command> calcModels --scoreFasta -- --fa $fasta_in --bgFa $fasta_background --models $models> $output_table </command>
<inputs> <param format="fasta" name="fasta_in" type="data" label="Input Fasta File" />
<param format="fasta" name="fasta_background" type="data" label="Background Fasta File" />
<conditional name="ModelSource"> <param name="models" type="select" label="model source" help="History or installed models?" value="local"> <option value="local">Locally installed models</option> <option value="history">Models from your history</option> </param>
<when value="local"> <param name="models" type="select" label="model database"> <options from_file="models.loc"> <column name="name" index="1"/> <column name="value" index="2"/> </options> </param> </when>
<when value="history"> <param name="models" type="data" format="tabular" label="model database" /> </when> </conditional> </inputs>
-- Dr. Holger Klein Core Facility Bioinformatics Institute of Molecular Biology gGmbH (IMB) http://www.imb-mainz.de/ Tel: +49(6131) 39 21511