view instructor.xml @ 8:c8bd090fa47f draft

planemo upload for repository https://github.com/brsynth/icfree-ml commit 1d40e70482d76c2f672071584b43a358aa5a0de7
author tduigou
date Wed, 15 Mar 2023 10:42:44 +0000
parents 6f8e7e811333
children eac0d2bd8dd8
line wrap: on
line source

<tool id="icfree_instructor" name="iCFree instructor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@">
    <description>Generates a list of Echo-compatible instructions to prepare samples</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command detect_errors="exit_code"><![CDATA[
        mkdir json tsv &&
        #set sps = []
        #for $x in $source_plates:
            #set $fname = str($x.element_identifier) + '.json'
            ln -sfn '$x' '$fname' &&
            #silent sps.append($fname)
        #end for
        #set s_sps = '" "'.join(sps)
        #set sws = []
        #for $x in $source_wells:
            #set $fname = str($x.element_identifier) + '.tsv'
            ln -sfn '$x' '$fname' &&
            #silent sws.append($fname)
        #end for
        #set s_sws = '" "'.join(sws)
        #set dps = []
        #for $x in $dest_plates:
            #set $fname = str($x.element_identifier) + '.json'
            ln -sfn '$x' '$fname' &&
            #silent dps.append($fname)
        #end for
        #set s_dps = '" "'.join(dps)
        #set dws = []
        #for $x in $dest_wells:
            #set $fname = str($x.element_identifier) + '.tsv'
            ln -sfn '$x' '$fname' &&
            #silent dws.append($fname)
        #end for
        #set s_dws = '" "'.join(dws)
        python -m icfree.instructor
            --source_plates '$s_sps'
            --source_wells '$s_sws'
            --dest_plates '$s_dps'
            --dest_wells '$s_dws'
            --output-folder '.' &&
            mv volume_warning.tsv '$output_warning' &&
            mv instructions.csv '$output_instruction'
    ]]></command>
    <inputs>
        <param name="source_plates" type="data_collection" collection_type="list" format="json" label="Source plates information (json)" />
        <param name="source_wells" type="data_collection" collection_type="list" format="tabular" label="Source wells information (tsv)" />
        <param name="dest_plates" type="data_collection" collection_type="list" format="json" label="Destination plates information (json)" />
        <param name="dest_wells" type="data_collection" collection_type="list" format="tabular" label="Destination wells information (tsv)" />
    </inputs>
    <outputs>
        <data name="output_warning" format="tsv" label="${tool.name} - Warning" />
        <data name="output_instruction" format="csv" label="${tool.name} - Instruction" />
    </outputs>
    <tests>
        <test>
            <!-- test 1: check if identical outputs are produced with default parameters  -->
            <param name="source_plates">
                <collection type="list">
                    <element name="plates_generator_source_plate_1" value="plates_generator_source_plate_1.test-1.json" />
                </collection>
            </param>
            <param name="source_wells">
                <collection type="list">
                    <element name="plates_generator_source_plate_1.test-1.tsv" value="plates_generator_source_plate_1.test-1.tsv" />
                </collection>
            </param>
            <param name="dest_plates">
                <collection type="list">
                    <element name="plates_generator_destination_plate_1.test-1.json" value="plates_generator_destination_plate_1.test-1.json" />
                </collection>
            </param>
            <param name="dest_wells">
                <collection type="list">
                    <element name="plates_generator_destination_plate_1.test-1.tsv" value="plates_generator_destination_plate_1.test-1.tsv" />
                </collection>
            </param>
            <output name="output_warning" ftype="tabular">
                <assert_contents>
                    <has_n_lines n="12"/>
                    <has_line_matching expression="^Parameter\tMin\tMax\tPlate$"/>
                </assert_contents>
            </output>
            <output name="output_instruction" file="instructor_instructions.csv" ftype="csv" compare="diff" />
        </test>
    </tests>
    <help><![CDATA[
Instructor
==========

The module generates a list of instructions to perform the experiment.

Input
-----
Required:
* **Source plates file**: description of the source plates (source well name, source well volume...) (JSON format)
* **Destination plates file**: description of the destination plates (destination well name, destination well volume...) (JSON format)

Advanced options:
-----------------
* **Robot name**: name of the robot to generate instructions for (default: "echo")

Output
------
* **instructions**: contains the instructions to perform the experiment
* **volumes_warning**: contains the volumes that may cause issues with the chosen robot
    ]]></help>
    <expand macro="creator"/>
    <expand macro="citation"/>
</tool>