diff plates_generator.xml @ 0:5735a13c1f5b draft

planemo upload for repository https://github.com/brsynth/icfree-ml commit e908694368c306390bc9253f81a9249ad988970d
author tduigou
date Tue, 28 Mar 2023 12:35:56 +0000
parents
children bd72cb677e4e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plates_generator.xml	Tue Mar 28 12:35:56 2023 +0000
@@ -0,0 +1,153 @@
+<tool id="icfree_plates_generator" name="iCFree plates generator" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@">
+    <description>Generates a list of Echo-compatible source and destination plates according a set of samples to test</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <command detect_errors="exit_code"><![CDATA[
+        #set factors = []
+        #for $x in $adv.rep
+            #silent factors.append(str($x.optimize_well_volumes))
+        #end for
+        #set sfactors = ' '.join(['"' + $x + '"' for $x in $factors])
+        python -m icfree.plates_generator
+            '$cfps_file'
+            '$volume_file'
+            --sample_volume '$adv.sample_volume'
+            --source_plate_dead_volume '$adv.source_plate_dead_volume'
+            --dest_plate_dead_volume '$adv.dest_plate_dead_volume'
+            --dest-starting_well '$adv.dest_starting_well'
+            --src-starting_well '$adv.src_starting_well'
+            --nplicate '$adv.nplicate'
+            --keep-nil-vol '$adv.keep_nil_vol'
+            --source_plate_well_capacity '$adv.source_plate_well_capacity'
+            --dest_plate_well_capacity '$adv.dest_plate_well_capacity'
+            #if len(factors) > 0
+                --optimize-well-volumes ${sfactors}
+            #end if
+            --plate-dimensions '$adv.plate_dimensions'
+            --output-folder '.'
+            --output-format 'tsv' &&
+            mv volumes_summary.tsv '$volumes_summary'
+    ]]></command>
+    <inputs>
+        <param name="cfps_file" type="data" format="tabular"  label="CFPS parameters and features" />
+        <param name="volume_file" type="data" format="tabular" label="Volumes" />
+
+        <section name="adv" title="Advanced Options" expanded="false">
+
+            <param name="sample_volume" type="integer" value="1000" label="Final sample volume in each well in nL" />
+            <param name="source_plate_dead_volume" type="integer" value="15000" label="Dead volume to add in the source plate in nL"/>
+            <param name="dest_plate_dead_volume" type="integer" value="15000" label="Dead volume to add in the destination plate in nL"/>
+
+            <param name="dest_starting_well" type="text" value="A1" label="Starter well of destination plate to begin filling the 384 well-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="src_starting_well" type="text" value="A1" label="Starter well of source plate to begin filling the 384 well-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="nplicate" type="integer" value="3" min="1" max="12" label="Numbers of copies of volume sets"/>
+            <param name="keep_nil_vol" type="boolean" truevalue="True" falsevalue="False" checked="true" display="checkboxes" label="Keep nil volumes in instructions or not"/>
+
+            <param name="source_plate_well_capacity" type="integer" value="60000" label="Maximum volume capacity of the source plate in nL" />
+            <param name="dest_plate_well_capacity" type="integer" value="60000" label="Maximum volume capacity of the dest plate in nL" />
+            <param name="plate_dimensions" type="text" value="16x24" label="Dimensions of plate separated by a 'x'">
+                <validator type="empty_field" message="Not empty"/>
+                <validator type="regex" message="An 'x' separator is expected">^(?:\d+x\d+)$</validator>
+            </param>
+            <repeat name="rep" title="Optimize well volumes" min="0">
+                <param name="optimize_well_volumes" type="text" value="" label="Save volumes in source plate for all factors">
+                    <validator type="empty_field" message="Not empty"/>
+                </param>
+            </repeat>
+
+        </section>
+    </inputs>
+    <outputs>
+        <data name="volumes_summary" format="tabular" label="${tool.name} - Volumes" />
+        <collection name="output_source_dest" type="list" label="${tool.name} - Source Destination Plate">
+            <discover_datasets pattern="(?P&lt;name&gt;source_plate_\d+\.json)$" format="json" />
+            <discover_datasets pattern="(?P&lt;name&gt;source_plate_\d+\.tsv)$" format="tabular" />
+            <discover_datasets pattern="(?P&lt;name&gt;destination_plate_\d+\.json)$" format="json" />
+            <discover_datasets pattern="(?P&lt;name&gt;destination_plate_\d+\.tsv)$" format="tabular" />
+        </collection>
+    </outputs>
+    <tests>
+        <!-- test 1: check if identical outputs are produced with default parameters  -->
+        <test>
+            <param name="cfps_file" value="converter_proCFPS_parameters.tsv" />
+            <param name="volume_file" value="converter_sampling_concentrations.tsv" />
+            <output name="volumes_summary" file="plates_generator_volumes_summary.test-1.tsv" ftype="tabular" compare="diff" />
+            <output_collection name="output_source_dest" type="list" count="4">
+                <element name="source_plate_1.json" ftype="json">
+                    <assert_contents>
+                        <has_n_lines n="26"/>
+                    </assert_contents>
+                </element>
+                <element name="source_plate_1.tsv" file="plates_generator_source_plate_1.test-1.tsv" ftype="tabular" compare="diff" />
+                <element name="destination_plate_1.json" ftype="json">
+                    <assert_contents>
+                        <has_n_lines n="26"/>
+                    </assert_contents>
+                </element>
+                <element name="destination_plate_1.tsv" file="plates_generator_destination_plate_1.test-1.tsv" ftype="tabular" compare="diff" />
+            </output_collection>
+        </test>
+        <!-- test 2: advance arguments -->
+        <test>
+            <param name="cfps_file" value="converter_proCFPS_parameters.tsv" />
+            <param name="volume_file" value="converter_sampling_concentrations.tsv" />
+            <param name="source_plate_dead_volume" value="1500" />
+            <param name="dest_plate_dead_volume" value="1000" />
+            <param name="dest_starting_well" value="C3" />
+            <param name="src_starting_well" value="A2" />
+            <param name="nplicate" value="2" />
+            <param name="keep_nil_vol" value="False" />
+            <param name="plate_dimensions" value="32x32" />
+            <repeat name="rep">
+                <param name="optimize_well_volumes" value="RBS" />
+            </repeat>
+            <repeat name="rep">
+                <param name="optimize_well_volumes" value="Promoter" />
+            </repeat>
+            <output_collection name="output_source_dest" type="list" count="4">
+                <element name="destination_plate_1.tsv" file="plates_generator_destination_plate_1.test-2.tsv" ftype="tabular" compare="diff" />
+            </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+Plates Generator
+================
+
+This module generates a list of source and destination plates according to the set of samples to test.
+
+Input
+-----
+* **CFPS Parameters File**: The first column is the parameter (or factor) names. The second column is the maxValue of the parameter that will be used in the sampling. The third column is the concnetration of the stock. The fourth column is the deadVolume of the parameter. This is used to calculate the volume of the parameter that will not be pipetted by the robot (because of viscosity). The fifth column is the specific ratios we want to have for this parameter. If nothing defined, then take ratios given in program options. If one single number is given, then take this number as a const value.
+* Volume File**: File containing volumes
+
+Advanced Options:
+-----------------
+* **Sample Volume**: Final sample volume in each well in nL (default: 10000)
+* **Source Plate Dead Volume**: dead volume to add in the source plate in nL (default: 15000)
+* **Destination Plate Dead Volume**: dead volume to add in the dest plate in nL (default: 15000)
+* **Destination Starting Well**: starter well of destination plate to begin filling the 384 well-plate. (default: A1)
+* **Source Starting Well**: starter well of source plate to begin filling the 384 well-plate. (default: A1)
+* **Number of replicate**: Numbers of copies of volume sets (default: 3)
+* **Keep nil volumes**: Keep nil volumes in instructions or not (default: yes)
+* **Source Plate Well Capacity**: Maximum volume capacity of the source plate in nL (default: 60000)
+* **Destiantion Plate Well Capacity**: Maximum volume capacity of the dest plate in nL (default: 60000)
+* **Optimize Well Volumes**: Save volumes in source plate for all factors. It may trigger more volume pipetting warnings. If list of factors is given (separated by blanks), save: only for these ones (default: []).
+* **Plate Dimensions**: Dimensions of plate separated by a 'x', e.g. nb_rows x nb_cols (default: 16x24).
+
+Output
+------
+* **Collection**: Collection of files describing source/destination plates/wells
+    ]]></help>
+    <expand macro="creator"/>
+    <expand macro="citation"/>
+</tool>