Hi!

I have a tool with three possible types of input.  A flag is set to either 'bed', 'resource' or 'file' for the two inputs.  I've noticed that the conditional variables are not available on the command line, so is there some other way of setting these flags?

So far, the UI handles the 3 possible input types nicely, but I'd like to set the format1 and format2 flags directly from the conditional.  It seems that the conditional parameters aren't seen by cheetah.  I also tried using 'hidden' parameters, but those seem to be for totally different uses.
# USAGE:
# python enrichment_pairwise.py myfile.bed geneExons --format1=bed --format2=resource --genome_resource=hg18 --output_file=overlap.txt

Trying to run this in galaxy gives:
Traceback (most recent call last):
  File "/home/wbiesing/galaxy_dist/lib/galaxy/jobs/runners/local.py", line 55, in run_job
    job_wrapper.prepare()
  File "/home/wbiesing/galaxy_dist/lib/galaxy/jobs/__init__.py", line 355, in prepare
    self.command_line = self.tool.build_command_line( param_dict )
  File "/home/wbiesing/galaxy_dist/lib/galaxy/tools/__init__.py", line 1397, in build_command_line
    command_line = fill_template( self.command, context=param_dict )
  File "/home/wbiesing/galaxy_dist/lib/galaxy/util/template.py", line 9, in fill_template
    return str( Template( source=template_text, searchList=[context] ) )
  File "/home/wbiesing/galaxy_dist/eggs/Cheetah-2.2.2-py2.6-linux-x86_64-ucs4.egg/Cheetah/Template.py", line 1004, in __str__
    return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1280646041_98_13115.py", line 89, in respond
NotFound: cannot find 'res1_select


My tool's XML file looks like:

<command interpreter="python">enrichment_pairwise.py $resource1 $resource2 --format1=$res1_select --format2=$res2_select --genome_resource=$dbkey --output_file=$outputFile</command>
  <inputs>
        <conditional name="resource1_test">
          <param name="res1_select" type="select" label="Input type for resource1">
              <option value="bed">BED File</option>
              <option value="resource">Worldbase Resource</option>
              <option value="file">File with list of Worldbase Resources</option>
          </param>
          <when value="bed">
              <param name="resource1" type="data" format="bed" label="Bed file for resource1" />
          </when>
          <when value="resource">
              <param name="resource1" type="text" label="Worldbase ID for resource1" />
          </when>
          <when value="file">
              <param name="resource1" type="data" format="text" label="Text file with Worldbase IDs to iterate over for resource1" />
          </when>
        </conditional>
        
        <conditional name="resource2_test">
          <param name="res2_select" type="select" label="Input type for resource2">
              <option value="bed">BED File</option>
              <option value="resource">Worldbase Resource</option>
              <option value="file">File with list of Worldbase Resources</option>
          </param>
          <when value="bed">
              <param name="resource2" type="data" format="bed" label="Bed file for resource2" />
          </when>
          <when value="resource">
              <param name="resource2" type="text" label="Worldbase ID for resource2" />
          </when>
          <when value="file">
              <param name="resource2" type="data" format="text" label="Text file with Worldbase IDs to iterate over for resource2" />
          </when>
        </conditional>        
</inputs>

Thanks for your help!
--
Jake Biesinger
Graduate Student
Xie Lab, UC Irvine
(949) 231-7587