Using a variable in <data from_work_dir="">
Hi there I'm trying to wrap Bioperl's bp_genbank2gff script. This script, by default, produces an output file named the same as the basename of the input file, with .gff added. So e.g. bp_genbank2gff data.gbk produces a file named data.gbk.gff. I'm trying to use the from_work_dir attribute of the <data> tag to pick up this file. However, if I create a tool XML like: <tool id="Genbank2GFF3" name="Genbank to GFF3" version="1.0"> <description>Convert Genbank format to GFF3</description> <command interpreter="python"> bp_genbank2gff $genbank_filename </command> <inputs> <param name="genbank_filename" type="data" format="txt"> <label>Genbank sequence record(s)</label> </param> </inputs> <outputs> <data format="gff3" name="gff3_filename" from_work_dir="${genbank_filename}.gff"> </data> </outputs> <help> </help> </tool> I get an error from Galaxy indicating that it is trying to find a file name $genbank_filename.gff, I.e. the ${genbank_filename} is not expanded. Is there any way to deal with this situation? Of course the other option is to create a tiny wrapper around bp_genbank2gff that takes an output filename argument and does the renaming... Peter
On Thu, May 17, 2012 at 12:13 PM, Peter van Heusden <pvh@sanbi.ac.za> wrote:
Hi there
I'm trying to wrap Bioperl's bp_genbank2gff script. This script, by default, produces an output file named the same as the basename of the input file, with .gff added. So e.g.
bp_genbank2gff data.gbk
produces a file named data.gbk.gff.
Is there not an option to specify the output file name? That would be the easy solution for using this from Galaxy.
... Of course the other option is to create a tiny wrapper around bp_genbank2gff that takes an output filename argument and does the renaming...
Indeed, that is the standard fall back for inflexible tools with a limited command line API. Peter
I get an error from Galaxy indicating that it is trying to find a file name $genbank_filename.gff, I.e. the ${genbank_filename} is not expanded.
Is there any way to deal with this situation?
Not currently. This is a nice idea and should be done, but it's not obvious to implement. I'll try to take a look in the near future.
Of course the other option is to create a tiny wrapper around bp_genbank2gff that takes an output filename argument and does the renaming...
Yes, the whole point of from_work_dir is to alleviate the need to write wrappers to deal with hard-coded outputs files. Best, J.
participants (3)
-
Jeremy Goecks
-
Peter Cock
-
Peter van Heusden