26 Aug
2010
26 Aug
'10
1:03 p.m.
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.