Wrapping tools with optional data files
Hi List, I am wrapping a Galaxy tool for the GFFread utility from Cufflinks. It has a few optional files as inputs, but I can't get this to translate to the tool wrapper. I started with a tool that has an advanced options menu. When this is selected as "advanced", it brings up a bunch of parameters, including the optional fasta file. If I select something for the optional field, it works fine; if I don't select anything (it says "Selection is Optional"), I get this error and the tool doesn't run: Error executing tool: 'param name' If I use the basic options, it works fine. This seems to have nothing to do with the <command> tag, which can never mention the param name. I looked for an example of a successful optional file tool and found the GATK depth of coverage tool. It doesn't have that conditional tag around its optional file, though - and when I add the advanced options conditional, it breaks it. Here's the prototype: <tool id="gffread" name="GFFread" version="0.0.1"> <command> gffread $input_file -o $output_file #if $adv_opts.adv_opts_selector == "advanced": #if str( $adv_opts.input_map ) != "None": -g $adv_opts.input_map #end if #end if </command> <inputs> <param name="input_file" type="data" format="gff,gtf,gff3" label="GFF file"/> <param name="works" type="data" format="fasta" label="This one works" optional="True" /> <conditional name="adv_opts"> <param name="adv_opts_selector" type="select" label="Advanced Options"> <option value="basic" selected="True">Hide Advanced Options</option> <option value="advanced">Show Advanced Options</option> </param> <when value="advanced" > <param name="input_map" type="data" format="fasta" label="Fasta map file" optional="True" /> </when> </conditional> </inputs> ... Is there another way around this? Thanks, Carrie Ganote
participants (1)
-
Ganote, Carrie L