comparison cutadapt.xml @ 20:e4691e1589d3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt commit 59d42345d86e33e01aa50013f00f4dc0612d3de8
author iuc
date Mon, 08 Apr 2019 13:49:22 -0400
parents 49370cb85f0f
children 104d86c98776
comparison
equal deleted inserted replaced
19:49370cb85f0f 20:e4691e1589d3
1 <tool id="cutadapt" name="Cutadapt" version="1.16.5" profile="17.09"> 1 <tool id="cutadapt" name="Cutadapt" version="1.16.6" profile="17.09">
2 <description>Remove adapter sequences from Fastq/Fasta</description> 2 <description>Remove adapter sequences from Fastq/Fasta</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <requirements> 6 <requirements>
33 #set input_1 = $library.input_1 33 #set input_1 = $library.input_1
34 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier)) 34 #set read1 = re.sub('[^\w\-\s]', '_', str($library.input_1.element_identifier))
35 #end if 35 #end if
36 36
37 #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"): 37 #if $input_1.is_of_type("fastq.gz", "fastqsanger.gz"):
38 #set read1 = $read1 + ".fq.gz" 38 #set ext = ".fq.gz"
39 #set out1 = "out1.gz"
40 #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"): 39 #else if $input_1.is_of_type("fastq.bz2", "fastqsanger.bz2"):
41 #set read1 = $read1 + ".fq.bz2" 40 #set ext = ".fq.bz2"
42 #set out1 = "out1.bz2"
43 #else if $input_1.is_of_type('fasta'): 41 #else if $input_1.is_of_type('fasta'):
44 #set read1 = $read1 + ".fa" 42 #set ext = ".fa"
45 #set out1 = "out1.fa"
46 #else: 43 #else:
47 #set read1 = $read1 + ".fq" 44 #set ext = ".fq"
48 #set out1 = "out1.fq" 45 #end if
49 #end if 46 #set read1 = $read1 + $ext
47 #set out1 = "out1" + $ext
48 #set rest_output = "rest_output" + $ext
49 #set wild_output = "wild_output" + $ext
50 #set too_short_output = "too_short_output" + $ext
51 #set too_long_output = "too_long_output" + $ext
52 #set untrimmed_output = "untrimmed_output" + $ext
50 ln -f -s '${input_1}' '$read1' && 53 ln -f -s '${input_1}' '$read1' &&
51 54
52 #if $paired: 55 #if $paired:
53 #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"): 56 #if $input_2.is_of_type("fastq.gz", "fastqsanger.gz"):
54 #set read2 = $read2 + ".fq.gz" 57 #set ext2 = ".fq.gz"
55 #set out2 = "out2.gz"
56 #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"): 58 #else if $input_2.is_of_type("fastq.bz2", "fastqsanger.bz2"):
57 #set read2 = $read2 + ".fq.bz2" 59 #set ext2 = ".fq.gz"
58 #set out2 = "out2.bz2"
59 #else if $input_2.is_of_type('fasta'): 60 #else if $input_2.is_of_type('fasta'):
60 #set read2 = $read2 + ".fa" 61 #set ext2 = ".fa"
61 #set out2 = "out2.fa"
62 #else: 62 #else:
63 #set read2 = $read2 + ".fq" 63 #set ext2 = ".fq"
64 #set out2 = "out2.fq"
65 #end if 64 #end if
65 #set read2 = $read2 + $ext2
66 #set out2 = "out2" + $ext2
67 #set too_short_paired_output = "too_short_paired_output" + $ext2
68 #set too_long_paired_output = "too_long_paired_output" + $ext2
69 #set untrimmed_paired_output = "untrimmed_paired_output" + $ext2
66 ln -f -s '${input_2}' '$read2' && 70 ln -f -s '${input_2}' '$read2' &&
67 #end if 71 #end if
68 72
69 ## Run Cutadapt 73 ## Run Cutadapt
70 74
250 254
251 <data name="info_file" format="txt" metadata_source="input_1" label="${tool.name} on ${on_string}: Info File" > 255 <data name="info_file" format="txt" metadata_source="input_1" label="${tool.name} on ${on_string}: Info File" >
252 <filter>(output_options['info_file'] is True)</filter> 256 <filter>(output_options['info_file'] is True)</filter>
253 </data> 257 </data>
254 258
255 <data name="rest_output" format="fastqsanger" metadata_source="input_1" label="${tool.name} on ${on_string}: Rest of Reads (R1 only)" > 259 <data name="rest_output" format="fastqsanger" metadata_source="input_1" from_work_dir="rest_output*" label="${tool.name} on ${on_string}: Rest of Reads (R1 only)" >
256 <filter>(output_options['rest_file'] is True)</filter> 260 <filter>(output_options['rest_file'] is True)</filter>
257 <expand macro="inherit_format_1" /> 261 <expand macro="inherit_format_1" />
258 </data> 262 </data>
259 263
260 <data name="wild_output" format="txt" metadata_source="input_1" label="${tool.name} on ${on_string}: Wildcard File" > 264 <data name="wild_output" format="txt" metadata_source="input_1" from_work_dir="wild_output*" label="${tool.name} on ${on_string}: Wildcard File" >
261 <filter>(output_options['wildcard_file'] is True)</filter> 265 <filter>(output_options['wildcard_file'] is True)</filter>
262 </data> 266 </data>
263 267
264 <data name="untrimmed_output" format="fastqsanger" metadata_source="input_1" label="${tool.name} on ${on_string}: Untrimmed Read 1" > 268 <data name="untrimmed_output" format="fastqsanger" metadata_source="input_1" from_work_dir="untrimmed_output*" label="${tool.name} on ${on_string}: Untrimmed Read 1" >
265 <filter>(output_options['untrimmed_file'] is True)</filter> 269 <filter>(output_options['untrimmed_file'] is True)</filter>
266 <expand macro="inherit_format_1" /> 270 <expand macro="inherit_format_1" />
267 </data> 271 </data>
268 <data name="untrimmed_paired_output" format="fastqsanger" metadata_source="input_2" label="${tool.name} on ${on_string}: Untrimmed Read 2" > 272 <data name="untrimmed_paired_output" format="fastqsanger" metadata_source="input_2" from_work_dir="untrimmed_paired_output*" label="${tool.name} on ${on_string}: Untrimmed Read 2" >
269 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter> 273 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter>
270 <filter>(output_options['untrimmed_file'] is True)</filter> 274 <filter>(output_options['untrimmed_file'] is True)</filter>
271 <expand macro="inherit_format_2" /> 275 <expand macro="inherit_format_2" />
272 </data> 276 </data>
273 277
274 <data name="too_short_output" format="fastqsanger" metadata_source="input_1" label="${tool.name} on ${on_string}: Too Short Read 1" > 278 <data name="too_short_output" format="fastqsanger" metadata_source="input_1" from_work_dir="too_short_output*" label="${tool.name} on ${on_string}: Too Short Read 1" >
275 <filter>(output_options['too_short_file'] is True)</filter> 279 <filter>(output_options['too_short_file'] is True)</filter>
276 <expand macro="inherit_format_1" /> 280 <expand macro="inherit_format_1" />
277 </data> 281 </data>
278 <data name="too_short_paired_output" format="fastqsanger" metadata_source="input_2" label="${tool.name} on ${on_string}: Too Short Read 2" > 282 <data name="too_short_paired_output" format="fastqsanger" metadata_source="input_2" from_work_dir="too_short_paired_output*" label="${tool.name} on ${on_string}: Too Short Read 2" >
279 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter> 283 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter>
280 <filter>(output_options['too_short_file'] is True)</filter> 284 <filter>(output_options['too_short_file'] is True)</filter>
281 <expand macro="inherit_format_2" /> 285 <expand macro="inherit_format_2" />
282 </data> 286 </data>
283 287
284 <data name="too_long_output" format="fastqsanger" metadata_source="input_1" label="${tool.name} on ${on_string}: Too Long Read 1" > 288 <data name="too_long_output" format="fastqsanger" metadata_source="input_1" from_work_dir="too_long_output*" label="${tool.name} on ${on_string}: Too Long Read 1" >
285 <filter>(output_options['too_long_file'] is True)</filter> 289 <filter>(output_options['too_long_file'] is True)</filter>
286 <expand macro="inherit_format_1" /> 290 <expand macro="inherit_format_1" />
287 </data> 291 </data>
288 <data name="too_long_paired_output" format="fastqsanger" metadata_source="input_2" label="${tool.name} on ${on_string}: Too Long Read 2" > 292 <data name="too_long_paired_output" format="fastqsanger" metadata_source="input_2" from_work_dir="too_long_paired_output*" label="${tool.name} on ${on_string}: Too Long Read 2" >
289 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter> 293 <filter>(library['type'] == 'paired' or library['type'] == 'paired_collection')</filter>
290 <filter>(output_options['too_long_file'] is True)</filter> 294 <filter>(output_options['too_long_file'] is True)</filter>
291 <expand macro="inherit_format_2" /> 295 <expand macro="inherit_format_2" />
292 </data> 296 </data>
293 297
461 <element name="unknown" decompress="True" file="unknown.fastq.gz" ftype="fastq.gz"> 465 <element name="unknown" decompress="True" file="unknown.fastq.gz" ftype="fastq.gz">
462 </element> 466 </element>
463 </output_collection> 467 </output_collection>
464 </test> 468 </test>
465 469
470 <!-- Ensure untrimmed file output works -->
471 <test>
472 <param name="type" value="single" />
473 <param name="input_1" ftype="fastq" value="cutadapt_small.fastq" />
474 <param name="adapter_source_list" value="user"/>
475 <param name="adapter" value="AAAT"/>
476 <param name="untrimmed_file" value="True" />
477 <output name="out1" file="cutadapt_trimmed.out" ftype="fastq"/>
478 <output name="untrimmed_output" file="cutadapt_untrimmed.out" ftype="fastq"/>
479 </test>
480 <!-- Ensure untrimmed gzip file output works -->
481 <test>
482 <param name="type" value="single" />
483 <param name="input_1" ftype="fastq.gz" value="bwa-mem-fastq1.fq.gz" />
484 <param name="adapter_source_list" value="user"/>
485 <param name="adapter" value="AGATCGGAAGAGC"/>
486 <param name="untrimmed_file" value="True" />
487 <output name="out1" decompress="True" file="cutadapt_trimmed.out.gz" ftype="fastq.gz"/>
488 <!--
489 Do not use the decompress option for this assertion, since it does NOT test that the file is compressed
490 See discussion at https://github.com/galaxyproject/galaxy/issues/7671
491 `delta="4000" is more than the difference between gzip level 1 and gzip level 9, but much less than the
492 difference between level 1 compression and no compression
493 -->
494 <output name="untrimmed_output" file="cutadapt_untrimmed.out.gz" compare="sim_size" delta="4000" ftype="fastq.gz"/>
495 </test>
466 </tests> 496 </tests>
467 497
468 <help><![CDATA[ 498 <help><![CDATA[
469 499
470 .. class:: infomark 500 .. class:: infomark