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

Hi,

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

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

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>
    </param>
    <when value="linear" />
</conditional>

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">
    <![CDATA[
    #if  $selection.select == "svm"
    toolManager.py $input svm 
    #end if
    ]]>
    </command>
tool galaxy • 270 views
ADD COMMENTlink modified 10 months ago • written 10 months ago by chicken8duck0
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: 84 users visited in the last hour