Hi Greg,

thanks for the suggestion. This line doesn't seem to work:

<options from_file="some_value">

Galaxy looks for a file at galaxy_dir/tool-data/some_value rather than the value given in the .loc file

I would also like to be able to use the galaxy data tables rather then referring directly to a .loc file.

Any ideas?

Shaun


Quoting Greg Von Kuster <g...@bx.psu.edu> on Wed, 13 Jul 2011 10:28:30 -0400:

Hi Shaun,

This should be possible. It's been quite a long time since I worked on tools, so maybe others can provide better assistance if I am incorrect here. You'll need to have a conditional something like the following ( not tested whatsoever ):

      <conditional name="selected_file_select_list">
<param name="selected_gtf_file" type="select" label="Gtf file by species">
              <options from_file="some_file">
                <column name="name" index="2"/>
                <column name="some_value" index="1"/>
              </options>
          </param>
          <when value="some_value">
<param name="values_from_selected_gtf_file" type="select" label="Values from selected gtf file" />
                <options from_file="some_value">
                        <column name="name" index="2"/>
                        <column name="some_value" index="1"/>
                </options>
          </when>
      </conditional>


On Jul 13, 2011, at 9:45 AM, SHAUN WEBB wrote:


Hi Greg, I'm not sure if this answers my question. Using options_from_file is fine if I want to refer to the same file each time.

In this case I want the first select to choose which gtf file to look at (by species) and the second select to pull options (gtf annotation types) from this file.

So I would somehow have to reference the file using the first parameter rather than giving a hard-coded path.

Is that possible?

Shaun


Quoting Greg Von Kuster <g...@bx.psu.edu> on Wed, 13 Jul 2011 09:23:19 -0400:

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
g...@bx.psu.edu







--
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
g...@bx.psu.edu







--
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/

Reply via email to