Hi Peter, .ext and .extension are actually the same thing (.ext is a readonly @property that returns .extension); this contains the string that Galaxy uses to declare the datatype for a particular instance of a dataset and is also used for the extension for the file when a user clicks the save icon for the dataset in their history. You are correct that all datasets are stored on disk with a .dat extension. Because the underlying files can actually be set with several different datatypes at a single time (copies of datasets within and between histories, libraries and users, where a user can change the datatype of a history item manually), its not really feasible to have them stored on disk with a more meaningful extension. However, there has been talk in the past about ways to allow the xml for individual tools to specify an actual filename that will be used during tool execution (e.g. using symlinks). This is definitely a worthwhile feature and would, as you suggest, prevent the need for hacks in several wrappers, but I don't think anyone is working on this currently. Thanks, Dan On Dec 16, 2010, at 12:03 PM, Peter wrote:
Hi all,
I've noticed from a couple of examples that when defining the command line string in an tool's XML wrapper (i.e. cheetah template), you can use $input_param_name.extension (or apparently $input_param_name.ext) to get the file format (metadata) for an input parameter called input_param_name (while of course you use $input_param_name to get the filename for this param).
This doesn't seem to be documented on the tool conf wiki: http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax
Most of the examples I found looking at the tool XML use the longer form (.extension), although interestingly in a recent commit Dan used just .ext in the fastx_clipper.xml file to special case Sanger FASTQ. Is that a valid alternative too? https://bitbucket.org/galaxy/galaxy-central/changeset/93d7007bd859
I'm curious about the naming here - did Galaxy once use the format name as the actual file extension? Now at least all data files seem to have .dat as the extension (which I'm sure presents a small problem for some command line tools which make file format inferences from the filename extension, requiring hacks in their Galaxy wrappers).
Peter _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev