comparison trim_galore.xml @ 8:f1e71aeaa923 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/trim_galore commit d48f42b1c267c8ebfc50161ea764baed8ee66701-dirty
author bgruening
date Fri, 18 Mar 2016 07:56:01 -0400
parents 8352713cf939
children 1bfc7254232e
comparison
equal deleted inserted replaced
7:8352713cf939 8:f1e71aeaa923
1 <tool id="trim_galore" name="Trim Galore!" version="0.4.1"> 1 <tool id="trim_galore" name="Trim Galore!" version="0.4.2">
2 <!-- Wrapper compatible with Trim Galore! version 0.4 --> 2 <!-- Wrapper compatible with Trim Galore! version 0.4 -->
3 <description>adaptive quality and adapter trimmer</description> 3 <description>adaptive quality and adapter trimmer</description>
4 <macros> 4 <macros>
5 <macro name="adapter_trimming"> 5 <macro name="adapter_trimming">
6 <conditional name="trimming"> 6 <conditional name="trimming">
42 the 3' end that is not directly related to adapter sequence or basecall quality. (--three_prime_clip_R2)</help> 42 the 3' end that is not directly related to adapter sequence or basecall quality. (--three_prime_clip_R2)</help>
43 </param> 43 </param>
44 </macro> 44 </macro>
45 </macros> 45 </macros>
46 <requirements> 46 <requirements>
47 <!-- conda dependency -->
48 <requirement type="package" version="1.8.3">cutadapt</requirement>
47 <requirement type="package" version="1.8">cutadapt</requirement> 49 <requirement type="package" version="1.8">cutadapt</requirement>
48 </requirements> 50 </requirements>
49 <version_command interpreter="perl">trim_galore --version</version_command> 51 <version_command>
52 perl $__tool_directory__/trim_galore --version
53 </version_command>
50 <command> 54 <command>
51 <![CDATA[ 55 <![CDATA[
52 56
53 ## trim_galore removes .fastq and .fq file extensions of input files. 57 ## trim_galore removes .fastq and .fq file extensions of input files.
54 ## This is essential if Galaxy provides links to files (with real extensions) 58 ## This is essential if Galaxy provides links to files (with real extensions)
55 ## but that behaviour is causing an inconsistency in output filenaming. 59 ## but that behaviour is causing an inconsistency in output filenaming.
56 ## We work around this by linking every file to cwd without file extension 60 ## We work around this by linking every file to cwd without file extension
57 61
58 #if $singlePaired.sPaired == "single": 62 #if $singlePaired.sPaired == "single":
59 ln -s "${singlePaired.input_singles}" ./input_singles; 63 #if str($singlePaired.input_singles).endswith(".gz"):
64 ln -s "${singlePaired.input_singles}" ./input_singles.gz;
65 #else
66 ln -s "${singlePaired.input_singles}" ./input_singles;
67 #end if
60 #elif $singlePaired.sPaired == "paired": 68 #elif $singlePaired.sPaired == "paired":
61 ln -s "${singlePaired.input_mate1}" ./input_mate1; 69 #if str($singlePaired.input_mate1).endswith(".gz"):
62 ln -s "${singlePaired.input_mate2}" ./input_mate2; 70 ln -s "${singlePaired.input_mate1}" ./input_mate1.gz;
71 ln -s "${singlePaired.input_mate2}" ./input_mate2.gz;
72 #else
73 ln -s "${singlePaired.input_mate1}" ./input_mate1;
74 ln -s "${singlePaired.input_mate2}" ./input_mate2;
75 #end if
63 #else: 76 #else:
64 ln -s "${singlePaired.input_mate_pairs.forward}" ./input_mate1; 77 #if str($singlePaired.input_mate_pairs.forward).endswith(".gz"):
65 ln -s "${singlePaired.input_mate_pairs.reverse}" ./input_mate2; 78 ln -s "${singlePaired.input_mate_pairs.forward}" ./input_mate1.gz;
79 ln -s "${singlePaired.input_mate_pairs.reverse}" ./input_mate2.gz;
80 #else
81 ln -s "${singlePaired.input_mate_pairs.forward}" ./input_mate1;
82 ln -s "${singlePaired.input_mate_pairs.reverse}" ./input_mate2;
83 #end if
66 #end if 84 #end if
67 85
68 perl $__tool_directory__/trim_galore 86 perl $__tool_directory__/trim_galore
69 87
70 ## we only support fastqsanger 88 ## we only support fastqsanger
127 --three_prime_clip_R1 $singlePaired.three_prime_clip_R1 145 --three_prime_clip_R1 $singlePaired.three_prime_clip_R1
128 #end if 146 #end if
129 147
130 #if $singlePaired.sPaired == "single": 148 #if $singlePaired.sPaired == "single":
131 ## input sequence 149 ## input sequence
132 ./input_singles 150 #if str($singlePaired.input_singles).endswith(".gz"):
151 ./input_singles.gz
152 --dont_gzip
153 #else
154 ./input_singles
155 #end if
133 #else: 156 #else:
134 --paired 157 --paired
135 158
136 $singlePaired.trim1 159 $singlePaired.trim1
137 160
144 #if $singlePaired.three_prime_clip_R2: 167 #if $singlePaired.three_prime_clip_R2:
145 --three_prime_clip_R2 $singlePaired.three_prime_clip_R2 168 --three_prime_clip_R2 $singlePaired.three_prime_clip_R2
146 #end if 169 #end if
147 170
148 ## input sequences 171 ## input sequences
149 ./input_mate1 172 #if $singlePaired.sPaired == "paired":
150 ./input_mate2 173 #if str($singlePaired.input_mate1).endswith(".gz"):
151 174 ./input_mate1.gz
152 #end if 175 ./input_mate2.gz
176 --dont_gzip
177 #else
178 ./input_mate1
179 ./input_mate2
180 #end if
181 #else:
182 #if str($singlePaired.input_mate_pairs.forward).endswith(".gz"):
183 ./input_mate1.gz
184 ./input_mate2.gz
185 --dont_gzip
186 #else
187 ./input_mate1
188 ./input_mate2
189 #end if
190 #end if
191
192 #end if
193
194 ## Trim Galore is finished, rename the output if compressed
195 &&
196 if [ -f input_singles.gz_trimmed.fq ] ; then mv input_singles.gz_trimmed.fq input_singles_trimmed.fq ; fi
197 &&
198 if [ -f input_mate1.gz_val_1.fq ] ; then mv input_mate1.gz_val_1.fq input_mate1_val_1.fq ; fi
199 &&
200 if [ -f input_mate2.gz_val_2.fq ] ; then mv input_mate2.gz_val_2.fq input_mate2_val_2.fq ; fi
201 &&
202 if [ -f input_mate1.gz_unpaired_1.fq ] ; then mv input_mate1.gz_unpaired_1.fq input_mate1_unpaired_1.fq ; fi
203 &&
204 if [ -f input_mate2.gz_unpaired_2.fq ] ; then mv input_mate2.gz_unpaired_2.fq input_mate2_unpaired_2.fq ; fi
153 205
154 ## Trim Galore! run is finished. Move the report files to the proper place 206 ## Trim Galore! run is finished. Move the report files to the proper place
155 #if $params.settingsType == "custom" and $params.report: 207 #if $params.settingsType == "custom" and $params.report:
156 && 208 &&
157 cat ./*_trimming_report.txt > $report_file; 209 cat ./*_trimming_report.txt > $report_file;
293 <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> 345 <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
294 <param name="sPaired" value="single" /> 346 <param name="sPaired" value="single" />
295 <param name="settingsType" value="custom" /> 347 <param name="settingsType" value="custom" />
296 <param name="report" value="true" /> 348 <param name="report" value="true" />
297 <output name="trimmed_reads_single" file="sanger_full_range_results1.fastqsanger" ftype="fastqsanger"/> 349 <output name="trimmed_reads_single" file="sanger_full_range_results1.fastqsanger" ftype="fastqsanger"/>
298 <output name="report_file" file="sanger_full_range_report_results1.txt" ftype="txt" lines_diff="2" /> 350 <output name="report_file" file="sanger_full_range_report_results1.txt" ftype="txt" lines_diff="8" />
299 </test> 351 </test>
300 352
301 <test> 353 <test>
302 <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> 354 <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
303 <param name="sPaired" value="single" /> 355 <param name="sPaired" value="single" />
318 <param name="sPaired" value="paired" /> 370 <param name="sPaired" value="paired" />
319 <param name="settingsType" value="custom" /> 371 <param name="settingsType" value="custom" />
320 <param name="report" value="true" /> 372 <param name="report" value="true" />
321 <output name="trimmed_reads_pair1" file="paired_example_pair1_results2.fastqsanger" ftype="fastqsanger"/> 373 <output name="trimmed_reads_pair1" file="paired_example_pair1_results2.fastqsanger" ftype="fastqsanger"/>
322 <output name="trimmed_reads_pair2" file="paired_example_pair2_results2.fastqsanger" ftype="fastqsanger"/> 374 <output name="trimmed_reads_pair2" file="paired_example_pair2_results2.fastqsanger" ftype="fastqsanger"/>
323 <output name="report_file" file="paired_example_results2.txt" ftype="txt" lines_diff="8" /> 375 <output name="report_file" file="paired_example_results2.txt" ftype="txt" lines_diff="24" />
324 </test> 376 </test>
325 377
326 <test> 378 <test>
327 <param name="input_mate_pairs"> 379 <param name="input_mate_pairs">
328 <collection type="paired"> 380 <collection type="paired">
334 <param name="sPaired" value="paired_collection" /> 386 <param name="sPaired" value="paired_collection" />
335 <param name="settingsType" value="custom" /> 387 <param name="settingsType" value="custom" />
336 <param name="report" value="true" /> 388 <param name="report" value="true" />
337 <param name="retain_unpaired_select" value="retain_unpaired_output" /> 389 <param name="retain_unpaired_select" value="retain_unpaired_output" />
338 390
339 <output name="report_file" file="paired_collection_example_results3.txt" ftype="txt" lines_diff="8" /> 391 <output name="report_file" file="paired_collection_example_results3.txt" ftype="txt" lines_diff="24" />
340 392
341 <output_collection name="trimmed_reads_paired_collection" type="paired"> 393 <output_collection name="trimmed_reads_paired_collection" type="paired">
342 <element name="forward" file="paired_collection_example_pair1_results3.fastqsanger" ftype="fastqsanger"/> 394 <element name="forward" file="paired_collection_example_pair1_results3.fastqsanger" ftype="fastqsanger"/>
343 <element name="reverse" file="paired_collection_example_pair2_results3.fastqsanger" ftype="fastqsanger"/> 395 <element name="reverse" file="paired_collection_example_pair2_results3.fastqsanger" ftype="fastqsanger"/>
344 </output_collection> 396 </output_collection>