Mercurial > repos > tduigou > icfree_plates_generator
comparison plates_generator.xml @ 3:bd72cb677e4e draft
planemo upload for repository https://github.com/brsynth/icfree-ml commit b655805cb031443000d1da309287481d7a1dd823-dirty
author | tduigou |
---|---|
date | Wed, 24 Jul 2024 08:18:58 +0000 |
parents | 5735a13c1f5b |
children | 37ba98019165 |
comparison
equal
deleted
inserted
replaced
2:53a57679cb4a | 3:bd72cb677e4e |
---|---|
1 <tool id="icfree_plates_generator" name="iCFree plates generator" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@"> | 1 <tool id="icfree_plates_generator" name="iCFree plates designer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@"> |
2 <description>Generates a list of Echo-compatible source and destination plates according a set of samples to test</description> | 2 <description>Prepare source and destination well-plate mappings with advanced options.</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
9 #set factors = [] | 9 #set well_capacity = [] |
10 #set dead_volumes = [] | |
10 #for $x in $adv.rep | 11 #for $x in $adv.rep |
11 #silent factors.append(str($x.optimize_well_volumes)) | 12 #silent well_capacity.append(str($x.component_name) + "=" + str($x.well_capacity)) |
13 #silent dead_volumes.append(str($x.component_name) + "=" + str($x.dead_volumes)) | |
12 #end for | 14 #end for |
13 #set sfactors = ' '.join(['"' + $x + '"' for $x in $factors]) | 15 #set swell_capacity = ','.join($well_capacity) |
14 python -m icfree.plates_generator | 16 #set sdead_volumes = ','.join($dead_volumes) |
15 '$cfps_file' | 17 |
16 '$volume_file' | 18 python -m icfree.plate_designer |
17 --sample_volume '$adv.sample_volume' | 19 '$sampling_file' |
18 --source_plate_dead_volume '$adv.source_plate_dead_volume' | 20 '$sample_volume' |
19 --dest_plate_dead_volume '$adv.dest_plate_dead_volume' | 21 --start_well_src_plt '$adv.start_well_src_plt' |
20 --dest-starting_well '$adv.dest_starting_well' | 22 --start_well_dst_plt '$adv.start_well_dst_plt' |
21 --src-starting_well '$adv.src_starting_well' | 23 --plate_dims '$adv.plate_dims' |
22 --nplicate '$adv.nplicate' | 24 #if len($well_capacity) > 0 |
23 --keep-nil-vol '$adv.keep_nil_vol' | 25 --well_capacity '$swell_capacity' |
24 --source_plate_well_capacity '$adv.source_plate_well_capacity' | |
25 --dest_plate_well_capacity '$adv.dest_plate_well_capacity' | |
26 #if len(factors) > 0 | |
27 --optimize-well-volumes ${sfactors} | |
28 #end if | 26 #end if |
29 --plate-dimensions '$adv.plate_dimensions' | 27 --default_well_capacity '$adv.default_well_capacity' |
30 --output-folder '.' | 28 #if len($dead_volumes) > 0 |
31 --output-format 'tsv' && | 29 --dead_volumes '$sdead_volumes' |
32 mv volumes_summary.tsv '$volumes_summary' | 30 #end if |
33 ]]></command> | 31 --default_dead_volume '$adv.default_dead_volume' |
32 --num_replicates '$adv.num_replicates' && | |
33 mv source_plate.csv '$output_source_plate' && | |
34 mv destination_plate.csv '$output_destination_plate' | |
35 ]]></command> | |
34 <inputs> | 36 <inputs> |
35 <param name="cfps_file" type="data" format="tabular" label="CFPS parameters and features" /> | 37 <param name="sampling_file" type="data" format="csv" label="Sampling file" /> |
36 <param name="volume_file" type="data" format="tabular" label="Volumes" /> | 38 <param name="sample_volume" type="integer" optional="false" label="Wanted sample volume in the destination plate" /> |
37 | |
38 <section name="adv" title="Advanced Options" expanded="false"> | 39 <section name="adv" title="Advanced Options" expanded="false"> |
39 | 40 <param name="start_well_src_plt" type="text" value="A1" label="Starting well for the source plate"> |
40 <param name="sample_volume" type="integer" value="1000" label="Final sample volume in each well in nL" /> | |
41 <param name="source_plate_dead_volume" type="integer" value="15000" label="Dead volume to add in the source plate in nL"/> | |
42 <param name="dest_plate_dead_volume" type="integer" value="15000" label="Dead volume to add in the destination plate in nL"/> | |
43 | |
44 <param name="dest_starting_well" type="text" value="A1" label="Starter well of destination plate to begin filling the 384 well-plate"> | |
45 <validator type="empty_field" message="Not empty"/> | 41 <validator type="empty_field" message="Not empty"/> |
46 <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator> | 42 <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator> |
47 </param> | 43 </param> |
48 <param name="src_starting_well" type="text" value="A1" label="Starter well of source plate to begin filling the 384 well-plate"> | 44 <param name="start_well_dst_plt" type="text" value="A1" label="Starting well for the destination plate"> |
49 <validator type="empty_field" message="Not empty"/> | 45 <validator type="empty_field" message="Not empty"/> |
50 <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator> | 46 <validator type="regex" message="Some letters followed by a number">^(?:[A-K]{1}([1-9]|1[0-2]))$</validator> |
51 </param> | 47 </param> |
52 | 48 <param name="plate_dims" type="text" value="16x24" label="Plate dimensions (Format: NxM)"> |
53 <param name="nplicate" type="integer" value="3" min="1" max="12" label="Numbers of copies of volume sets"/> | |
54 <param name="keep_nil_vol" type="boolean" truevalue="True" falsevalue="False" checked="true" display="checkboxes" label="Keep nil volumes in instructions or not"/> | |
55 | |
56 <param name="source_plate_well_capacity" type="integer" value="60000" label="Maximum volume capacity of the source plate in nL" /> | |
57 <param name="dest_plate_well_capacity" type="integer" value="60000" label="Maximum volume capacity of the dest plate in nL" /> | |
58 <param name="plate_dimensions" type="text" value="16x24" label="Dimensions of plate separated by a 'x'"> | |
59 <validator type="empty_field" message="Not empty"/> | 49 <validator type="empty_field" message="Not empty"/> |
60 <validator type="regex" message="An 'x' separator is expected">^(?:\d+x\d+)$</validator> | 50 <validator type="regex" message="An 'x' separator is expected">^(?:\d+x\d+)$</validator> |
61 </param> | 51 </param> |
62 <repeat name="rep" title="Optimize well volumes" min="0"> | 52 <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" /> |
63 <param name="optimize_well_volumes" type="text" value="" label="Save volumes in source plate for all factors"> | 53 <param name="default_dead_volume" type="integer" value="15000" min="1" max="250000" label="Default dead volume in nL for the source plate"/> |
54 <param name="num_replicates" type="integer" value="1" min="1" max="10" label="Number of wanted replicates"/> | |
55 <repeat name="rep" title="Specific components"> | |
56 <param name="component_name" type="text" value="" label="Component Name"> | |
64 <validator type="empty_field" message="Not empty"/> | 57 <validator type="empty_field" message="Not empty"/> |
65 </param> | 58 </param> |
59 <param name="well_capacity" type="integer" value="60000" min="1" max="250000" label="Well capacity" /> | |
60 <param name="dead_volumes" type="integer" value="15000" min="1" max="250000" label="Dead volumes" /> | |
66 </repeat> | 61 </repeat> |
67 | |
68 </section> | 62 </section> |
69 </inputs> | 63 </inputs> |
70 <outputs> | 64 <outputs> |
71 <data name="volumes_summary" format="tabular" label="${tool.name} - Volumes" /> | 65 <data name="output_source_plate" format="csv" label="${tool.name} - Source" /> |
72 <collection name="output_source_dest" type="list" label="${tool.name} - Source Destination Plate"> | 66 <data name="output_destination_plate" format="csv" label="${tool.name} - Destination" /> |
73 <discover_datasets pattern="(?P<name>source_plate_\d+\.json)$" format="json" /> | |
74 <discover_datasets pattern="(?P<name>source_plate_\d+\.tsv)$" format="tabular" /> | |
75 <discover_datasets pattern="(?P<name>destination_plate_\d+\.json)$" format="json" /> | |
76 <discover_datasets pattern="(?P<name>destination_plate_\d+\.tsv)$" format="tabular" /> | |
77 </collection> | |
78 </outputs> | 67 </outputs> |
79 <tests> | 68 <tests> |
80 <!-- test 1: check if identical outputs are produced with default parameters --> | |
81 <test> | 69 <test> |
82 <param name="cfps_file" value="converter_proCFPS_parameters.tsv" /> | 70 <!-- python -m icfree.plate_designer sampling.test-1.csv 6000 -default_well_capacity 60000 -default_dead_volume 20000 -num_replicates 1 --> |
83 <param name="volume_file" value="converter_sampling_concentrations.tsv" /> | 71 <param name="sampling_file" value="sampling.test-1.csv" /> |
84 <output name="volumes_summary" file="plates_generator_volumes_summary.test-1.tsv" ftype="tabular" compare="diff" /> | 72 <param name="sample_volume" value="6000" /> |
85 <output_collection name="output_source_dest" type="list" count="4"> | 73 <param name="default_well_capacity" value="60000" /> |
86 <element name="source_plate_1.json" ftype="json"> | 74 <param name="default_dead_volume" value="20000" /> |
87 <assert_contents> | 75 <param name="num_replicates" value="1" /> |
88 <has_n_lines n="26"/> | 76 <output name="output_source_plate" file="plates_designer.source_plate.test-1.csv" ftype="csv" compare="diff" /> |
89 </assert_contents> | 77 <output name="output_destination_plate" file="plates_designer.destination_plate.test-1.csv" ftype="csv" compare="diff" /> |
90 </element> | |
91 <element name="source_plate_1.tsv" file="plates_generator_source_plate_1.test-1.tsv" ftype="tabular" compare="diff" /> | |
92 <element name="destination_plate_1.json" ftype="json"> | |
93 <assert_contents> | |
94 <has_n_lines n="26"/> | |
95 </assert_contents> | |
96 </element> | |
97 <element name="destination_plate_1.tsv" file="plates_generator_destination_plate_1.test-1.tsv" ftype="tabular" compare="diff" /> | |
98 </output_collection> | |
99 </test> | 78 </test> |
100 <!-- test 2: advance arguments --> | |
101 <test> | 79 <test> |
102 <param name="cfps_file" value="converter_proCFPS_parameters.tsv" /> | 80 <!-- 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' --> |
103 <param name="volume_file" value="converter_sampling_concentrations.tsv" /> | 81 <param name="sampling_file" value="sampling.test-1.csv" /> |
104 <param name="source_plate_dead_volume" value="1500" /> | 82 <param name="sample_volume" value="5000" /> |
105 <param name="dest_plate_dead_volume" value="1000" /> | 83 <param name="default_well_capacity" value="60000" /> |
106 <param name="dest_starting_well" value="C3" /> | 84 <param name="default_dead_volume" value="20000" /> |
107 <param name="src_starting_well" value="A2" /> | 85 <param name="num_replicates" value="2" /> |
108 <param name="nplicate" value="2" /> | |
109 <param name="keep_nil_vol" value="False" /> | |
110 <param name="plate_dimensions" value="32x32" /> | |
111 <repeat name="rep"> | 86 <repeat name="rep"> |
112 <param name="optimize_well_volumes" value="RBS" /> | 87 <param name="component_name" value="Hela lysate" /> |
88 <param name="well_capacity" value="3000" /> | |
89 <param name="dead_volumes" value="30" /> | |
113 </repeat> | 90 </repeat> |
114 <repeat name="rep"> | 91 <repeat name="rep"> |
115 <param name="optimize_well_volumes" value="Promoter" /> | 92 <param name="component_name" value="Access prot 50%" /> |
93 <param name="well_capacity" value="4000" /> | |
94 <param name="dead_volumes" value="5" /> | |
116 </repeat> | 95 </repeat> |
117 <output_collection name="output_source_dest" type="list" count="4"> | 96 <repeat name="rep"> |
118 <element name="destination_plate_1.tsv" file="plates_generator_destination_plate_1.test-2.tsv" ftype="tabular" compare="diff" /> | 97 <param name="component_name" value="Reaction mix" /> |
119 </output_collection> | 98 <param name="well_capacity" value="3000" /> |
99 <param name="dead_volumes" value="10" /> | |
100 </repeat> | |
101 <repeat name="rep"> | |
102 <param name="component_name" value="RNA 1ug/uL" /> | |
103 <param name="well_capacity" value="2000" /> | |
104 <param name="dead_volumes" value="20" /> | |
105 </repeat> | |
106 <output name="output_source_plate" file="plates_designer.source_plate.test-2.csv" ftype="csv" compare="diff" /> | |
107 <output name="output_destination_plate" file="plates_designer.destination_plate.test-2.csv" ftype="csv" compare="diff" /> | |
120 </test> | 108 </test> |
121 </tests> | 109 </tests> |
122 <help><![CDATA[ | 110 <help><![CDATA[ |
123 Plates Generator | 111 Plates Generator |
124 ================ | 112 ================ |
125 | 113 |
126 This module generates a list of source and destination plates according to the set of samples to test. | 114 Prepare source and destination well-plate mappings with advanced options. |
127 | |
128 Input | |
129 ----- | |
130 * **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. | |
131 * Volume File**: File containing volumes | |
132 | |
133 Advanced Options: | |
134 ----------------- | |
135 * **Sample Volume**: Final sample volume in each well in nL (default: 10000) | |
136 * **Source Plate Dead Volume**: dead volume to add in the source plate in nL (default: 15000) | |
137 * **Destination Plate Dead Volume**: dead volume to add in the dest plate in nL (default: 15000) | |
138 * **Destination Starting Well**: starter well of destination plate to begin filling the 384 well-plate. (default: A1) | |
139 * **Source Starting Well**: starter well of source plate to begin filling the 384 well-plate. (default: A1) | |
140 * **Number of replicate**: Numbers of copies of volume sets (default: 3) | |
141 * **Keep nil volumes**: Keep nil volumes in instructions or not (default: yes) | |
142 * **Source Plate Well Capacity**: Maximum volume capacity of the source plate in nL (default: 60000) | |
143 * **Destiantion Plate Well Capacity**: Maximum volume capacity of the dest plate in nL (default: 60000) | |
144 * **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: []). | |
145 * **Plate Dimensions**: Dimensions of plate separated by a 'x', e.g. nb_rows x nb_cols (default: 16x24). | |
146 | |
147 Output | |
148 ------ | |
149 * **Collection**: Collection of files describing source/destination plates/wells | |
150 ]]></help> | 115 ]]></help> |
151 <expand macro="creator"/> | 116 <expand macro="creator"/> |
152 <expand macro="citation"/> | 117 <expand macro="citation"/> |
153 </tool> | 118 </tool> |