Hello Shaun,

Use the 'from_file' option.  The referenced file should be in the ~/tool-data directory in the Galaxy root.  There are several example tools in the distribution that use this option.  Here is the example code from the annotation profiler tool:

<param name="table_names" type="drill_down" display="checkbox" hierarchy="recurse" multiple="true" label="Choose Tables to Use" help="Selecting no tables will result in using all tables." from_file="annotation_profiler_options.xml"/>

and here is an example from the microbial import tool:

      <param name="kingdom" type="select" label="Select the Desired Kingdom">
        <options from_file="microbial_data.loc" startswith="ORG">
          <column name="name" index="3"/>
          <column name="value" index="3"/>
          <filter type="unique_value" name="unique" column="3"/>
        </options>
      </param>


On Jul 13, 2011, at 6:17 AM, SHAUN WEBB wrote:


Hi,

I am trying to write a tool xml file and want to do the following:


I have a number of GTF files stored locally and referenced in a data table. I give the user a drop down list of those available using the following code:

<param name="gtf" type="select"  label="GTF File">
   <options from_data_table="gtf_files"/>
</param>


I then want them to choose an annotation type based on those present in the selected gtf file above. It seems simple enough to do this if the gtf file is in your history already:

<param name="feature" type="select" multiple="true" label="Extract features">

<options from_dataset="gtf">

  <column name="name" index="2"/>

  <column name="value" index="2"/>

  <filter type="unique_value" name="unique" column="2"/>

  </options>

</param>


But is there a way to query locally stored files via datatables/.loc files to pull out options when the file is dynamically chosen by a different parameter?

This code is also wrapped in a conditional, I'm not sure if that will affect anything.

Thanks
Shaun






--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


___________________________________________________________
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:

http://lists.bx.psu.edu/

Greg Von Kuster
Galaxy Development Team
greg@bx.psu.edu