comparison stacks_procrad.xml @ 5:b4bab607eb05 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit 16654f3b3faaba994cea5fda8d4907ea4f059605"
author iuc
date Thu, 14 Apr 2022 09:31:20 +0000
parents bd5ff77e2036
children
comparison
equal deleted inserted replaced
4:9a171f9a450b 5:b4bab607eb05
1 <tool id="stacks2_procrad" name="Stacks2: process radtags" profile="@PROFILE@" version="@STACKS_VERSION@+galaxy@WRAPPER_VERSION@"> 1 <tool id="stacks2_procrad" name="Stacks2: process radtags" profile="@PROFILE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
2 <description>the Stacks demultiplexing script</description> 2 <description>the Stacks demultiplexing script</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 <import>macros_process.xml</import> 5 <import>macros_process.xml</import>
6 </macros> 6 </macros>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <expand macro="version_cmd"/> 8 <expand macro="version_cmd"/>
9 <command detect_errors="aggressive"><![CDATA[ 9 <command detect_errors="aggressive"><![CDATA[
10 @FASTQ_INPUT_FUNCTIONS@ 10 @FASTQ_INPUT_FUNCTIONS@
11 11
12 python '$__tool_directory__'/check_bcfile.py '$barcode' && 12 #if $input_type.barcode_encoding != ''
13 13 python '$__tool_directory__'/check_bcfile.py '$input_type.barcode' &&
14 #end if
14 mkdir stacks_inputs stacks_outputs && 15 mkdir stacks_inputs stacks_outputs &&
15 16
16 #if $output_log 17 #if $output_log
17 ln -s '$output_log' stacks_outputs/process_radtags.stacks_inputs.log && 18 ln -s '$output_log' stacks_outputs/process_radtags.stacks_inputs.log &&
18 #end if 19 #end if
47 48
48 @PROCESS_FASTQ_POSTPROC@ 49 @PROCESS_FASTQ_POSTPROC@
49 ]]></command> 50 ]]></command>
50 51
51 <inputs> 52 <inputs>
52 <expand macro="fastq_input_bc_file" multiple="true" listtype="list:paired"/> 53 <conditional name="input_type">
54 <param name="input_type_select" type="select" label="Single-end or paired-end reads">
55 <option value="single" selected="True">Single-end files</option>
56 <option value="paired">Paired-end files</option>
57 </param>
58 <when value="single">
59 <param name="fqinputs" argument="-f" type="data" format="fastqsanger,fastqsanger.gz" multiple="true" label="Singles-end reads"/>
60 <expand macro="barcode_selector">
61 <expand macro="barcode_encoding_single" type="Barcode"/>
62 </expand>
63 </when>
64 <when value="paired">
65 <param name="fqinputs" type="data_collection" collection_type="list:paired" label="Paired-end reads" format="fastqsanger,fastqsanger.gz"/>
66 <expand macro="barcode_selector">
67 <expand macro="barcode_encoding_pair" type="Barcode"/>
68 </expand>
69 </when>
70 </conditional>
53 <conditional name="options_enzyme"> 71 <conditional name="options_enzyme">
54 <param name="options_enzyme_selector" type="select" label="Number of enzymes"> 72 <param name="options_enzyme_selector" type="select" label="Number of enzymes">
55 <option value="1">One</option> 73 <option value="1">One</option>
56 <option value="2">Two</option> 74 <option value="2">Two</option>
57 </param> 75 </param>
83 <expand macro="in_log"/> 101 <expand macro="in_log"/>
84 </inputs> 102 </inputs>
85 103
86 <outputs> 104 <outputs>
87 <expand macro="out_log"/> 105 <expand macro="out_log"/>
88 <expand macro="process_outputs"/> 106 <expand macro="process_outputs">
107 <collection name="processed" type="list" label="${tool.name} on ${on_string} Processed reads">
108 <filter>input_type['input_type_select'] == "single"</filter>
109 <filter>input_type['barcode_encoding'] == ""</filter>
110 <expand macro="discover_faqgz_output_macro" pattern="(?P&lt;name&gt;.+)" dir="stacks_outputs"/>
111 </collection>
112 <collection name="processed_paired" type="list:paired" label="${tool.name} on ${on_string} Processed reads">
113 <filter>input_type['input_type_select'] == "paired"</filter>
114 <filter>input_type['barcode_encoding'] == ""</filter>
115 <expand macro="discover_faqgz_output_macro" pattern="(?P&lt;identifier_0&gt;.+)\.(?P&lt;identifier_1&gt;[^.]+)" dir="stacks_outputs"/>
116 </collection>
117 <collection name="demultiplexed" type="list" label="${tool.name} on ${on_string} Demultiplexed reads">
118 <filter>input_type['input_type_select'] == "single"</filter>
119 <filter>input_type['barcode_encoding'] != ""</filter>
120 <expand macro="discover_faqgz_output_macro" pattern="(?P&lt;name&gt;.+)" dir="stacks_outputs"/>
121 </collection>
122 <collection name="demultiplexed_paired" type="list:paired" label="${tool.name} on ${on_string} Demultiplexed reads">
123 <filter>input_type['input_type_select'] == "paired"</filter>
124 <filter>input_type['barcode_encoding'] != ""</filter>
125 <expand macro="discover_faqgz_output_macro" pattern="(?P&lt;identifier_0&gt;.+)\.(?P&lt;identifier_1&gt;[^.]+)" dir="stacks_outputs"/>
126 </collection>
127 </expand>
89 </outputs> 128 </outputs>
90 <tests> 129 <tests>
91 <!-- single single ended input, no filtering (hence no capturing) + log --> 130 <!-- 01 single single ended input, no filtering (hence no capturing) + log -->
92 <test expect_num_outputs="2"> 131 <test expect_num_outputs="2">
93 <param name="input_type|input_type_select" value="single"/> 132 <param name="input_type|input_type_select" value="single"/>
94 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1.fq"/> 133 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1_01.fq,procrad/R1_02.fq,procrad/R1_03.fq,procrad/R1_04.fq"/>
95 <param name="input_type|barcode_encoding" value="--inline_null"/> 134 <param name="input_type|barcode_encoding" value="--inline_null"/>
96 <param name="barcode" value="procrad/barcodes"/> 135 <param name="input_type|barcode" value="procrad/barcodes"/>
97 <param name="options_enzyme|options_enzyme_selector" value="1"/> 136 <param name="options_enzyme|options_enzyme_selector" value="1"/>
98 <param name="options_enzyme|enzyme" value="ecoRI"/> 137 <param name="options_enzyme|enzyme" value="ecoRI"/>
99 <param name="add_log" value="yes"/> 138 <param name="add_log" value="yes"/>
100 <output name="output_log" file="procrad/process_radtags.out" lines_diff="4"/> 139 <output name="output_log" file="procrad/process_radtags.out" lines_diff="4"/>
101 <output_collection name="demultiplexed" count="40"> 140 <output_collection name="demultiplexed" count="40">
102 <element name="PopA_01" file="demultiplexed/PopA_01.fq" ftype="fastqsanger"/> 141 <element name="PopA_01" file="demultiplexed/PopA_01.fq" ftype="fastqsanger" compare="contains"/>
103 </output_collection> 142 </output_collection>
104 </test> 143 </test>
105 <!-- multiple (zipped) single end input (misusing R2 as add single end read file), 144 <!-- 02 multiple (zipped) single end input (misusing R2 as add single end read file),
106 discarding by quality and capturing them --> 145 discarding by quality and capturing them -->
107 <test expect_num_outputs="3"> 146 <test expect_num_outputs="3">
108 <param name="input_type|input_type_select" value="single"/> 147 <param name="input_type|input_type_select" value="single"/>
109 <param name="input_type|fqinputs" ftype="fastqsanger.gz" value="procrad/R1.fq.gzip,procrad/R2.fq.gzip"/> 148 <param name="input_type|fqinputs" ftype="fastqsanger.gz" value="procrad/R1.fq.gzip,procrad/R2.fq.gzip"/>
110 <param name="input_type|barcode_encoding" value="--inline_null"/> 149 <param name="input_type|barcode_encoding" value="--inline_null"/>
111 <param name="barcode" value="procrad/barcodes"/> 150 <param name="input_type|barcode" value="procrad/barcodes"/>
112 <param name="options_enzyme|options_enzyme_selector" value="1"/> 151 <param name="options_enzyme|options_enzyme_selector" value="1"/>
113 <param name="options_enzyme|enzyme" value="ecoRI"/> 152 <param name="options_enzyme|enzyme" value="ecoRI"/>
114 <param name="filter_cond|filter_select" value="yes"/> 153 <param name="filter_cond|filter_select" value="yes"/>
115 <param name="filter_cond|discard" value="-q"/> 154 <param name="filter_cond|discard" value="-q"/>
116 <param name="filter_cond|sliding" value="0.1"/> 155 <param name="filter_cond|sliding" value="0.1"/>
129 </assert_command> 168 </assert_command>
130 <output_collection name="demultiplexed" count="40"> 169 <output_collection name="demultiplexed" count="40">
131 <element name="PopA_01" ftype="fastqsanger.gz" md5="c7250f50138cbca747b85223aaae9565"/> 170 <element name="PopA_01" ftype="fastqsanger.gz" md5="c7250f50138cbca747b85223aaae9565"/>
132 </output_collection> 171 </output_collection>
133 <output_collection name="discarded" count="2"> 172 <output_collection name="discarded" count="2">
134 <element name="R1" file="procrad/R1.fq.discards" ftype="fastqsanger"/> 173 <element name="R1">
135 <element name="R2" file="procrad/R2.fq.discards" ftype="fastqsanger"/> 174 <assert_contents>
136 </output_collection> 175 <has_size value="1101516" delta="200"/>
137 </test> 176 <has_text text="@lane1_fakedata0_11 1:N:0:"/>
138 <!-- paired input, no quality but length filter, gzfasta output --> 177 </assert_contents>
178 </element>
179 <element name="R2">
180 <assert_contents>
181 <has_size value="1613724" delta="200"/>
182 <has_text text="@lane1_fakedata0_0 1:N:0:"/>
183 </assert_contents>
184 </element>
185 </output_collection>
186 </test>
187 <!-- 03 paired input, no quality but length filter, gzfasta output -->
139 <test expect_num_outputs="4"> 188 <test expect_num_outputs="4">
140 <param name="input_type|input_type_select" value="paired"/> 189 <param name="input_type|input_type_select" value="paired"/>
141 <param name="input_type|fqinputs"> 190 <param name="input_type|fqinputs">
142 <collection type="list:paired"> 191 <collection type="list:paired">
143 <element name="reads"> 192 <element name="reads">
144 <collection type="paired"> 193 <collection type="paired">
145 <element name="forward" value="procrad/R1.fq" ftype="fastqsanger"/> 194 <element name="forward" value="procrad/R1.fq.gzip" ftype="fastqsanger"/>
146 <element name="reverse" value="procrad/R2.fq" ftype="fastqsanger"/> 195 <element name="reverse" value="procrad/R2.fq.gzip" ftype="fastqsanger"/>
147 </collection> 196 </collection>
148 </element> 197 </element>
149 </collection> 198 </collection>
150 </param> 199 </param>
151 <param name="barcode" value="procrad/barcodes"/> 200 <param name="input_type|barcode" value="procrad/barcodes"/>
152 <param name="options_enzyme|options_enzyme_selector" value="1"/> 201 <param name="options_enzyme|options_enzyme_selector" value="1"/>
153 <param name="options_enzyme|enzyme" value="ecoRI"/> 202 <param name="options_enzyme|enzyme" value="ecoRI"/>
154 <param name="filter_cond|filter_select" value="no"/> 203 <param name="filter_cond|filter_select" value="no"/>
155 <param name="filter_cond|len_limit" value="50"/> 204 <param name="filter_cond|len_limit" value="50"/>
156 <param name="capture" value="-D"/> 205 <param name="capture" value="-D"/>
172 <element name="reverse" file="demultiplexed/PopA_01.rem.2.fa.gz" ftype="fasta.gz"/> 221 <element name="reverse" file="demultiplexed/PopA_01.rem.2.fa.gz" ftype="fasta.gz"/>
173 </element> 222 </element>
174 </output_collection> 223 </output_collection>
175 <output_collection name="discarded_paired" type="list:paired" count="1"> 224 <output_collection name="discarded_paired" type="list:paired" count="1">
176 <element name="reads"> 225 <element name="reads">
177 <element name="forward" file="procrad/R1.fa.discards" ftype="fasta"/> 226 <element name="forward">
227 <assert_contents>
228 <has_size value="609382" delta="200"/>
229 <has_text text=">lane1_fakedata0_11 1:N:0:"/>
230 </assert_contents>
231 </element>
178 <element name="reverse" file="procrad/R2.fa.discards" ftype="fasta"/> 232 <element name="reverse" file="procrad/R2.fa.discards" ftype="fasta"/>
179 </element> 233 </element>
180 </output_collection> 234 </output_collection>
181 </test> 235 </test>
182 <!-- paired input (gzipped) + advanced options + two enzymes, fasta output --> 236 <!-- 04 paired input (gzipped) + advanced options + two enzymes, fasta output -->
183 <test expect_num_outputs="3"> 237 <test expect_num_outputs="3">
184 <param name="input_type|input_type_select" value="paired"/> 238 <param name="input_type|input_type_select" value="paired"/>
185 <param name="input_type|fqinputs"> 239 <param name="input_type|fqinputs">
186 <collection type="list:paired"> 240 <collection type="list:paired">
187 <element name="reads"> 241 <element name="reads">
190 <element name="reverse" value="procrad/R2.fq.gzip" ftype="fastqsanger.gz"/> 244 <element name="reverse" value="procrad/R2.fq.gzip" ftype="fastqsanger.gz"/>
191 </collection> 245 </collection>
192 </element> 246 </element>
193 </collection> 247 </collection>
194 </param> 248 </param>
195 <param name="barcode" value="procrad/barcodes"/> 249 <param name="input_type|barcode" value="procrad/barcodes"/>
196 <param name="options_enzyme|options_enzyme_selector" value="2"/> 250 <param name="options_enzyme|options_enzyme_selector" value="2"/>
197 <param name="options_enzyme|enzyme" value="ecoRI"/> 251 <param name="options_enzyme|enzyme" value="ecoRI"/>
198 <param name="options_enzyme|enzyme2" value="ecoRI"/> 252 <param name="options_enzyme|enzyme2" value="ecoRI"/>
199 <param name="options_advanced|truncate" value="70"/> 253 <param name="options_advanced|truncate" value="70"/>
200 <param name="options_advanced|rescue_cond|rescue" value="-r"/> 254 <param name="options_advanced|rescue_cond|rescue" value="-r"/>
232 <element name="forward" file="demultiplexed/PopA_01.rem.1.fa" ftype="fasta"/> 286 <element name="forward" file="demultiplexed/PopA_01.rem.1.fa" ftype="fasta"/>
233 <element name="reverse" file="demultiplexed/PopA_01.rem.2.fa" ftype="fasta"/> 287 <element name="reverse" file="demultiplexed/PopA_01.rem.2.fa" ftype="fasta"/>
234 </element> 288 </element>
235 </output_collection> 289 </output_collection>
236 </test> 290 </test>
237 <!-- test invalid barcode file --> 291 <!-- 05 test invalid barcode file -->
238 <test expect_failure="true"> 292 <test expect_failure="true">
239 <param name="input_type|input_type_select" value="single"/> 293 <param name="input_type|input_type_select" value="single"/>
240 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1.fq"/> 294 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1_01.fq,procrad/R1_02.fq,procrad/R1_03.fq,procrad/R1_04.fq"/>
241 <param name="input_type|barcode_encoding" value="--inline_null"/> 295 <param name="input_type|barcode_encoding" value="--inline_null"/>
242 <param name="barcode" value="procrad/barcodes-duplicate"/> 296 <param name="input_type|barcode" value="procrad/barcodes-duplicate"/>
243 <param name="options_enzyme|options_enzyme_selector" value="1"/> 297 <param name="options_enzyme|options_enzyme_selector" value="1"/>
244 <param name="options_enzyme|enzyme" value="ecoRI"/> 298 <param name="options_enzyme|enzyme" value="ecoRI"/>
245 <param name="add_log" value="yes"/> 299 <param name="add_log" value="yes"/>
246 </test> 300 </test>
247 <!-- test invalid barcode file --> 301 <!-- 06 test invalid barcode file -->
248 <test expect_failure="true"> 302 <test expect_failure="true">
249 <param name="input_type|input_type_select" value="single"/> 303 <param name="input_type|input_type_select" value="single"/>
250 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1.fq"/> 304 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1_01.fq,procrad/R1_02.fq,procrad/R1_03.fq,procrad/R1_04.fq"/>
251 <param name="input_type|barcode_encoding" value="--inline_null"/> 305 <param name="input_type|barcode_encoding" value="--inline_null"/>
252 <param name="barcode" value="procrad/barcodes-duplicate2"/> 306 <param name="input_type|barcode" value="procrad/barcodes-duplicate2"/>
253 <param name="options_enzyme|options_enzyme_selector" value="1"/> 307 <param name="options_enzyme|options_enzyme_selector" value="1"/>
254 <param name="options_enzyme|enzyme" value="ecoRI"/> 308 <param name="options_enzyme|enzyme" value="ecoRI"/>
255 <param name="add_log" value="yes"/> 309 <param name="add_log" value="yes"/>
256 </test> 310 </test>
257 <!-- test invalid barcode file --> 311 <!-- 07 test no provided barcode file single-->
258 <test expect_failure="true"> 312 <test expect_num_outputs="3">
259 <param name="input_type|input_type_select" value="single"/> 313 <param name="input_type|input_type_select" value="single"/>
260 <param name="input_type|fqinputs" ftype="fastqsanger" value="procrad/R1.fq"/> 314 <param name="input_type|fqinputs" ftype="fastqsanger.gz" value="procrad/R1.fq.gzip"/>
261 <param name="input_type|barcode_encoding" value="--inline_null"/> 315 <param name="input_type|barcode_encoding" value=""/>
262 <param name="barcode" value="procrad/barcodes-duplicate3"/> 316 <param name="options_enzyme|options_enzyme_selector" value="1"/>
263 <param name="options_enzyme|options_enzyme_selector" value="1"/> 317 <param name="options_enzyme|enzyme" value="ecoRI"/>
264 <param name="options_enzyme|enzyme" value="ecoRI"/> 318 <param name="add_log" value="yes"/>
265 <param name="add_log" value="yes"/> 319 <param name="capture" value="-D"/>
320 <output name="output_log">
321 <assert_contents>
322 <has_text text="Barcode Not Found"/>
323 <has_text text="Retained Reads"/>
324 <has_n_lines n="10"/>
325 </assert_contents>
326 </output>
327 <output_collection name="processed" count="1">
328 <element name="R1">
329 <assert_contents>
330 <has_size value="20"/>
331 </assert_contents>
332 </element>
333 </output_collection>
334 <output_collection name="discarded" count="1">
335 <element name="R1">
336 <assert_contents>
337 <has_size value="1613724" delta="200"/>
338 </assert_contents>
339 </element>
340 </output_collection>
341 </test>
342 <!-- 08 test no provided barcode file paired -->
343 <test expect_num_outputs="3">
344 <param name="input_type|input_type_select" value="paired"/>
345 <param name="input_type|fqinputs">
346 <collection type="list:paired">
347 <element name="reads">
348 <collection type="paired">
349 <element name="forward" value="procrad/R1.fq.gzip" ftype="fastqsanger.gz"/>
350 <element name="reverse" value="procrad/R2.fq.gzip" ftype="fastqsanger.gz"/>
351 </collection>
352 </element>
353 </collection>
354 </param>
355 <param name="input_type|barcode_encoding" value=""/>
356 <param name="options_enzyme|options_enzyme_selector" value="1"/>
357 <param name="options_enzyme|enzyme" value="ecoRI"/>
358 <param name="outype" value="gzfasta"/>
359 <param name="add_log" value="yes"/>
360 <output name="output_log" file="procrad/process_radtags_paired_no_barcode.out" lines_diff="4"/>
361 <output_collection name="processed_paired" type="list:paired" count="2">
362 <element name="reads_R1_0">
363 <element name="forward">
364 <assert_contents>
365 <has_size value="20"/>
366 </assert_contents>
367 </element>
368 </element>
369 <element name="reads_R2_0">
370 <element name="reverse">
371 <assert_contents>
372 <has_size value="20"/>
373 </assert_contents>
374 </element>
375 </element>
376 </output_collection>
377 <output_collection name="remaining" type="list:paired" count="2">
378 <element name="reads_R1_0">
379 <element name="forward">
380 <assert_contents>
381 <has_size value="20"/>
382 </assert_contents>
383 </element>
384 </element>
385 <element name="reads_R2_0">
386 <element name="reverse">
387 <assert_contents>
388 <has_size value="17607" delta="100"/>
389 </assert_contents>
390 </element>
391 </element>
392 </output_collection>
266 </test> 393 </test>
267 </tests> 394 </tests>
268 <help> 395 <help>
269 <![CDATA[ 396 <![CDATA[
270 .. class:: infomark 397 .. class:: infomark