Begin forwarded message:
From: galaxy-user-bounces@lists.bx.psu.edu Date: August 25, 2010 5:44:32 PM EDT To: galaxy-user-owner@lists.bx.psu.edu Subject: Auto-discard notification
The attached message has been automatically discarded. From: "Belinda M. Giardine" <giardine@bx.psu.edu> Date: August 25, 2010 5:44:28 PM EDT To: Galaxy-user@bx.psu.edu Subject: finding file format of data item
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?
Thanks, Belinda
In theory, the correct attribute should be "$input1.extension". Let us know if that doesn't work though.
From: "Belinda M. Giardine" <giardine@bx.psu.edu> Date: August 25, 2010 5:44:28 PM EDT To: Galaxy-user@bx.psu.edu Subject: finding file format of data item
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?
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.
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
participants (4)
-
Belinda M. Giardine
-
James Taylor
-
Jeremy Goecks
-
Kelly Vincent