view sampler.xml @ 5:5e7468a35380 draft

planemo upload for repository ['https://github.com/brsynth/icfree-ml', 'https://github.com/pablocarb/doebase'] commit 20770dfcb79499aa201b8b6faed420babef8d053
author tduigou
date Tue, 23 Jul 2024 09:30:47 +0000
parents d69cb64336e7
children 04159a12c757
line wrap: on
line source

<tool id="doe_synbio_sampler" name="iCFree sampler" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@">
    <description>Generate Latin Hypercube Samples for given components.</description>
    <macros>
        <import>macros.xml</import>
        <token name="@TOOL_VERSION@">2.4.0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">icfree-ml</requirement>
    </requirements>
    <expand macro="stdio"/>
    <command detect_errors="exit_code"><![CDATA[
        python -m icfree.sampler
            '$input_file'
            '$output_sampling'
            '$num_samples'
            --step '$adv.step'
            #if str($adv.seed_cond.seed_param) == 'not_random'
                --seed '$adv.seed_cond.seed'
            #end if
    ]]></command>
    <inputs>
        <param name="input_file" type="data" format="tabular" label="Input file with components and their max values." />
        <param name="num_samples" type="integer" value="99" min="1" max="198" label="Number of samples to generate" />
        <section name="adv" title="Advanced Options" expanded="false">
            <param name="step" type="float" value="2.5" min="1" max="10" label="Step size for creating discrete ranges" />
            <conditional name="seed_cond">
                <param name="seed_param" type="select" label="Seed" help="Choose a seed or let it as random">
                    <option value="random" selected="true">random</option>
                    <option value="not_random">fixed</option>
                </param>
                <when value="random"/>
                <when value="not_random">
                    <param name="seed" type="text" value="0" label="Seed value" help="Only integer allowed">
                        <validator type="empty_field" message="Not empty, select random"/>
                        <validator type="regex" message="Only integer allowed">^(?:\d+)$</validator>
                    </param>
                </when>
            </conditional>
        </section>
    </inputs>
    <outputs>
        <data name="output_sampling" format="tabular" label="${tool.name}" />
    </outputs>
    <tests>
        <!-- test 1: check if identical outputs are produced with default parameters  -->
        <test>
            <param name="input_file" value="sampler/input/components.tsv" />
            <param name="num_samples" value="3" />
            <param name="seed_param" value="not_random" />
            <param name="seed" value="0" />
            <output name="output_sampling" file="sampler/output/sampling.test-1.tsv" ftype="tabular" compare="diff" />
        </test>
        <!-- test 1: check if identical outputs are produced with default parameters  -->
        <test>
            <param name="input_file" value="sampler/input/components.tsv" />
            <param name="num_samples" value="4" />
            <param name="step" value="3.1" />
            <param name="seed_param" value="not_random" />
            <param name="seed" value="0" />
            <output name="output_sampling" file="sampler/output/sampling.test-2.tsv" ftype="tabular" compare="diff" />
        </test>
    </tests>
    <help><![CDATA[
Sampler
=======

Generate Latin Hypercube Samples for given components.
    ]]></help>
    <expand macro="creator"/>
    <citations>
        <citation type="bibtex">
            @unpublished{icfree
                author = {Joan Hérisson, Yorgo El Moubayed},
                title = {{icfree}},
                url = {https://github.com/brsynth/icfree-ml/},
            }
        </citation>
    </citations>
</tool>