view plates_designer.xml @ 6:e76c8e7feffb draft default tip

planemo upload for repository https://github.com/brsynth/icfree-ml commit 9ac6ff08b3b98534f42ecfcecefa438ead21168c
author tduigou
date Tue, 17 Dec 2024 13:41:05 +0000
parents 5d3a54198bf9
children
line wrap: on
line source

<tool id="icfree_plates_designer" name="iCFree plates designer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="MIT">
    <description>Prepare source and destination well-plate mappings with advanced options.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        #set well_capacity = []
        #set dead_volumes = []
        #for $x in $adv.rep
            #silent well_capacity.append(str($x.component_name) + "=" + str($x.well_capacity))
            #silent dead_volumes.append(str($x.component_name) + "=" + str($x.dead_volumes))
        #end for
        #set swell_capacity = ','.join($well_capacity)
        #set sdead_volumes = ','.join($dead_volumes)

        python -m icfree.plate_designer
            '$sampling_file'
            '$sample_volume'
            --start_well_src_plt '$adv.start_well_src_plt'
            --start_well_dst_plt '$adv.start_well_dst_plt'
            --plate_dims '$adv.plate_dims'
            #if len($well_capacity) > 0
                --well_capacity '$swell_capacity'
            #end if
            --default_well_capacity '$adv.default_well_capacity'
            #if len($dead_volumes) > 0
                --dead_volumes '$sdead_volumes'
            #end if
            --default_dead_volume '$adv.default_dead_volume'
            --num_replicates '$adv.num_replicates' &&
        mv source_plate.csv '$output_source_plate' &&
        mv destination_plate.csv '$output_destination_plate'
           ]]></command>
    <inputs>
        <param name="sampling_file" type="data" format="csv" label="Sampling file" />
        <param name="sample_volume" type="integer" value="10000" min="1" max="1000000" label="Wanted sample volume in the destination plate" />
        <section name="adv" title="Advanced Options" expanded="false">
            <param name="start_well_src_plt" type="text" value="A1" label="Starting well for the source plate">
                <validator type="empty_field" message="Not empty"/>
                <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator>
            </param>
            <param name="start_well_dst_plt" type="text" value="A1" label="Starting well for the destination plate">
                <validator type="empty_field" message="Not empty"/>
                <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator>
            </param>
            <param name="plate_dims" type="text" value="16x24" label="Plate dimensions (Format: NxM)">
                <validator type="empty_field" message="Not empty"/>
                <validator type="regex" message="An 'x' separator is expected">^(?:\d+x\d+)$</validator>
            </param>
            <param name="default_well_capacity" type="integer" value="60000" min="1" max="250000" label="Default well capacity in nL for components not specified in well_capacity" />
            <param name="default_dead_volume" type="integer" value="15000" min="1" max="250000" label="Default dead volume in nL for the source plate"/>
            <param name="num_replicates" type="integer" value="1" min="1" max="10" label="Number of wanted replicates"/>
            <repeat name="rep" title="Specific components">
                <param name="component_name" type="text" value="" label="Component Name">
                    <validator type="empty_field" message="Not empty"/>
                </param>
                <param name="well_capacity" type="integer" value="60000" min="1" max="250000" label="Well capacity" />
                <param name="dead_volumes" type="integer" value="15000" min="1" max="250000" label="Dead volumes" />
            </repeat>
        </section>
    </inputs>
    <outputs>
        <data name="output_source_plate" format="csv" label="${tool.name} - Source" />
        <data name="output_destination_plate" format="csv" label="${tool.name} - Destination" />
    </outputs>
    <tests>
        <test>
            <!-- python -m icfree.plate_designer sampling.test-1.csv 6000 -default_well_capacity 60000 -default_dead_volume 20000 -num_replicates 1 -->
            <param name="sampling_file" value="sampling.test-1.csv" />
            <param name="sample_volume" value="6000" />
            <param name="default_well_capacity" value="60000" />
            <param name="default_dead_volume" value="20000" />
            <param name="num_replicates" value="1" />
            <output name="output_source_plate" file="plates_designer.source_plate.test-1.csv" ftype="csv" compare="diff" />
            <output name="output_destination_plate" file="plates_designer.destination_plate.test-1.csv" ftype="csv" compare="diff" />
        </test>
        <test>
            <!-- python -m icfree.plate_designer sampling.test-1.csv '5000' -start_well_src_plt 'A1' -start_well_dst_plt 'A1' -plate_dims '16x24' -well_capacity 'Hela lysate=3000,Access prot 50X=4000,Reaction mix=3000,RNA 1ug/uL=2000' -default_well_capacity '60000' -dead_volumes 'Hela lysate=30,Access prot 50X=5,Reaction mix=10,RNA 1ug/uL=20' -default_dead_volume '20000' -num_replicates '2' -->
            <param name="sampling_file" value="sampling.test-1.csv" />
            <param name="sample_volume" value="5000" />
            <param name="default_well_capacity" value="60000" />
            <param name="default_dead_volume" value="20000" />
            <param name="num_replicates" value="2" />
            <repeat name="rep">
                <param name="component_name" value="Hela lysate" />
                <param name="well_capacity" value="3000" />
                <param name="dead_volumes" value="30" />
            </repeat>
            <repeat name="rep">
                <param name="component_name" value="Access prot 50%" />
                <param name="well_capacity" value="4000" />
                <param name="dead_volumes" value="5" />
            </repeat>
            <repeat name="rep">
                <param name="component_name" value="Reaction mix" />
                <param name="well_capacity" value="3000" />
                <param name="dead_volumes" value="10" />
            </repeat>
            <repeat name="rep">
                <param name="component_name" value="RNA 1ug/uL" />
                <param name="well_capacity" value="2000" />
                <param name="dead_volumes" value="20" />
            </repeat>
            <output name="output_source_plate" file="plates_designer.source_plate.test-2.csv" ftype="csv" compare="diff" />
            <output name="output_destination_plate" file="plates_designer.destination_plate.test-2.csv" ftype="csv" compare="diff" />
        </test>
    </tests>
    <help><![CDATA[
Plates Generator
================

Prepare source and destination well-plate mappings with advanced options.
    ]]></help>
    <expand macro="creator"/>
    <expand macro="citation"/>
</tool>