Mercurial > repos > tduigou > icfree_instructor
comparison instructor.xml @ 0:f60f2f6ec0cc draft
planemo upload for repository https://github.com/brsynth/icfree-ml commit d87d4a4d7c894f2d884a71a2acc35f93bc5bbe4b
| author | tduigou |
|---|---|
| date | Mon, 06 Mar 2023 12:52:35 +0000 |
| parents | |
| children | 444a90deafa9 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f60f2f6ec0cc |
|---|---|
| 1 <tool id="icfree_instructor" name="iCFree instructor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" license="@LICENCE@"> | |
| 2 <description>Generates a list of Echo-compatible instructions to prepare samples</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="stdio"/> | |
| 8 <command detect_errors="exit_code"><![CDATA[ | |
| 9 #if str($conditional_source_json.type) == "collection": | |
| 10 #for $input in $conditional_source_json.collection.keys(): | |
| 11 ln -sfn $conditional_source_json.collection[$input] '.' && | |
| 12 #end for | |
| 13 #set input_source_json = '" "'.join([str($file) for $file in $conditional_source_json.collection[$input]]) | |
| 14 #elif str($conditional_source_json.type) == "files": | |
| 15 #set input_source_json = '" "'.join([str($file) for $file in $conditional_source_json.files]) | |
| 16 #end if | |
| 17 | |
| 18 #if str($conditional_source_tsv.type) == "collection": | |
| 19 #for $input in $conditional_source_tsv.collection.keys(): | |
| 20 ln -sfn $conditional_source_tsv.collection[$input] '.' && | |
| 21 #end for | |
| 22 #set input_source_tsv = '" "'.join([str($file) for $file in $conditional_source_tsv.collection[$input]]) | |
| 23 #elif str($conditional_source_tsv.type) == "files": | |
| 24 #set input_source_tsv = [] | |
| 25 #for $f in $conditional_source_tsv.files | |
| 26 ln -sfn '$f' '$f.element_identifier' && | |
| 27 #silent input_source_tsv.append(str($f.element_identifier)) | |
| 28 #end for | |
| 29 #set inputs_source_tsv = '" "'.join(input_source_tsv) | |
| 30 #end if | |
| 31 | |
| 32 | |
| 33 #if str($conditional_destination_json.type) == "collection": | |
| 34 #for $input in $conditional_destination_json.collection.keys(): | |
| 35 ln -sfn $conditional_destination_json.collection[$input] '.' && | |
| 36 #end for | |
| 37 #set input_destination_json = '" "'.join([str($file) for $file in $conditional_destination_json.collection[$input]]) | |
| 38 #elif str($conditional_destination_json.type) == "files": | |
| 39 #set input_destination_json = '" "'.join([str($file) for $file in $conditional_destination_json.files]) | |
| 40 #end if | |
| 41 | |
| 42 #if str($conditional_destination_tsv.type) == "collection": | |
| 43 #for $input in $conditional_destination_tsv.collection.keys(): | |
| 44 ln -sfn $conditional_destination_tsv.collection[$input] '.' && | |
| 45 #end for | |
| 46 #set input_destination_tsv = '" "'.join([str($file) for $file in $conditional_destination_tsv.collection[$input]]) | |
| 47 #elif str($conditional_destination_tsv.type) == "files": | |
| 48 #set input_destination_tsv = [] | |
| 49 #for $f in $conditional_destination_tsv.files | |
| 50 ln -sfn '$f' '$f.element_identifier' && | |
| 51 #silent input_destination_tsv.append(str($f.element_identifier)) | |
| 52 #end for | |
| 53 #set inputs_destination_tsv = '" "'.join(input_destination_tsv) | |
| 54 #end if | |
| 55 | |
| 56 | |
| 57 python -m icfree.instructor | |
| 58 --source_plates "${input_source_json}" | |
| 59 --source_wells "${inputs_source_tsv}" | |
| 60 --dest_plates "${input_destination_json}" | |
| 61 --dest_wells "${inputs_destination_tsv}" | |
| 62 --robot '$adv.robot' | |
| 63 --output-folder out | |
| 64 ]]></command> | |
| 65 <inputs> | |
| 66 <conditional name="conditional_source_json"> | |
| 67 <param name="type" type="select" label="Source plate (json)"> | |
| 68 <option value="files" selected="True">File(s)</option> | |
| 69 <option value="collection">Collection</option> | |
| 70 </param> | |
| 71 <when value="files"> | |
| 72 <param name="files" type="data" format="json" multiple="true" label="Source plates information (json)" /> | |
| 73 </when> | |
| 74 <when value="collection"> | |
| 75 <param name="collection" type="data_collection" collection_type="list" format="json" label="Source plates information (json)" /> | |
| 76 </when> | |
| 77 </conditional> | |
| 78 <conditional name="conditional_source_tsv"> | |
| 79 <param name="type" type="select" label="Source plate (tsv)"> | |
| 80 <option value="files" selected="True">File(s)</option> | |
| 81 <option value="collection">Collection</option> | |
| 82 </param> | |
| 83 <when value="files"> | |
| 84 <param name="files" type="data" format="tabular" multiple="true" label="Source plates information (tsv)" /> | |
| 85 </when> | |
| 86 <when value="collection"> | |
| 87 <param name="collection" type="data_collection" collection_type="list" format="tabular" label="Source plates information (tsv)" /> | |
| 88 </when> | |
| 89 </conditional> | |
| 90 <conditional name="conditional_destination_json"> | |
| 91 <param name="type" type="select" label="Source plate (json)"> | |
| 92 <option value="files" selected="True">File(s)</option> | |
| 93 <option value="collection">Collection</option> | |
| 94 </param> | |
| 95 <when value="files"> | |
| 96 <param name="files" type="data" format="json" multiple="true" label="Destination plates information (json)" /> | |
| 97 </when> | |
| 98 <when value="collection"> | |
| 99 <param name="collection" type="data_collection" collection_type="list" format="json" label="Destination plates information (json)" /> | |
| 100 </when> | |
| 101 </conditional> | |
| 102 <conditional name="conditional_destination_tsv"> | |
| 103 <param name="type" type="select" label="Source plate (tsv)"> | |
| 104 <option value="files" selected="True">File(s)</option> | |
| 105 <option value="collection">Collection</option> | |
| 106 </param> | |
| 107 <when value="files"> | |
| 108 <param name="files" type="data" format="tabular" multiple="true" label="Destination plates information (tsv)" /> | |
| 109 </when> | |
| 110 <when value="collection"> | |
| 111 <param name="collection" type="data_collection" collection_type="list" format="tabular" label="Destination plates information (tsv)" /> | |
| 112 </when> | |
| 113 </conditional> | |
| 114 <section name="adv" title="Advanced Options" expanded="false"> | |
| 115 <param argument="robot" type="text" value="echo" label="Robot name" /> | |
| 116 </section> | |
| 117 </inputs> | |
| 118 <outputs> | |
| 119 <data name="tabulars" format="tabular"> | |
| 120 <discover_datasets pattern="__designation__" ext="tabular" directory="out" /> | |
| 121 </data> | |
| 122 </outputs> | |
| 123 <tests> | |
| 124 <test> | |
| 125 <!-- test 1: check if identical outputs are produced with default parameters --> | |
| 126 <conditional name="conditional_source_json"> | |
| 127 <param name="type" value="files"/> | |
| 128 <param name="files" value="plates_generator_source_plate_1.json" /> | |
| 129 </conditional> | |
| 130 <conditional name="conditional_source_tsv"> | |
| 131 <param name="type" value="files"/> | |
| 132 <param name="files" value="plates_generator_source_plate_1.tsv" /> | |
| 133 </conditional> | |
| 134 <conditional name="conditional_destination_json"> | |
| 135 <param name="type" value="files"/> | |
| 136 <param name="files" value="plates_generator_destination_plate_1.json" /> | |
| 137 </conditional> | |
| 138 <conditional name="conditional_destination_tsv"> | |
| 139 <param name="type" value="files"/> | |
| 140 <param name="files" value="plates_generator_destination_plate_1.tsv" /> | |
| 141 </conditional> | |
| 142 <output name="tabulars" ftype="tabular"> | |
| 143 <discovered_dataset designation="volumes_warnings.tsv" ftype="tabular"> | |
| 144 <assert_contents> | |
| 145 <has_n_lines n="12"/> | |
| 146 <has_line_matching expression="^Parameter\tMin\tMax\tPlate$"/> | |
| 147 </assert_contents> | |
| 148 </discovered_dataset> | |
| 149 <discovered_dataset designation="instructions.csv" ftype="tabular"> | |
| 150 <assert_contents> | |
| 151 <has_line_matching expression="^Source Plate Name,Source Plate Type,Source Well,Destination Plate Name,Destination Well,Transfer Volume,Sample ID$"/> | |
| 152 <has_n_lines n="1701"/> | |
| 153 </assert_contents> | |
| 154 | |
| 155 </discovered_dataset> | |
| 156 </output> | |
| 157 </test> | |
| 158 </tests> | |
| 159 <help><![CDATA[ | |
| 160 Instructor | |
| 161 ========== | |
| 162 | |
| 163 The module generates a list of instructions to perform the experiment. | |
| 164 | |
| 165 Input | |
| 166 ----- | |
| 167 Required: | |
| 168 * **Source plates file**: description of the source plates (source well name, source well volume...) (JSON format) | |
| 169 * **Destination plates file**: description of the destination plates (destination well name, destination well volume...) (JSON format) | |
| 170 | |
| 171 Advanced options: | |
| 172 ----------------- | |
| 173 * **Robot name**: name of the robot to generate instructions for (default: "echo") | |
| 174 | |
| 175 Output | |
| 176 ------ | |
| 177 * **instructions**: contains the instructions to perform the experiment | |
| 178 * **volumes_warning**: contains the volumes that may cause issues with the chosen robot | |
| 179 ]]></help> | |
| 180 <expand macro="creator"/> | |
| 181 <expand macro="citation"/> | |
| 182 </tool> |
