Skip to content

Conversation

@danifranco
Copy link
Contributor

This PR builds on and supersedes #7427 (Updating tools/biapy from version 3.6.5 to 3.6.7).

Changes:

  • Update BiaPy version
  • Fix errors when running a tool multiple times: ln -s command now is forced as ln -sf.

I'm trying to introduce a nested conditional but I can't do it. I've tried several things but anyone worked. What I want is to control the visibility of the ground truth data related fields, e.g. train_gt_param and test_gt_param parameters defined in macros.xml, based on the workflow selected (workflow param defined in biapy.xml). For example, the denoising workflow does not require ground truth, as it is self-supervised, so I don't want even to show that field for the user so they don't get confused. My last attempt, and the one in this PR, is define those ground-truth parameters as follows (here the example of test_gt_param) :

<xml name="test_gt_param">
    <conditional name="test_gt_workflow_cond">
        <param name="workflow_check" type="select" value_from="mode_selection.workflow" label="Internal Workflow Check"/>
        <when value="semantic">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="instance">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="detection">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="sr">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="cls">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="sr2">
            <expand macro="test_gt_param_question"/>
        </when>
        <when value="i2i">
            <expand macro="test_gt_param_question"/>
        </when>
       <when value="denoising"/>
    </conditional>
</xml>

If you see, for the "denoising" case, i.e. mode_selection.workflow has the value "denoising", "test_gt_param_question" macro is not expanded. How can I do this? The resulting tool tested locally looks as follows:

image

On top of that, I'd like to remove that "Internal Workflow Check" frame if possible so it's transparent for the user and don't add extra unnecessary frames into the tool.

Thank you so much!!

@bernt-matthias @bgruening

Copy link
Contributor

@bernt-matthias bernt-matthias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On top of that, I'd like to remove that "Internal Workflow Check" frame if possible so it's transparent for the user and don't add extra unnecessary frames into the tool.

This is not possible at the moment. Please open a feature request at the galaxy repo.

<xml name="test_gt_param_optional">
<xml name="test_gt_param">
<conditional name="test_gt_workflow_cond">
<param name="workflow_check" type="select" value_from="mode_selection.workflow" label="Internal Workflow Check"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One way to go would be to directly use the workflow parameter here, i.e. put the conditional at the position where the workflow parameter is, and just use the workflow parameter here.

Alternatively insert the workflow parameter (in a conditional) at each place where the test/train parameters can be selected (using a macro).

value_from are documented as seldomly used (I never have seen it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants