Dynamic options set up to extract data from a list collection

Hello everyone,
I would like to dynamically visualize a list of miR names stored within a dataset of a list collection.
I found two possible solutions:

  1. dynamic_options
  2. Options from_dataset

I tested the following code in mytool.xml file:

< param name=“gene_id” type=“select” label=“Gene ID” dynamic_options=“get_genes(mylistcollection)” />

I also tried to create dynamic options from a file in my history as follows:

<param name=“name” type=“select” label="…" help="…">
<options from_dataset=“fileinhistory”>
<filter type=“sort_by” column=“1”/>
<validator type=“no_options” message=“No indexes are available for the selected input dataset”/>
</options>
</param>

With both methods I did not find any option in mytool form.

Do you have some solution to this issue?

Thank you very much

1 Like

Hello,

I don’t think this is possible when the input is in a multi-dataset list collection. Maybe try using the “Collapse Collection into single dataset in order of the collection” tool first? Or, capture that same logic directly into your new wrapper?

I also asked the developers at Gitter for feedback. Please feel free to join the conversation: https://gitter.im/galaxyproject/Lobby?at=5c6f5af6b6c74f1e2e8f39a1

Thanks!

Thank you Jennaj!!!

I collapsed the list but no option is visualized.

This is my code:

<param name="collapsedfiles" type="data" format="tabular" label="" />
<param name="opt" type="select" optional="true" multiple="true" label="">
  <options from_dataset="collapsedfiles">
      <column name="Target Name" index="4"/>
      <filter type="unique_value" name="Target Name" column="4"/>
      <filter type="sort_by" name="Target Name" column="4"/>
  </options>
</param>

Target name is the column of the collapsed file with gene names.

I read somewhere that columns should have a specific name and index. Do you think this might be the problem?

Thank you again

1 Like

Hi - I’ve asked the developers for some help with this at the Galaxy Project Gitter channel. They may get back there or here, and you are welcome to join in at the other channel: https://gitter.im/galaxyproject/Lobby?at=5c757655e1446a6ebe4d0c10

One question they will likely ask first – are you using Planemo for development?

No, I am not!

I am using Planemo to parse mytool wrapper and for generating the .yml for the shed.