Hi,
I am trying to use conditional tag as per the instructions specified.
This is the code I wrote in xml file I created for my tool:
<tool id="gKelvinTest" name="GKelvin Step">
<description>Test conditions for gKelvin.</description>
<command>
#if $test.confile=="metadata": #gkelvin $test.meta
#else: #gkelvin $test.nonmeta
#end
</command>
<inputs>
<conditional name="test">
<param name="confile" type="data" label="Configuration File">
<option value="metadata">With Metadata</option>
<option value="no_metadata">Without Metadata</option>
</param>
<when value="metadata">
<param name="meta" type="select" label="Metadata info">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</param>
</when>
<when value="no_metadata">
<param name="nonmeta" type="text" label="No metadata Info" />
</when>
</conditional>
</inputs>
<help>
Will Run Kelvin.
</help>
</tool>
But I get the following error.
Error Traceback:
View as: Interactive | Text | XML (full)
⇝ Exception: ('No case matched value:', 'test', <galaxy.model.HistoryDatasetAssociation object at 0x214c6ed0>)
URL: http://10.70.250.254:8080/tool_runner?tool_id=gKelvinTest
Module weberror.evalexception.middleware:364 in respond view
>> app_iter = self.application(environ, detect_start_response)
Module paste.debug.prints:97 in __call__ view
>> status, headers, body = wsgilib.intercept_output(
Module paste.wsgilib:539 in intercept_output view
>> app_iter = application(environ, replacement_start_response)
Module paste.recursive:80 in __call__ view
>> return self.application(environ, start_response)
Module paste.httpexceptions:632 in __call__ view
>> return self.application(environ, start_response)
Module galaxy.web.framework.base:125 in __call__ view
>> body = method( trans, **kwargs )
Module galaxy.web.controllers.tool_runner:53 in index view
>> template, vars = tool.handle_input( trans, params.__dict__ )
Module galaxy.tools:759 in handle_input view
>> state = self.new_state( trans )
Module galaxy.tools:681 in new_state view
>> self.fill_in_new_state( trans, inputs, state.inputs )
Module galaxy.tools:691 in fill_in_new_state view
>> state[ input.name ] = input.get_initial_value( trans, context )
Module galaxy.tools.parameters.grouping:408 in get_initial_value view
>> current_case = self.get_current_case( test_value, trans )
Module galaxy.tools.parameters.grouping:365 in get_current_case view
>> raise Exception( "No case matched value:", self.name, str_value )
Exception: ('No case matched value:', 'test', <galaxy.model.HistoryDatasetAssociation object at 0x214c6ed0>)
Extra Features
>> Display the lines of code near each part of the traceback
Show a debug prompt to allow you to directly debug the code at the traceback
Re-GET Page
Any help would be appreciated,
Thanks a lot
Regards,
Amit Modi