Tool: Get macro conditional value
gravatar for chicken8duck
22 months ago by
chicken8duck0 wrote:


I am making a module for galaxy.

This module is supposed to show different parameters based on what option in a dropdown menu is selected.

If a is selected then: options int:c textInput:d float:f will show.

if b is selected then: options int:i int:j int:k will show.

So far I have accomplished this using the following layout:

        <conditional name="selection" type="select">
        <param name="select" type="select" label="Select">
            <option value="svm" selected="True" >SVM</option>

          <when value="svm">
              <expand macro="svm_expanded"/>

The macro contains: Note: The macros are contained in a different file and are imported in the beginning of the tool

  <xml name="svm_expanded">
<conditional name="svm_kernel">
    <param argument="--kernel" name="kernel" type="select" label="Pick the kernel" >
        <option value="linear" selected="true">Linear</option>
        <option value="poly">Polynomial</option>
    <when value="linear" />

My question is, how can I get what kernel is selected and pass it into my python script.

This is how I am sending information to my script.

    <command interpreter="python">
    #if  $ == "svm" $input svm 
    #end if
tool galaxy • 502 views
ADD COMMENTlink modified 22 months ago • written 22 months ago by chicken8duck0
Please log in to add an answer.


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