comparison fastp.xml @ 5:3e2551a37201 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fastp commit f3673fca1a180ada77fca93d871b3fd446f74498
author iuc
date Fri, 10 Aug 2018 19:40:07 -0400
parents 7c82cb2a90c4
children a935cbdf1c0e
comparison
equal deleted inserted replaced
4:7c82cb2a90c4 5:3e2551a37201
1 <tool id="fastp" name="fastp" version="@WRAPPER_VERSION@.1"> 1 <tool id="fastp" name="fastp" version="@WRAPPER_VERSION@.2">
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 <requirements> 6 <requirements>
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 #import re 11 #import re
12 12
13 ## Link input files 13 ## Link input files
14 14
15 #if $in1.is_of_type('fastq.gz') 15 #set ext = '.fastq'
16 #set ext = '.fastq.gz' 16
17 #if $single_paired.single_paired_selector == 'paired_collection':
18 #if $single_paired.paired_input.forward.is_of_type('fastq.gz'):
19 #set ext = '.fastq.gz'
20 #end if
21 #set $in1 = $single_paired.paired_input.forward
22 #set $in2 = $single_paired.paired_input.reverse
23 #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 out1 = $output_paired_coll.forward
26 #set out2 = $output_paired_coll.reverse
27 ln -s '$in1' '$in1_name' &&
28 ln -s '$in2' '$in2_name' &&
17 #else 29 #else
18 #set ext = '.fastq' 30 #if $in1.is_of_type('fastq.gz')
19 #end if 31 #set ext = '.fastq.gz'
20 32 #end if
21 #set $in1_name = re.sub('[^\w\-\s]', '_', str($in1.element_identifier)) + $ext 33
22 ln -s '$in1' $in1_name && 34 #set $in1_name = re.sub('[^\w\-\s]', '_', str($in1.element_identifier)) + $ext
23 35 ln -s '$in1' '$in1_name' &&
24 #if str($single_paired.single_paired_selector) == 'paired': 36
25 #set $in2_name = re.sub('[^\w\-\s]', '_', str($in2.element_identifier)) + $ext 37 #if str($single_paired.single_paired_selector) == 'paired':
26 ln -s '$in2' $in2_name && 38 #set $in2_name = re.sub('[^\w\-\s]', '_', str("%s_R2" % $in2.element_identifier)) + $ext
39 ln -s '$in2' '$in2_name' &&
40 #end if
27 #end if 41 #end if
28 42
29 43
30 ## Run fastp 44 ## Run fastp
31 45
36 50
37 #if $in1.is_of_type('fastqillumina', 'fastqsolexa', 'fastqillumina.gz', 'fastqsolexa.gz'): 51 #if $in1.is_of_type('fastqillumina', 'fastqsolexa', 'fastqillumina.gz', 'fastqsolexa.gz'):
38 --phred64 52 --phred64
39 #end if 53 #end if
40 54
41 -i $in1_name 55 -i '$in1_name'
42 -o first${ext} 56 -o first${ext}
43 57
44 #if str($single_paired.single_paired_selector) == 'paired': 58 #if str($single_paired.single_paired_selector).startswith('paired'):
45 -I $in2_name 59 -I '$in2_name'
46 -O second${ext} 60 -O second${ext}
47 #end if 61 #end if
48 62
49 63
50 ## Adapter Trimming Options 64 ## Adapter Trimming Options
53 67
54 #if str($single_paired.adapter_trimming_options.adapter_sequence1): 68 #if str($single_paired.adapter_trimming_options.adapter_sequence1):
55 --adapter_sequence '$single_paired.adapter_trimming_options.adapter_sequence1' 69 --adapter_sequence '$single_paired.adapter_trimming_options.adapter_sequence1'
56 #end if 70 #end if
57 71
58 #if str($single_paired.single_paired_selector) == 'paired': 72 #if str($single_paired.single_paired_selector).startswith('paired'):
59 #if str($single_paired.adapter_trimming_options.adapter_sequence2): 73 #if str($single_paired.adapter_trimming_options.adapter_sequence2):
60 --adapter_sequence_r2 '$single_paired.adapter_trimming_options.adapter_sequence2' 74 --adapter_sequence_r2 '$single_paired.adapter_trimming_options.adapter_sequence2'
61 #end if 75 #end if
62 #end if 76 #end if
63 77
70 84
71 #if str($single_paired.global_trimming_options.trim_tail1): 85 #if str($single_paired.global_trimming_options.trim_tail1):
72 -t $single_paired.global_trimming_options.trim_tail1 86 -t $single_paired.global_trimming_options.trim_tail1
73 #end if 87 #end if
74 88
75 #if str($single_paired.single_paired_selector) == 'paired': 89 #if str($single_paired.single_paired_selector).startswith('paired'):
76 #if str($single_paired.global_trimming_options.trim_front2): 90 #if str($single_paired.global_trimming_options.trim_front2):
77 -F $single_paired.global_trimming_options.trim_front2 91 -F $single_paired.global_trimming_options.trim_front2
78 #end if 92 #end if
79 #if str($single_paired.global_trimming_options.trim_tail2): 93 #if str($single_paired.global_trimming_options.trim_tail2):
80 -T $single_paired.global_trimming_options.trim_tail2 94 -T $single_paired.global_trimming_options.trim_tail2
181 $read_mod_options.base_correction_options.correction 195 $read_mod_options.base_correction_options.correction
182 196
183 && 197 &&
184 198
185 mv first${ext} '${out1}' 199 mv first${ext} '${out1}'
186 #if str($single_paired.single_paired_selector) == 'paired': 200 #if str($single_paired.single_paired_selector).startswith('paired'):
187 && 201 &&
188 mv second${ext} '${out2}' 202 mv second${ext} '${out2}'
189 #end if 203 #end if
190 ]]></command> 204 ]]></command>
191 <inputs> 205 <inputs>
192 206
193 <conditional name="single_paired"> 207 <conditional name="single_paired">
194 <param name="single_paired_selector" type="select" label="Single-end or paired reads"> 208 <param name="single_paired_selector" type="select" label="Single-end or paired reads">
195 <option value="single" selected="true">Single-end</option> 209 <option value="single" selected="true">Single-end</option>
196 <option value="paired">Paired</option> 210 <option value="paired">Paired</option>
211 <option value="paired_collection">Paired Collection</option>
197 </param> 212 </param>
198 <when value="single"> 213 <when value="single">
199 <expand macro="in1" /> 214 <expand macro="in" />
200 <section name="adapter_trimming_options" title="Adapter Trimming Options" expanded="False"> 215 <expand macro="adapter_trimming_options" />
201 <param name="disable_adapter_trimming" argument="-A" type="boolean" truevalue="-A" falsevalue="" checked="false" label="Disable adapter trimming" help="Adapter trimming is enabled by default. If this option is specified, adapter trimming is disabled."/> 216 <expand macro="global_trimming_options" />
202 <expand macro="adapter_sequence1" />
203 </section>
204 <section name="global_trimming_options" title="Global Trimming Options" expanded="False">
205 <param name="trim_front1" argument="-f" type="integer" optional="true" label="Trim front for input 1" help="Trimming how many bases in front for read1, default is 0."/>
206 <param name="trim_tail1" argument="-t" type="integer" optional="true" label="Trim tail for input 1" help="Trimming how many bases in tail for read1, default is 0."/>
207 </section>
208 </when> 217 </when>
209 <when value="paired"> 218 <when value="paired">
210 <expand macro="in1" /> 219 <expand macro="in" read_number="1" argument="-i"/>
211 <param name="in2" argument="-I" type="data" format="fastq,fastq.gz" optional="true" label="Input 2" help="Input FASTQ file #2."/> 220 <expand macro="in" read_number="2" argument="-I"/>
212 <section name="adapter_trimming_options" title="Adapter trimming options" expanded="False"> 221 <expand macro="adapter_trimming_options">
213 <param name="disable_adapter_trimming" argument="-A" type="boolean" truevalue="-A" falsevalue="" checked="false" label="Disable adapter trimming" help="Adapter trimming is enabled by default. If this option is specified, adapter trimming is disabled."/> 222 <expand macro="adapter_sequence" read_number="2"/>
214 <expand macro="adapter_sequence1" /> 223 </expand>
215 <param name="adapter_sequence2" argument="--adapter_sequence_r2" type="text" optional="true" label="Adapter sequence for input 2" help="The adapter for read2 (PE data only). This is used if R1/R2 are found not overlapped. If not specified, it will be the same as adapter sequence value for input 1."> 224 <expand macro="global_trimming_options_paired" />
216 <sanitizer> 225 </when>
217 <valid> 226 <when value="paired_collection">
218 <add value="A"/> 227 <param name="paired_input" type="data_collection" collection_type="paired" format="fastq,fastq.gz" label="Select paired collection(s)"/>
219 <add value="T"/> 228 <expand macro="adapter_trimming_options">
220 <add value="C"/> 229 <expand macro="adapter_sequence" read_number="2"/>
221 <add value="G"/> 230 </expand>
222 </valid> 231 <expand macro="global_trimming_options_paired" />
223 </sanitizer>
224 </param>
225 </section>
226 <section name="global_trimming_options" title="Global trimming options" expanded="False">
227 <param name="trim_front1" argument="-f" type="integer" optional="true" label="Trim front for input 1" help="Trimming how many bases in front for read1, default is 0."/>
228 <param name="trim_tail1" argument="-t" type="integer" optional="true" label="Trim tail for input 1" help="Trimming how many bases in tail for read1, default is 0."/>
229 <param name="trim_front2" argument="-F" type="integer" optional="true" label="Trim front for input 2" help="Trimming how many bases in front for read2. If it's not specified, it will follow read1's settings."/>
230 <param name="trim_tail2" argument="-T" type="integer" optional="true" label="Trim tail for input 2" help="Trimming how many bases in tail for read2. If it's not specified, it will follow read1's settings."/>
231 </section>
232 </when> 232 </when>
233 </conditional> 233 </conditional>
234 234
235 <section name="overrepresented_sequence_analysis" title="Overrepresented Sequence Analysis" expanded="False"> 235 <section name="overrepresented_sequence_analysis" title="Overrepresented Sequence Analysis" expanded="False">
236 <param name="overrepresentation_analysis" argument="-p" type="boolean" truevalue="-p" falsevalue="" checked="false" label="Enable overrepresented analysis" help="Enable overrepresented sequence analysis."/> 236 <param name="overrepresentation_analysis" argument="-p" type="boolean" truevalue="-p" falsevalue="" checked="false" label="Enable overrepresented analysis" help="Enable overrepresented sequence analysis."/>
310 <param name="report_json" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Output JSON report" help="The JSON report contains all the data visualized in the HTML report. The format of the JSON report is manually optimized to be easily readable by humans and is compatible with MultiQC"/> 310 <param name="report_json" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Output JSON report" help="The JSON report contains all the data visualized in the HTML report. The format of the JSON report is manually optimized to be easily readable by humans and is compatible with MultiQC"/>
311 </section> 311 </section>
312 </inputs> 312 </inputs>
313 313
314 <outputs> 314 <outputs>
315 <data name="out1" format_source="in1" label="${tool.name} on ${on_string}: Read 1 Output"/> 315 <data name="out1" format_source="in1" label="${tool.name} on ${on_string}: Read 1 Output">
316 <filter>single_paired['single_paired_selector'] in ["single", "paired"]</filter>
317 </data>
316 <data name="out2" format_source="in2" label="${tool.name} on ${on_string}: Read 2 Output"> 318 <data name="out2" format_source="in2" label="${tool.name} on ${on_string}: Read 2 Output">
317 <filter>single_paired['single_paired_selector'] == "paired"</filter> 319 <filter>single_paired['single_paired_selector'] == "paired"</filter>
318 </data> 320 </data>
321 <collection name="output_paired_coll" type="paired" structured_like="paired_input" inherit_format="true" label="Paired-end output of ${tool.name} on ${on_string}">
322 <filter>single_paired['single_paired_selector'] == "paired_collection"</filter>
323 </collection>
319 <data name="report_html" format="html" from_work_dir="fastp.html" label="${tool.name} on ${on_string}: HTML Report"> 324 <data name="report_html" format="html" from_work_dir="fastp.html" label="${tool.name} on ${on_string}: HTML Report">
320 <filter>output_options['report_html'] is True</filter> 325 <filter>output_options['report_html'] is True</filter>
321 </data> 326 </data>
322 <data name="report_json" format="json" from_work_dir="fastp.json" label="${tool.name} on ${on_string}: JSON Report"> 327 <data name="report_json" format="json" from_work_dir="fastp.json" label="${tool.name} on ${on_string}: JSON Report">
323 <filter>output_options['report_json'] is True</filter> 328 <filter>output_options['report_json'] is True</filter>
333 <output name="report_html"> 338 <output name="report_html">
334 <assert_contents> 339 <assert_contents>
335 <has_text text="fastp report"/> 340 <has_text text="fastp report"/>
336 </assert_contents> 341 </assert_contents>
337 </output> 342 </output>
343 </test>
344 <!-- Ensure paired collection works -->
345 <test expect_num_outputs="3">
346 <param name="single_paired_selector" value="paired_collection"/>
347 <param name="paired_input">
348 <collection type="paired">
349 <element name="forward" value="bwa-mem-fastq1.fq" ftype="fastqsanger" />
350 <element name="reverse" value="bwa-mem-fastq2.fq" ftype="fastqsanger" />
351 </collection>
352 </param>
353 <output name="report_html">
354 <assert_contents>
355 <has_text text="fastp report"/>
356 </assert_contents>
357 </output>
358 <output_collection name="output_paired_coll" type="paired">
359 <element name="forward" value="out_bwa1.fq" ftype="fastqsanger"/>
360 <element name="reverse" value="out_bwa2.fq" ftype="fastqsanger"/>
361 </output_collection>
338 </test> 362 </test>
339 <!-- Ensure custom adapter works --> 363 <!-- Ensure custom adapter works -->
340 <test expect_num_outputs="2"> 364 <test expect_num_outputs="2">
341 <param name="in1" ftype="fastq" value="R1.fq"/> 365 <param name="in1" ftype="fastq" value="R1.fq"/>
342 <param name="single_paired_selector" value="single"/> 366 <param name="single_paired_selector" value="single"/>