On Thu, 26 Aug 2010, Jeremy Goecks wrote:
I have a tool that can be run on multiple data formats. But I need to run it differently depending on the format of the input dataset. How can I get the input data format?
In the tools .xml file I have:
<param format="interval,lped" name="input1" type="data" label="SNPs">
and
#if $input1.metadata.format=="interval" ...
The if doesn't work, what should be there?
Hi Belinda,
The condition you want to use is this:
#if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('interval').__class__):
You can see this example in context by looking at the XML tool definition file for the intersect tool, intersect.xml
Let us know if this doesn't solve your problem.
Best, J.
That solved the first problem. But I would like to also put a conditional on another parameter again based on the datatype. Using format="interval" or the isinstance as above, neither works. Is it possible? Belinda