comparison fastp.xml @ 11:c59d48774d03 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fastp commit 61d055a8abacf009e8afe2d72377e6769ad08f42
author iuc
date Tue, 05 Mar 2024 08:41:43 +0000
parents dbf9c561ef29
children
comparison
equal deleted inserted replaced
10:65b93b623c77 11:c59d48774d03
1 <tool id="fastp" name="fastp" version="@WRAPPER_VERSION@+galaxy0"> 1 <tool id="fastp" name="fastp" version="@TOOL_VERSION@+galaxy0" profile="23.1">
2 <description>- fast all-in-one preprocessing for FASTQ files</description> 2 <description>fast all-in-one preprocessing for FASTQ files</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="biotools" />
6 <requirements> 7 <requirements>
7 <requirement type="package" version="@WRAPPER_VERSION@">fastp</requirement> 8 <requirement type="package" version="@TOOL_VERSION@">fastp</requirement>
8 </requirements> 9 </requirements>
9 <version_command>fastp -v</version_command> 10 <version_command>fastp -v</version_command>
10 <command detect_errors="exit_code"><![CDATA[ 11 <command detect_errors="exit_code"><![CDATA[
11 #import re 12 #import re
12 13
22 #set $in2 = $single_paired.paired_input.reverse 23 #set $in2 = $single_paired.paired_input.reverse
23 #set $in1_name = re.sub('[^\w\-\s]', '_', str($single_paired.paired_input.name)) + $ext 24 #set $in1_name = re.sub('[^\w\-\s]', '_', str($single_paired.paired_input.name)) + $ext
24 #set $in2_name = re.sub('[^\w\-\s]', '_', str("%s_%s" % ($single_paired.paired_input.name, "R2"))) + $ext 25 #set $in2_name = re.sub('[^\w\-\s]', '_', str("%s_%s" % ($single_paired.paired_input.name, "R2"))) + $ext
25 #set out1 = $output_paired_coll.forward 26 #set out1 = $output_paired_coll.forward
26 #set out2 = $output_paired_coll.reverse 27 #set out2 = $output_paired_coll.reverse
27 ln -s '$in1' '$in1_name' && 28 ln -sf '$in1' '$in1_name' &&
28 ln -s '$in2' '$in2_name' && 29 ln -sf '$in2' '$in2_name' &&
29 #else 30 #else
30 #if $in1.is_of_type('fastq.gz') 31 #if $in1.is_of_type('fastq.gz')
31 #set ext = '.fastq.gz' 32 #set ext = '.fastq.gz'
32 #end if 33 #end if
33 34
34 #set $in1_name = re.sub('[^\w\-\s]', '_', str($in1.element_identifier)) + $ext 35 #set $in1_name = re.sub('[^\w\-\s]', '_', str($in1.element_identifier)) + $ext
35 ln -s '$in1' '$in1_name' && 36 ln -sf '$in1' '$in1_name' &&
36 37
37 #if str($single_paired.single_paired_selector) == 'paired': 38 #if str($single_paired.single_paired_selector) == 'paired':
38 #set $in2_name = re.sub('[^\w\-\s]', '_', str("%s_R2" % $in2.element_identifier)) + $ext 39 #set $in2_name = re.sub('[^\w\-\s]', '_', str("%s_R2" % $in2.element_identifier)) + $ext
39 ln -s '$in2' '$in2_name' && 40 ln -sf '$in2' '$in2_name' &&
40 #end if 41 #end if
41 #end if 42 #end if
42 43
43 44
44 ## Run fastp 45 ## Run fastp
207 && 208 &&
208 mv second${ext} '${out2}' 209 mv second${ext} '${out2}'
209 #end if 210 #end if
210 ]]></command> 211 ]]></command>
211 <inputs> 212 <inputs>
212
213 <conditional name="single_paired"> 213 <conditional name="single_paired">
214 <param name="single_paired_selector" type="select" label="Single-end or paired reads"> 214 <param name="single_paired_selector" type="select" label="Single-end or paired reads">
215 <option value="single" selected="true">Single-end</option> 215 <option value="single" selected="true">Single-end</option>
216 <option value="paired">Paired</option> 216 <option value="paired">Paired</option>
217 <option value="paired_collection">Paired Collection</option> 217 <option value="paired_collection">Paired Collection</option>
227 <expand macro="adapter_trimming_options"> 227 <expand macro="adapter_trimming_options">
228 <expand macro="adapter_sequence" read_number="2"/> 228 <expand macro="adapter_sequence" read_number="2"/>
229 </expand> 229 </expand>
230 <expand macro="global_trimming_options_paired" /> 230 <expand macro="global_trimming_options_paired" />
231 </when> 231 </when>
232 <when value="paired_collection"> 232 <when value="paired_collection">
233 <param name="paired_input" type="data_collection" collection_type="paired" format="fastq,fastq.gz" label="Select paired collection(s)"/> 233 <param name="paired_input" type="data_collection" format="fastq,fastq.gz" label="Select paired collection(s)" collection_type="paired"/>
234 <expand macro="adapter_trimming_options"> 234 <expand macro="adapter_trimming_options">
235 <expand macro="adapter_sequence" read_number="2"/> 235 <expand macro="adapter_sequence" read_number="2"/>
236 </expand> 236 </expand>
237 <expand macro="global_trimming_options_paired" /> 237 <expand macro="global_trimming_options_paired" />
238 </when> 238 </when>
253 </section> 253 </section>
254 254
255 <section name="length_filtering_options" title="Length filtering options" expanded="True"> 255 <section name="length_filtering_options" title="Length filtering options" expanded="True">
256 <param name="disable_length_filtering" argument="-L" type="boolean" truevalue="-L" falsevalue="" checked="false" label="Disable length filtering" help="Length filtering is enabled by default. If this option is specified, length filtering is disabled."/> 256 <param name="disable_length_filtering" argument="-L" type="boolean" truevalue="-L" falsevalue="" checked="false" label="Disable length filtering" help="Length filtering is enabled by default. If this option is specified, length filtering is disabled."/>
257 <param name="length_required" argument="-l" type="integer" optional="true" label="Length required" help="Reads shorter than this value will be discarded. Default is 15."/> 257 <param name="length_required" argument="-l" type="integer" optional="true" label="Length required" help="Reads shorter than this value will be discarded. Default is 15."/>
258 <param name="length_limit" argument="--length_limit" type="integer" optional="true" label="Maximum length" help="Reads longer than this value will be discarded. Default is 0 and means no limitation."/> 258 <param argument="--length_limit" type="integer" optional="true" label="Maximum length" help="Reads longer than this value will be discarded. Default is 0 and means no limitation."/>
259 </section> 259 </section>
260 260
261 <section name="low_complexity_filter" title="Low complexity filtering options" expanded="True"> 261 <section name="low_complexity_filter" title="Low complexity filtering options" expanded="True">
262 <param name="enable_low_complexity_filter" argument="-y" type="boolean" truevalue="-y" falsevalue="" checked="false" label="Enable low complexity filter" help="The complexity is defined as the percentage of base that is different from its next base, default is No"/> 262 <param name="enable_low_complexity_filter" argument="-y" type="boolean" truevalue="-y" falsevalue="" checked="false" label="Enable low complexity filter" help="The complexity is defined as the percentage of base that is different from its next base, default is No"/>
263 <param name="complexity_threshold" argument="-Y" type="integer" optional="true" label="Complexity threshold" help="Threshold for low complexity filter (0~100). Default is 30, which means 30% complexity is required."/> 263 <param name="complexity_threshold" argument="-Y" type="integer" optional="true" label="Complexity threshold" help="Threshold for low complexity filter (0~100). Default is 30, which means 30% complexity is required."/>
285 <param name="polyx_trimming_select" type="select" label="PolyX tail trimming" help="Similar to polyG tail trimming. When polyG tail trimming and polyX tail trimming are both enabled, fastp will perform polyG trimming first, then perform polyX trimming. Disabled by default."> 285 <param name="polyx_trimming_select" type="select" label="PolyX tail trimming" help="Similar to polyG tail trimming. When polyG tail trimming and polyX tail trimming are both enabled, fastp will perform polyG trimming first, then perform polyX trimming. Disabled by default.">
286 <option value="" selected="true">Disable polyX trimming</option> 286 <option value="" selected="true">Disable polyX trimming</option>
287 <option value="-x">Enable polyX tail trimming</option> 287 <option value="-x">Enable polyX tail trimming</option>
288 </param> 288 </param>
289 <when value="-x"> 289 <when value="-x">
290 <param name="poly_x_min_len" argument="--poly_x_min_len" type="integer" optional="true" label="PolyX minimum length" 290 <param argument="--poly_x_min_len" type="integer" optional="true" label="PolyX minimum length"
291 help="The minimum length to detect polyX in the read tail. 10 by default."/> 291 help="The minimum length to detect polyX in the read tail. 10 by default."/>
292 </when> 292 </when>
293 <when value="" /> 293 <when value="" />
294 </conditional> 294 </conditional>
295 295
296 <section name="umi_processing" title="UMI processing" expanded="True"> 296 <section name="umi_processing" title="UMI processing" expanded="True">
297 <param name="umi" argument="-U" type="boolean" truevalue="-U" falsevalue="" checked="false" label="Enable unique molecular identifer" help="Enable unique molecular identifer (UMI) preprocessing."/> 297 <param name="umi" argument="-U" type="boolean" truevalue="-U" falsevalue="" checked="false" label="Enable unique molecular identifer" help="Enable unique molecular identifer (UMI) preprocessing."/>
298 <param name="umi_loc" argument="--umi_loc" type="text" optional="true" label="UMI location" help="Specify the location of UMI, can be (index1/index2/read1/read2/per_index/per_read, default is none."/> 298 <param argument="--umi_loc" type="text" optional="true" label="UMI location" help="Specify the location of UMI, can be (index1/index2/read1/read2/per_index/per_read, default is none."/>
299 <param name="umi_len" argument="--umi_len" type="integer" optional="true" label="UMI length" help="If the UMI is in read1/read2, its length should be provided."/> 299 <param argument="--umi_len" type="integer" optional="true" label="UMI length" help="If the UMI is in read1/read2, its length should be provided."/>
300 <param name="umi_prefix" argument="--umi_prefix" type="text" optional="true" label="UMI prefix" help="If specified, an underline will be used to connect prefix and UMI (i.e. prefix=UMI, UMI=AATTCG, final=UMI_AATTCG). No prefix by default."/> 300 <param argument="--umi_prefix" type="text" optional="true" label="UMI prefix" help="If specified, an underline will be used to connect prefix and UMI (i.e. prefix=UMI, UMI=AATTCG, final=UMI_AATTCG). No prefix by default."/>
301 </section> 301 </section>
302 302
303 <section name="cutting_by_quality_options" title="Per read cutting by quality options" expanded="True"> 303 <section name="cutting_by_quality_options" title="Per read cutting by quality options" expanded="True">
304 <param name="cut_by_quality5" argument="-5" type="boolean" truevalue="-5" falsevalue="" checked="false" label="Cut by quality in front (5')" help="Enable per read cutting by quality in front (5'), default is disabled (WARNING: this will interfere deduplication for both PE/SE data)."/> 304 <param name="cut_by_quality5" argument="-5" type="boolean" truevalue="-5" falsevalue="" checked="false" label="Cut by quality in front (5')" help="Enable per read cutting by quality in front (5'), default is disabled (WARNING: this will interfere deduplication for both PE/SE data)."/>
305 <param name="cut_by_quality3" argument="-3" type="boolean" truevalue="-3" falsevalue="" checked="false" label="Cut by quality in tail (3')" help="Enable per read cutting by quality in tail (3'), default is disabled (WARNING: this will interfere deduplication for SE data)."/> 305 <param name="cut_by_quality3" argument="-3" type="boolean" truevalue="-3" falsevalue="" checked="false" label="Cut by quality in tail (3')" help="Enable per read cutting by quality in tail (3'), default is disabled (WARNING: this will interfere deduplication for SE data)."/>
335 <filter>output_options['report_json'] is True</filter> 335 <filter>output_options['report_json'] is True</filter>
336 </data> 336 </data>
337 </outputs> 337 </outputs>
338 338
339 <tests> 339 <tests>
340 <!-- Ensure default output works --> 340 <!-- 1. Ensure default output works -->
341 <test expect_num_outputs="2"> 341 <test expect_num_outputs="2">
342 <param name="in1" ftype="fastqsanger" value="R1.fq"/> 342 <param name="in1" ftype="fastqsanger" value="R1.fq"/>
343 <param name="single_paired_selector" value="single"/> 343 <param name="single_paired_selector" value="single"/>
344 <output name="out1" ftype="fastqsanger" file="out1.fq"/> 344 <output name="out1" ftype="fastqsanger" file="out1.fq"/>
345 <output name="report_html"> 345 <output name="report_html">
346 <assert_contents> 346 <assert_contents>
347 <has_text text="fastp report"/> 347 <has_text text="fastp report"/>
348 </assert_contents> 348 </assert_contents>
349 </output> 349 </output>
350 </test> 350 </test>
351 <!-- Ensure paired collection works --> 351 <!-- 2. Ensure paired collection works -->
352 <test expect_num_outputs="4"> 352 <test expect_num_outputs="4">
353 <param name="single_paired_selector" value="paired_collection"/> 353 <param name="single_paired_selector" value="paired_collection"/>
354 <param name="paired_input"> 354 <param name="paired_input">
355 <collection type="paired"> 355 <collection type="paired">
356 <element name="forward" value="bwa-mem-fastq1.fq" ftype="fastqsanger" /> 356 <element name="forward" value="bwa-mem-fastq1.fq" ftype="fastqsanger" />
365 <output_collection name="output_paired_coll" type="paired"> 365 <output_collection name="output_paired_coll" type="paired">
366 <element name="forward" value="out_bwa1.fq" ftype="fastqsanger"/> 366 <element name="forward" value="out_bwa1.fq" ftype="fastqsanger"/>
367 <element name="reverse" value="out_bwa2.fq" ftype="fastqsanger"/> 367 <element name="reverse" value="out_bwa2.fq" ftype="fastqsanger"/>
368 </output_collection> 368 </output_collection>
369 </test> 369 </test>
370 <!-- Ensure custom adapter works --> 370 <!-- 3. Ensure custom adapter works -->
371 <test expect_num_outputs="2"> 371 <test expect_num_outputs="2">
372 <param name="in1" ftype="fastq" value="R1.fq"/> 372 <param name="in1" ftype="fastq" value="R1.fq"/>
373 <param name="single_paired_selector" value="single"/> 373 <param name="single_paired_selector" value="single"/>
374 <param name="adapter_sequence1" value="ATCG"/> 374 <param name="adapter_sequence1" value="ATCG"/>
375 <output name="out1" ftype="fastq" file="out_a.fq"/> 375 <output name="out1" ftype="fastq" file="out_a.fq"/>
376 </test> 376 </test>
377 <!-- Ensure UMI processing works --> 377 <!-- 4. Ensure UMI processing works -->
378 <test expect_num_outputs="2"> 378 <test expect_num_outputs="2">
379 <param name="in1" ftype="fastq" value="R1.fq"/> 379 <param name="in1" ftype="fastq" value="R1.fq"/>
380 <param name="single_paired_selector" value="single"/> 380 <param name="single_paired_selector" value="single"/>
381 <section name="umi_processing"> 381 <section name="umi_processing">
382 <param name="umi" value="true"/> 382 <param name="umi" value="true"/>
383 <param name="umi_loc" value="read1"/> 383 <param name="umi_loc" value="read1"/>
384 <param name="umi_len" value="8"/> 384 <param name="umi_len" value="8"/>
385 </section> 385 </section>
386 <output name="out1" ftype="fastq" file="out2.fq"/> 386 <output name="out1" ftype="fastq" file="out2.fq"/>
387 </test> 387 </test>
388 <!-- Ensure UMI processing with different lengths works --> 388 <!-- 5. Ensure UMI processing with different lengths works -->
389 <test expect_num_outputs="2"> 389 <test expect_num_outputs="2">
390 <param name="in1" ftype="fastq" value="R1.fq"/> 390 <param name="in1" ftype="fastq" value="R1.fq"/>
391 <param name="single_paired_selector" value="single"/> 391 <param name="single_paired_selector" value="single"/>
392 <section name="umi_processing"> 392 <section name="umi_processing">
393 <param name="umi" value="true"/> 393 <param name="umi" value="true"/>
394 <param name="umi_loc" value="read1"/> 394 <param name="umi_loc" value="read1"/>
395 <param name="umi_len" value="12"/> 395 <param name="umi_len" value="12"/>
396 </section> 396 </section>
397 <output name="out1" ftype="fastq" file="out3.fq"/> 397 <output name="out1" ftype="fastq" file="out3.fq"/>
398 </test> 398 </test>
399 <!-- Ensure paired-end fastq works --> 399 <!-- 6. Ensure paired-end fastq works -->
400 <test expect_num_outputs="3"> 400 <test expect_num_outputs="3">
401 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/> 401 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/>
402 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/> 402 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/>
403 <param name="single_paired_selector" value="paired"/> 403 <param name="single_paired_selector" value="paired"/>
404 <output name="out1" ftype="fastq" file="out_bwa1.fq"/> 404 <output name="out1" ftype="fastq" file="out_bwa1.fq"/>
405 <output name="out2" ftype="fastq" file="out_bwa2.fq"/> 405 <output name="out2" ftype="fastq" file="out_bwa2.fq"/>
406 </test> 406 </test>
407 <!-- Ensure paired-end UMI processing of Read 1 works --> 407 <!-- 7. Ensure paired-end UMI processing of Read 1 works -->
408 <test expect_num_outputs="3"> 408 <test expect_num_outputs="3">
409 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/> 409 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/>
410 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/> 410 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/>
411 <param name="single_paired_selector" value="paired"/> 411 <param name="single_paired_selector" value="paired"/>
412 <section name="umi_processing"> 412 <section name="umi_processing">
415 <param name="umi_len" value="8"/> 415 <param name="umi_len" value="8"/>
416 </section> 416 </section>
417 <output name="out1" ftype="fastq" file="out_bwa_umi_read1_1.fq"/> 417 <output name="out1" ftype="fastq" file="out_bwa_umi_read1_1.fq"/>
418 <output name="out2" ftype="fastq" file="out_bwa_umi_read1_2.fq"/> 418 <output name="out2" ftype="fastq" file="out_bwa_umi_read1_2.fq"/>
419 </test> 419 </test>
420 <!-- Ensure paired-end UMI processing of Read 2 works --> 420 <!-- 8. Ensure paired-end UMI processing of Read 2 works -->
421 <test expect_num_outputs="3"> 421 <test expect_num_outputs="3">
422 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/> 422 <param name="in1" ftype="fastq" value="bwa-mem-fastq1.fq"/>
423 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/> 423 <param name="in2" ftype="fastq" value="bwa-mem-fastq2.fq"/>
424 <param name="single_paired_selector" value="paired"/> 424 <param name="single_paired_selector" value="paired"/>
425 <section name="umi_processing"> 425 <section name="umi_processing">
428 <param name="umi_len" value="8"/> 428 <param name="umi_len" value="8"/>
429 </section> 429 </section>
430 <output name="out1" ftype="fastq" file="out_bwa_umi_read2_1.fq"/> 430 <output name="out1" ftype="fastq" file="out_bwa_umi_read2_1.fq"/>
431 <output name="out2" ftype="fastq" file="out_bwa_umi_read2_2.fq"/> 431 <output name="out2" ftype="fastq" file="out_bwa_umi_read2_2.fq"/>
432 </test> 432 </test>
433 <!-- Ensure JSON report output works --> 433 <!-- 9. Ensure JSON report output works -->
434 <test expect_num_outputs="2"> 434 <test expect_num_outputs="2">
435 <param name="in1" ftype="fastqsanger" value="R1.fq"/> 435 <param name="in1" ftype="fastqsanger" value="R1.fq"/>
436 <param name="single_paired_selector" value="single"/> 436 <param name="single_paired_selector" value="single"/>
437 <param name="report_html" value="False"/> 437 <param name="report_html" value="False"/>
438 <param name="report_json" value="True"/> 438 <param name="report_json" value="True"/>
441 <assert_contents> 441 <assert_contents>
442 <has_text text="fastp report"/> 442 <has_text text="fastp report"/>
443 </assert_contents> 443 </assert_contents>
444 </output> 444 </output>
445 </test> 445 </test>
446 <!-- Ensure polyG trimming works --> 446 <!-- 10. Ensure polyG trimming works -->
447 <test expect_num_outputs="2"> 447 <test expect_num_outputs="2">
448 <param name="in1" ftype="fastq.gz" value="R1.fq.gz"/> 448 <param name="in1" ftype="fastq.gz" value="R1.fq.gz"/>
449 <param name="single_paired_selector" value="single"/> 449 <param name="single_paired_selector" value="single"/>
450 <param name="trimming_select" value="-g"/> 450 <param name="trimming_select" value="-g"/>
451 <param name="poly_g_min_len" value="10"/> 451 <param name="poly_g_min_len" value="10"/>
452 <output name="out1" ftype="fastq.gz" decompress="True" file="out1.fq.gz"/> 452 <output name="out1" ftype="fastq.gz" decompress="True" file="out1.fq.gz"/>
453 </test> 453 </test>
454 <!-- Ensure polyX trimming works --> 454 <!-- 11. Ensure polyX trimming works -->
455 <test expect_num_outputs="2"> 455 <test expect_num_outputs="2">
456 <param name="in1" ftype="fastq.gz" value="R1.fq.gz"/> 456 <param name="in1" ftype="fastq.gz" value="R1.fq.gz"/>
457 <param name="single_paired_selector" value="single"/> 457 <param name="single_paired_selector" value="single"/>
458 <param name="trimming_select" value="-G"/> 458 <param name="trimming_select" value="-G"/>
459 <param name="polyx_trimming_select" value="-x"/> 459 <param name="polyx_trimming_select" value="-x"/>
460 <param name="poly_x_min_len" value="10"/> 460 <param name="poly_x_min_len" value="10"/>
461 <output name="out1" ftype="fastq.gz" decompress="True" file="out1.fq.gz"/> 461 <output name="out1" ftype="fastq.gz" decompress="True" file="out1.fq.gz"/>
462 </test> 462 </test>
463 <!-- 12. Test fastq files with different length -->
464 <test expect_exit_code="255" expect_failure="true">
465 <param name="single_paired_selector" value="paired_collection"/>
466 <param name="paired_input">
467 <collection type="paired">
468 <element name="forward" value="bwa-mem-fastq1.fq" ftype="fastqsanger" />
469 <element name="reverse" value="bwa-mem-fastq2_too_long.fq" ftype="fastqsanger" />
470 </collection>
471 </param>
472 </test>
463 </tests> 473 </tests>
464 <help><![CDATA[ 474 <help><![CDATA[
465 .. class:: infomark 475 .. class:: infomark
466 476
467 **What it does** 477 **What it does**
468 478
469 fastp_ is a tool designed to provide fast all-in-one preprocessing for FASTQ files. This tool is developed in C++ with multithreading supported to afford high performance. 479 fastp_ is a tool designed to provide fast all-in-one preprocessing for FASTQ files. This tool is developed in C++ with multithreading supported to
480 afford high performance.
470 481
471 *Features* 482 *Features*
472 483
473 1. Filter out bad reads (too low quality, too short, or too many N...) 484 1. Filter out bad reads (too low quality, too short, or too many N...)
474 485