comparison samtools_fastx.xml @ 2:720217c23995 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_fastx commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:13:01 +0000
parents a8d69aee190e
children b3d99709fe1a
comparison
equal deleted inserted replaced
1:a8d69aee190e 2:720217c23995
1 <tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@+galaxy1"> 1 <tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@" profile="@PROFILE@">
2 <description>extract FASTA or FASTQ from alignment files</description> 2 <description>extract FASTA or FASTQ from alignment files</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements" />
7 <expand macro="stdio"/> 7 <expand macro="stdio"/>
8 <expand macro="version_command" /> 8 <expand macro="version_command" />
9 <command><![CDATA[ 9 <command><![CDATA[
10 @ADDTHREADS@ 10 @ADDTHREADS@
11 ## name sort input file if neccessary 11 ## name sort input file if neccessary
12 #if not $input.is_of_type('qname_sorted.bam', 'qname_input_sorted.bam'): 12 #if not $input.is_of_type('qname_sorted.bam', 'qname_input_sorted.bam'):
13 samtools sort -@ \$addthreads -n '$input' > input && 13 samtools sort -@ \$addthreads -n '$input' -T "\${TMPDIR:-.}" > input &&
14 #else: 14 #else:
15 ln -s '$input' input && 15 ln -s '$input' input &&
16 #end if 16 #end if
17 17
18 #set command=str($output_fmt_cond.output_fmt_select)[:5] 18 #set command=str($output_fmt_cond.output_fmt_select)[:5]
37 -1 forward.$output_fmt_cond.output_fmt_select 37 -1 forward.$output_fmt_cond.output_fmt_select
38 #end if 38 #end if
39 #if 'r2' in str($outputs): 39 #if 'r2' in str($outputs):
40 -2 reverse.$output_fmt_cond.output_fmt_select 40 -2 reverse.$output_fmt_cond.output_fmt_select
41 #end if 41 #end if
42 #if str($inclusive_filter) != 'None': 42 #set $filter = $inclusive_filter
43 #set $filter = $inclusive_filter 43 @FLAGS@
44 @FLAGS@ 44 -f $flags
45 -f $flags 45 #set $filter = $exclusive_filter
46 #end if 46 @FLAGS@
47 #if str($exclusive_filter) != 'None': 47 -F $flags
48 #set $filter = $exclusive_filter 48 #set $filter = $exclusive_filter_all
49 @FLAGS@ 49 @FLAGS@
50 -F $flags 50 -G $flags
51 #end if
52 #if str($exclusive_filter) != 'None':
53 #set $filter = $exclusive_filter_all
54 @FLAGS@
55 -G $flags
56 #end if
57 #if 's' in str($outputs): 51 #if 's' in str($outputs):
58 -s singletons.$output_fmt_cond.output_fmt_select 52 -s singletons.$output_fmt_cond.output_fmt_select
59 #end if 53 #end if
60 #if str($idxout_cond.idxout_select) == 'yes': 54 #if str($idxout_cond.idxout_select) == 'yes':
61 #if str($idxout_cond.write1st) == 'yes': 55 #if str($idxout_cond.write1st) == 'yes':
73 #if str($idxout_cond.quality_tag) != '': 67 #if str($idxout_cond.quality_tag) != '':
74 --quality-tag $idxout_cond.quality_tag 68 --quality-tag $idxout_cond.quality_tag
75 #end if 69 #end if
76 #end if 70 #end if
77 71
78 input 72 input
79 73
80 #if str($outputs)=='None' or 'other' in str($outputs): 74 #if str($outputs)=='None' or 'other' in str($outputs):
81 ## since currently stdout in not zipped (samtools doesn't know about the extension) 75 ## since currently stdout in not zipped (samtools doesn't know about the extension)
82 #if str($output_fmt_cond.output_fmt_select).endswith('.gz'): 76 #if str($output_fmt_cond.output_fmt_select).endswith('.gz'):
83 | gzip - 77 | gzip -
84 #end if 78 #end if
85 > output.$output_fmt_cond.output_fmt_select 79 > output.$output_fmt_cond.output_fmt_select
86 && ln -s output.$output_fmt_cond.output_fmt_select output 80 && ln -s output.$output_fmt_cond.output_fmt_select output
87 #else 81 #else
88 ## otherwise the remaining sequences would show up in the datasets info box 82 ## otherwise the remaining sequences would show up in the datasets info box
146 <option value="" selected="True">no</option> 140 <option value="" selected="True">no</option>
147 <option value="-n">Do not append /1 and /2 to read names</option> 141 <option value="-n">Do not append /1 and /2 to read names</option>
148 <option value="-N">always append /1 and /2 to read name</option> 142 <option value="-N">always append /1 and /2 to read name</option>
149 </param> 143 </param>
150 <param name="inclusive_filter" argument="-f" type="select" multiple="True" label="Require that these flags are set"> 144 <param name="inclusive_filter" argument="-f" type="select" multiple="True" label="Require that these flags are set">
151 <expand macro="flag_options" /> 145 <expand macro="flag_options"/>
152 </param> 146 </param>
153 <param name="exclusive_filter" argument="-F" type="select" multiple="True" label="Exclude reads with any of the following flags set"> 147 <param name="exclusive_filter" argument="-F" type="select" multiple="True" label="Exclude reads with any of the following flags set">
154 <expand macro="flag_options" /> 148 <expand macro="flag_options" s256="true" s2048="true"/>
155 </param> 149 </param>
156 <param name="exclusive_filter_all" argument="-G" type="select" multiple="True" label="Exclude reads with all of the following flags set"> 150 <param name="exclusive_filter_all" argument="-G" type="select" multiple="True" label="Exclude reads with all of the following flags set">
157 <expand macro="flag_options" /> 151 <expand macro="flag_options" />
158 </param> 152 </param>
159 153
268 <param name="outputs" value="r0,r1,r2" /> 262 <param name="outputs" value="r0,r1,r2" />
269 <output name="nonspecific" file="samtools_fastx-out3-1.fasta" ftype="fasta" /> 263 <output name="nonspecific" file="samtools_fastx-out3-1.fasta" ftype="fasta" />
270 <output name="forward" file="samtools_fastx-out3-2.fasta" ftype="fasta" /> 264 <output name="forward" file="samtools_fastx-out3-2.fasta" ftype="fasta" />
271 <output name="reverse" file="samtools_fastx-out3-3.fasta" ftype="fasta" /> 265 <output name="reverse" file="samtools_fastx-out3-3.fasta" ftype="fasta" />
272 </test> 266 </test>
273 <!-- tests from original Galaxy tool with gz output. for some reason gzip (which is used 267 <!-- tests from original Galaxy tool with gz output. for some reason gzip (which is used
274 for compressing stdout does not give exactly the same file contents .. the other 268 for compressing stdout does not give exactly the same file contents .. the other
275 compressed files seem to)--> 269 compressed files seem to)-->
276 <test> 270 <test>
277 <param name="input" value="samtools_fastx-in1.bam" ftype="bam" /> 271 <param name="input" value="samtools_fastx-in1.bam" ftype="bam" />
278 <conditional name="output_fmt_cond"> 272 <conditional name="output_fmt_cond">
279 <param name="output_fmt_select" value="fasta.gz" /> 273 <param name="output_fmt_select" value="fasta.gz" />
280 </conditional> 274 </conditional>
281 <param name="outputs" value="other" /> 275 <param name="outputs" value="other" />
282 <output name="output" file="samtools_fastx-out1.fasta.gz" ftype="fasta.gz" compare="sim_size" /> 276 <output name="output" file="samtools_fastx-out1.fasta.gz" ftype="fasta.gz" decompress="true"/>
283 </test> 277 </test>
284 <test> 278 <test>
285 <param name="input" value="samtools_fastx-in2.bam" ftype="bam" /> 279 <param name="input" value="samtools_fastx-in2.bam" ftype="bam" />
286 <conditional name="output_fmt_cond"> 280 <conditional name="output_fmt_cond">
287 <param name="output_fmt_select" value="fastqsanger.gz" /> 281 <param name="output_fmt_select" value="fastqsanger.gz" />
288 </conditional> 282 </conditional>
289 <param name="outputs" value="r0,r1,r2" /> 283 <param name="outputs" value="r0,r1,r2" />
290 <output name="nonspecific" file="samtools_fastx-out2-1.fastq.gz" ftype="fastqsanger.gz" /> 284 <output name="nonspecific" file="samtools_fastx-out2-1.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
291 <output name="forward" file="samtools_fastx-out2-2.fastq.gz" ftype="fastqsanger.gz" /> 285 <output name="forward" file="samtools_fastx-out2-2.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
292 <output name="reverse" file="samtools_fastx-out2-3.fastq.gz" ftype="fastqsanger.gz" /> 286 <output name="reverse" file="samtools_fastx-out2-3.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
293 </test> 287 </test>
294 <test> 288 <test>
295 <param name="input" value="samtools_fastx-in3.sam" ftype="sam" /> 289 <param name="input" value="samtools_fastx-in3.sam" ftype="sam" />
296 <conditional name="output_fmt_cond"> 290 <conditional name="output_fmt_cond">
297 <param name="output_fmt_select" value="fasta.gz" /> 291 <param name="output_fmt_select" value="fasta.gz" />
298 </conditional> 292 </conditional>
299 <param name="outputs" value="r0,r1,r2" /> 293 <param name="outputs" value="r0,r1,r2" />
300 <output name="nonspecific" file="samtools_fastx-out3-1.fasta.gz" ftype="fasta.gz" /> 294 <output name="nonspecific" file="samtools_fastx-out3-1.fasta.gz" ftype="fasta.gz" decompress="true" />
301 <output name="forward" file="samtools_fastx-out3-2.fasta.gz" ftype="fasta.gz" /> 295 <output name="forward" file="samtools_fastx-out3-2.fasta.gz" ftype="fasta.gz" decompress="true" />
302 <output name="reverse" file="samtools_fastx-out3-3.fasta.gz" ftype="fasta.gz" /> 296 <output name="reverse" file="samtools_fastx-out3-3.fasta.gz" ftype="fasta.gz" decompress="true" />
303 </test> 297 </test>
304 <!-- tests from: https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2313--> 298 <!-- tests from: https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2313-->
305 <!--# basic 2 output test without singleton tracking--> 299 <!--# basic 2 output test without singleton tracking-->
306 <!--test_cmd($opts, out=>'bam2fq/1.stdout.expected', out_map=>{'1.fq' => 'bam2fq/1.1.fq.expected', '2.fq' => 'bam2fq/1.2.fq.expected'},cmd=>"$$opts{bin}/samtools fastq @$threads -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.001.sam");--> 300 <!--test_cmd($opts, out=>'bam2fq/1.stdout.expected', out_map=>{'1.fq' => 'bam2fq/1.1.fq.expected', '2.fq' => 'bam2fq/1.2.fq.expected'},cmd=>"$$opts{bin}/samtools fastq @$threads -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.001.sam");-->
307 <test> 301 <test>
474 <conditional name="output_fmt_cond"> 468 <conditional name="output_fmt_cond">
475 <param name="output_fmt_select" value="fastqsanger" /> 469 <param name="output_fmt_select" value="fastqsanger" />
476 <param name="ilumina_casava" value="-i" /> 470 <param name="ilumina_casava" value="-i" />
477 </conditional> 471 </conditional>
478 <param name="outputs" value="r1,r2,s,other" /> 472 <param name="outputs" value="r1,r2,s,other" />
473 <conditional name="idxout_cond">
474 <param name="idxout_select" value="yes"/>
475 <param name="index_format" value="n2i2"/>
476 </conditional>
479 <param name="copy_tags" value="-t" /> 477 <param name="copy_tags" value="-t" />
480 <param name="copy_arb_tags" value="MD,ia" /> 478 <param name="copy_arb_tags" value="MD,ia" />
481 <param name="read_numbering" value="-N"/> 479 <param name="read_numbering" value="-N"/>
482 <output name="forward" file="7.1.fq.expected" ftype="fastqsanger" /> 480 <output name="forward" file="11.1.fq.expected" ftype="fastqsanger" />
483 <output name="reverse" file="7.2.fq.expected" ftype="fastqsanger" /> 481 <output name="reverse" file="11.2.fq.expected" ftype="fastqsanger" />
484 <output name="singletons" file="7.s.fq.expected" ftype="fastqsanger" /> 482 <output name="singletons" file="11.s.fq.expected" ftype="fastqsanger" />
485 <output name="output" file="2.stdout.expected" ftype="fastqsanger" /> 483 <output name="output" file="2.stdout.expected" ftype="fastqsanger" />
486 </test> 484 </test>
487 <!--# -i flag with index--> 485 <!--# -i flag with index-->
488 <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/8.1.fq.expected', '2.fq' => 'bam2fq/8.2.fq.expected', 's.fq' => 'bam2fq/8.s.fq.expected', 'i.fq' => 'bam2fq/8.i.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -i \-\-index-format 'n2i2' \-\-i1 $$opts{path}/i.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.004.sam");--> 486 <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/8.1.fq.expected', '2.fq' => 'bam2fq/8.2.fq.expected', 's.fq' => 'bam2fq/8.s.fq.expected', 'i.fq' => 'bam2fq/8.i.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -i \-\-index-format 'n2i2' \-\-i1 $$opts{path}/i.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.004.sam");-->
489 <test> 487 <test>