Question: tag <filter> output with select box galaxy
0
gravatar for alan.lahure
3.0 years ago by
France
alan.lahure0 wrote:

Hi everybody,

i want to know if it is possible to use the <filter> tag for output from type="select" multiple ? If yes, how I can do ?

<inputs>

<param name="output_select" type="select" label="Output files format  (at least one box selected obligatory" multiple="true" display="checkboxes" help="FASTA">
      <option value="fa">FASTA</option>
      <option value="gff">GFF</option>
      <option value="csv">CSV</option>
      <option value="html">HTML</option>
      <option value="yml">YML</option>
    </param>

</inputs>

<outputs>
    <data format="log" name="outputLog" label="logMirkwood"/>
    <data format="tar" name="tarResults" label="tarFile"/>                                                                                                                                                   
    <data format="fasta" name="fasta_out" label="output_fasta">
      <filter>????</filter>
    </data>
    <data format="gff" name="gff_out" label="output_gff">
      <filter>???</filter>
    </data>
  </outputs>

 

When the user select a file type, it become a output.

I have a other question, How to force the user to select a check ?

Thank you,

 

Alan

 

 

 
galaxy • 1.3k views
ADD COMMENTlink modified 3.0 years ago by Hotz, Hans-Rudolf1.8k • written 3.0 years ago by alan.lahure0
1
gravatar for Hotz, Hans-Rudolf
3.0 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi Alan

to get the correct format, try the following:

<data name="output" format="fasta">
      <change_format>
               <when input="output_select" value="gff" format="gff"/>
               <when input="output_select" value="csv" format="csv"/>
               <when input="output_select" value="html" format="html"/>
               <when input="output_select" value="yml" format="yml"/>
      </change_format>
</data>

see also: https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Cchange_format.3E_tag_set

 

and wrt your second question: use "radio buttons" (i.e.: display="radio"). Again, you will find examples on the wiki.

 

Hope this helps,

Hans-Rudolf

ADD COMMENTlink written 3.0 years ago by Hotz, Hans-Rudolf1.8k
0
gravatar for alan.lahure
3.0 years ago by
France
alan.lahure0 wrote:

Hi Hans, thank you for your response, but the user can to select several responses. And your solution doesn't work for me. And for the radio button is not the good solution because, the user must to choose at least one output.

Have you got a other solutions maybe for me ?

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by alan.lahure0
0
gravatar for Hotz, Hans-Rudolf
3.0 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi Alan

 

Using 'display="checkboxes"', you can add 'selected="true"' to one of the options (e.g.:   <option value="fa" selected="true">FASTA</option> ). This way, you have at least one selected, and the user can add more options and keep or remove the pre-selected one.

Hans-Rudolf

 

ADD COMMENTlink written 3.0 years ago by Hotz, Hans-Rudolf1.8k

Hi Hans,

thank you for your help. I can use the filter on the checkbox ? For exemple, <filter output_select["fa"] is true</filter> or <filter output_select["fa"] == "true"</filter> or maybe other things. Because, I tried many ways but anyone work. The tool gives me all outputs but I want just its selected.

Have you got a idea ?

Thank you again

 

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by alan.lahure0

generating a variable number of output files is tricky, but in your case this page should help you:

https://wiki.galaxyproject.org/Admin/Tools/Multiple%20Output%20Files#Variable_Static_Outputs_determined_by_parameter_values

ADD REPLYlink written 3.0 years ago by Hotz, Hans-Rudolf1.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 175 users visited in the last hour