I'm no authority... but given that nobody else has replied yet I'll give my opinion. I think I would approach the directory problem with a wrapper script that takes arguments for each of the components needed by the tool. The script could lay out the various files as expected in the working directory and call the script. I think that's cleaner than expecting users to build a tar archive with the proper structure. brad On Apr 3, 2012, at 8:58 PM, Aaron Gallagher wrote:
Hi,
I've been working off of a local instance of Galaxy (6799:40f1816d6857) to develop tools and I'm running into some issues which I'm not sure how to resolve idiomatically.
First, some of the tools I'm trying to write Galaxy wrappers for take a directory as input. The directory contains some metadata and some related files (a FASTA alignment; a Newick tree; etc.). Originally I tried making a data type that was a .tar.gz'd directory and a converter that would untar it to a directory by doing approximately `rm $output; mkdir $output; tar xf $input -C $output`. This was causing errors in Galaxy; I can get these if it would be useful, but I figured that this is probably an unsupported thing anyway.
The way that I'm handling it now is to untar the archive every time that the tool is run, but it seems like there's probably a better way of setting this up.
Second, these tools also expect their inputs to have a meaningful file extension, but it seems like the filenames that Galaxy gives to the tool all just have ".dat" as the extension. I was getting around this by doing `ln -s $input input.ext`, but again, this seems suboptimal. It's also complicated by that some of these programs can take a FASTA or Stockholm alignment, but decide which parser to use by the extension. I'd like to be able to support both, but it seems like that would require somehow getting the file type out of the metadata and doing some sort of check against that.
I've seen some mailing list posts that talk about doing the same symlink trick, but I'm kind of hoping that there's some better method available now.
Thanks for any insight into writing idiomatic Galaxy tools, ~Aaron
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
-- Brad Langhorst langhorst@neb.com 978-380-7564