comparison macros.xml @ 4:09cf5c1fc10c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 3edcac645f34d5a94884dedaf95c5774f4afc5c7
author iuc
date Sat, 11 Mar 2017 18:00:37 -0500
parents 71186bb66ca2
children f11399ed4341
comparison
equal deleted inserted replaced
3:71186bb66ca2 4:09cf5c1fc10c
1
2 <macros> 1 <macros>
3 <token name="@VERSION@">1.3</token> 2 <token name="@VERSION@">1.3.1</token>
4 <xml name="stdio"> 3 <xml name="stdio">
5 <stdio> 4 <stdio>
6 <exit_code range="1:" /> 5 <exit_code range="1:" />
7 <exit_code range=":-1" /> 6 <exit_code range=":-1" />
8 <regex match="Error:" /> 7 <regex match="Error:" />
9 <regex match="Exception:" /> 8 <regex match="Exception:" />
10 </stdio> 9 </stdio>
11 </xml> 10 </xml>
12 <xml name="requirements"> 11 <xml name="requirements">
13 <requirements> 12 <requirements>
14 <requirement type="package" version="1.3">bcftools</requirement> 13 <requirement type="package" version="1.3.1">bcftools</requirement>
15 <!-- conda dependency --> 14 <!-- conda dependency -->
16 <requirement type="package" version="1.3">htslib</requirement> 15 <requirement type="package" version="1.3.2">htslib</requirement>
17 <!-- htslib provides tabix and bgzip 16 <yield />
18 <requirement type="package" version="0.2.6">tabix</requirement>
19 -->
20 <requirement type="package" version="1.2">samtools</requirement>
21 </requirements> 17 </requirements>
22 </xml> 18 </xml>
23 <xml name="version_command"> 19 <xml name="version_command">
24 <version_command>bcftools 2&gt;&amp;1 | grep 'Version:'</version_command> 20 <version_command>bcftools 2&gt;&amp;1 | grep 'Version:'</version_command>
25 </xml> 21 </xml>
46 <token name="@PREPARE_INPUT_FILE@"> 42 <token name="@PREPARE_INPUT_FILE@">
47 <![CDATA[ 43 <![CDATA[
48 ## May need to symlink input if there is an associated 44 ## May need to symlink input if there is an associated
49 #set $input_vcf = 'input.vcf.gz' 45 #set $input_vcf = 'input.vcf.gz'
50 #if $input_file.is_of_type('vcf') 46 #if $input_file.is_of_type('vcf')
51 bgzip -c "$input_file" > $input_vcf && 47 bgzip -c '$input_file' > $input_vcf &&
52 bcftools index $input_vcf && 48 bcftools index $input_vcf &&
53 #elif $input_file.is_of_type('vcf_bgzip') 49 #elif $input_file.is_of_type('vcf_bgzip')
54 ln -s "$input_file" $input_vcf 50 ln -s '$input_file' $input_vcf
55 #elif $input_file.is_of_type('bcf') 51 #elif $input_file.is_of_type('bcf')
56 #set $input_vcf = 'input.bcf' 52 #set $input_vcf = 'input.bcf'
57 ln -s "$input_file" $input_vcf && 53 ln -s '$input_file' $input_vcf &&
58 #if $input_file.metadata.bcf_index: 54 #if $input_file.metadata.bcf_index:
59 ln -s $input_file.metadata.bcf_index ${input_vcf}.csi && 55 ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi &&
60 #else 56 #else
61 bcftools index $input_vcf && 57 bcftools index $input_vcf &&
62 #end if 58 #end if
63 #elif $input_file.is_of_type('bcf_bgzip') 59 #elif $input_file.is_of_type('bcf_bgzip')
64 ln -s "$input_file" $input_vcf 60 ln -s '$input_file' $input_vcf
65 #end if 61 #end if
66 ]]> 62 ]]>
67 </token> 63 </token>
68 <token name="@INPUT_FILE@"> 64 <token name="@INPUT_FILE@">
69 $input_vcf 65 $input_vcf
75 <token name="@PREPARE_INPUT_FILES@"> 71 <token name="@PREPARE_INPUT_FILES@">
76 <![CDATA[ 72 <![CDATA[
77 ## May need to symlink input if there is an associated 73 ## May need to symlink input if there is an associated
78 #set $input_vcfs = [] 74 #set $input_vcfs = []
79 #set $vcfs_list_file = 'vcfs_list' 75 #set $vcfs_list_file = 'vcfs_list'
80 #for (i,input_file) in enumerate($input_files): 76 #for (i, input_file) in enumerate($input_files):
81 #set $input_vcf = 'input' + str($i) + '.vcf.gz' 77 #set $input_vcf = 'input' + str($i) + '.vcf.gz'
82 #if $input_file.is_of_type('vcf') 78 #if $input_file.is_of_type('vcf')
83 bgzip -c "$input_file" > $input_vcf && 79 bgzip -c '$input_file' > $input_vcf &&
84 bcftools index $input_vcf && 80 bcftools index $input_vcf &&
85 #elif $input_file.is_of_type('vcf_bgz') 81 #elif $input_file.is_of_type('vcf_bgz')
86 ln -s "$input_file" $input_vcf 82 ln -s '$input_file' $input_vcf
87 #elif $input_file.is_of_type('bcf') 83 #elif $input_file.is_of_type('bcf')
88 #set $input_vcf = 'input' + str($i) + '.bcf.gz' 84 #set $input_vcf = 'input' + str($i) + '.bcf.gz'
89 ## bgzip -c "$input_file" > $input_vcf && 85 ln -s '$input_file' $input_vcf &&
90 ln -s "$input_file" $input_vcf &&
91 #if $input_file.metadata.bcf_index: 86 #if $input_file.metadata.bcf_index:
92 ln -s $input_file.metadata.bcf_index ${input_vcf}.csi && 87 ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi &&
93 #else 88 #else
94 bcftools index $input_vcf && 89 bcftools index $input_vcf &&
95 #end if 90 #end if
96 #elif $input_file.is_of_type('bcfvcf_bgz') 91 #elif $input_file.is_of_type('bcfvcf_bgz')
97 ln -s "$input_file" $input_vcf && 92 ln -s '$input_file' $input_vcf &&
98 #end if 93 #end if
99 echo '$input_vcf' >> $vcfs_list_file && 94 echo '$input_vcf' >> $vcfs_list_file &&
100 $input_vcfs.append($input_vcf) 95 $input_vcfs.append($input_vcf)
101 #end for 96 #end for
102 ]]> 97 ]]>
107 <token name="@INPUT_LIST_FILE@"> 102 <token name="@INPUT_LIST_FILE@">
108 $vcfs_list_file 103 $vcfs_list_file
109 </token> 104 </token>
110 105
111 <xml name="macro_fasta_ref"> 106 <xml name="macro_fasta_ref">
112 <param name="fasta_ref" type="data" format="data" label="Fasta Ref" optional="True" help="reference sequence in fasta format" /> 107 <param name="fasta_ref" argument="--fasta-ref" type="data" format="data" label="Reference sequence in FASTA format" optional="True" />
113 </xml> 108 </xml>
114 <token name="@PREPARE_FASTA_REF@"> 109 <token name="@PREPARE_FASTA_REF@">
115 <![CDATA[ 110 <![CDATA[
116 #set $input_fa_ref = None 111 #set $input_fa_ref = None
117 #if 'fasta_ref' in $section and $section.fasta_ref: 112 #if 'fasta_ref' in $section and $section.fasta_ref:
118 #set $input_fa_ref = 'ref.fa' 113 #set $input_fa_ref = 'ref.fa'
119 ln -s $section.fasta_ref $input_fa_ref && 114 ln -s '$section.fasta_ref' $input_fa_ref &&
120 samtools faidx $input_fa_ref && 115 samtools faidx $input_fa_ref &&
121 #end if 116 #end if
122 ]]> 117 ]]>
123 </token> 118 </token>
124 <token name="@FASTA_REF@"> 119 <token name="@FASTA_REF@">
125 #if $input_fa_ref is not None: 120 #if $input_fa_ref is not None:
126 --fasta-ref "$input_fa_ref" 121 --fasta-ref $input_fa_ref
127 #elif 'fasta_ref' in $section and $section.fasta_ref: 122 #elif 'fasta_ref' in $section and $section.fasta_ref:
128 --fasta-ref "${section.fasta_ref}" 123 --fasta-ref '${section.fasta_ref}'
129 #end if 124 #end if
130 </token> 125 </token>
131 126
132 <xml name="macro_ref_fasta"> 127 <xml name="macro_ref_fasta">
133 <conditional name="reference_source"> 128 <conditional name="reference_source">
149 </conditional> 144 </conditional>
150 </xml> 145 </xml>
151 146
152 147
153 <xml name="macro_AF_file"> 148 <xml name="macro_AF_file">
154 <param name="AF_file" type="data" format="data" label="Af File" optional="True" help="read allele frequencies from file (CHR\tPOS\tREF,ALT\tAF)" /> 149 <param name="AF_file" argument="--AF-file" type="data" format="tabular" label="Allele frequencies file" optional="True" help="Tab-delimited file containing the columns CHR,POS,REF,ALT,AF" />
155 </xml> 150 </xml>
156 <!-- This may need to bgzip and tabix the file --> 151 <!-- This may need to bgzip and tabix the file -->
157 <token name="@PREPARE_AF_FILE@"> 152 <token name="@PREPARE_AF_FILE@">
158 <![CDATA[ 153 <![CDATA[
159 #if 'AF_file' in $section and $section.AF_file: 154 #if 'AF_file' in $section and $section.AF_file:
160 #pass 155 #pass
161 #end if 156 #end if
162 ]]> 157 ]]>
163 </token> 158 </token>
164 <token name="@AF_FILE@"> 159 <token name="@AF_FILE@">
165 #if 'AF_file' in $section and $section.AF_file: 160 #if 'AF_file' in $section and $section.AF_file:
166 --AF-file "${section.AF_file}" 161 --AF-file '${section.AF_file}'
167 #end if 162 #end if
168 </token> 163 </token>
169 164
170 <xml name="macro_estimate_AF"> 165 <xml name="macro_estimate_AF">
171 <param name="estimate_AF" type="data" format="data" label="Estimate Af" optional="True" help="calculate AC,AN counts on the fly, using either all samples (&quot;-&quot;) or samples listed in &lt;file&gt;" /> 166 <param name="estimate_AF" argument="--estimate-AF" type="data" format="data" label="Estimate allele frequency" optional="True" help="calculate AC,AN counts on the fly, using either all samples (&quot;-&quot;) or samples listed in &lt;file&gt;" />
172 </xml> 167 </xml>
173 <token name="@ESTIMATE_AF@"> 168 <token name="@ESTIMATE_AF@">
174 #if 'estimate_AF' in $section and $section.estimate_AF: 169 #if 'estimate_AF' in $section and $section.estimate_AF:
175 --estimate-AF "${section.estimate_AF}" 170 --estimate-AF "${section.estimate_AF}"
176 #end if 171 #end if
220 <yield/> 215 <yield/>
221 </param> 216 </param>
222 </xml> 217 </xml>
223 <token name="@COLLAPSE@"> 218 <token name="@COLLAPSE@">
224 #if $section.collapse: 219 #if $section.collapse:
225 --collapse "${section.collapse}" 220 --collapse ${section.collapse}
226 #end if 221 #end if
227 </token> 222 </token>
228 223
229 <xml name="macro_apply_filters"> 224 <xml name="macro_apply_filters">
230 <param name="apply_filters" type="text" value="" label="Apply Filters" optional="true" 225 <param name="apply_filters" type="text" value="" label="Apply Filters" optional="true"
232 <validator type="regex" message="FILTER terms separated by commas">^([^ \t\n\r\f\v,]+(,[^ \t\n\r\f\v,]+)*)?$</validator> 227 <validator type="regex" message="FILTER terms separated by commas">^([^ \t\n\r\f\v,]+(,[^ \t\n\r\f\v,]+)*)?$</validator>
233 </param> 228 </param>
234 </xml> 229 </xml>
235 <token name="@APPLY_FILTERS@"> 230 <token name="@APPLY_FILTERS@">
236 #if $section.apply_filters: 231 #if $section.apply_filters:
237 --apply-filters "${section.apply_filters}" 232 --apply-filters '${section.apply_filters}'
238 #end if 233 #end if
239 </token> 234 </token>
240 235
241 <xml name="macro_select_output_type"> 236 <xml name="macro_select_output_type">
242 <param name="output_type" type="select"> 237 <param name="output_type" type="select">
284 </when> 279 </when>
285 </conditional> 280 </conditional>
286 </xml> 281 </xml>
287 <token name="@REGIONS@"> 282 <token name="@REGIONS@">
288 #if $section.regions.regions_src == 'regions' and $section.regions.regions != '': 283 #if $section.regions.regions_src == 'regions' and $section.regions.regions != '':
289 --regions "$section.regions.regions" 284 --regions '$section.regions.regions'
290 #elif $section.regions.regions_src == 'regions_file' and $section.regions.regions_file: 285 #elif $section.regions.regions_src == 'regions_file' and $section.regions.regions_file:
291 --regions-file "$section.regions.regions_file" 286 --regions-file '$section.regions.regions_file'
292 #end if 287 #end if
293 </token> 288 </token>
294 289
295 <xml name="macro_targets_file"> 290 <xml name="macro_targets_file">
296 <param name="targets_file" type="data" format="tabular" label="Targets File" help="restrict to targets listed in a file" > 291 <param name="targets_file" type="data" format="tabular" label="Targets File" help="restrict to targets listed in a file" >
349 <![CDATA[ 344 <![CDATA[
350 #if $targets_path: 345 #if $targets_path:
351 --targets-file "${section.targets.invert_targets_file}${targets_path}" 346 --targets-file "${section.targets.invert_targets_file}${targets_path}"
352 #else: 347 #else:
353 #if $section.targets.targets_src == 'targets' and $section.targets.targets != '': 348 #if $section.targets.targets_src == 'targets' and $section.targets.targets != '':
354 --targets "${section.targets.invert_targets_file}${section.targets.targets}" 349 --targets '${section.targets.invert_targets_file}${section.targets.targets}'
355 #elif $section.targets.targets_src == 'targets_file' and $section.targets.targets_file: 350 #elif $section.targets.targets_src == 'targets_file' and $section.targets.targets_file:
356 --targets-file "${section.targets.invert_targets_file}${section.targets.targets_file}" 351 --targets-file "${section.targets.invert_targets_file}${section.targets.targets_file}"
357 #end if 352 #end if
358 #end if 353 #end if
359 ]]> 354 ]]>
373 </xml> 368 </xml>
374 <token name="@SAMPLES@"> 369 <token name="@SAMPLES@">
375 #set $samples_defined = False 370 #set $samples_defined = False
376 #if str($section.samples) != '': 371 #if str($section.samples) != '':
377 #set $samples_defined = True 372 #set $samples_defined = True
378 --samples "${section.invert_samples}${section.samples}" 373 --samples '${section.invert_samples}${section.samples}'
379 #end if 374 #end if
380 #if $section.samples_file: 375 #if $section.samples_file:
381 #set $samples_defined = True 376 #set $samples_defined = True
382 --samples-file "${section.invert_samples_file}${section.samples_file}" 377 --samples-file "${section.invert_samples_file}${section.samples_file}"
383 #end if 378 #end if
386 <xml name="macro_sample"> 381 <xml name="macro_sample">
387 <param name="sample" type="text" label="Sample" optional="True" help="apply variants of the given sample" /> 382 <param name="sample" type="text" label="Sample" optional="True" help="apply variants of the given sample" />
388 </xml> 383 </xml>
389 <token name="@SAMPLE@"> 384 <token name="@SAMPLE@">
390 #if $section.sample: 385 #if $section.sample:
391 --sample "${section.sample}" 386 --sample '${section.sample}'
392 #end if 387 #end if
393 </token> 388 </token>
394 389
395 390
396 <xml name="macro_include"> 391 <xml name="macro_include">
423 <validator type="regex" message="COLUMN names separated by commas">^([^,]+(,[^,]+)*)?$</validator> 418 <validator type="regex" message="COLUMN names separated by commas">^([^,]+(,[^,]+)*)?$</validator>
424 </param> 419 </param>
425 </xml> 420 </xml>
426 <token name="@COLUMNS@"> 421 <token name="@COLUMNS@">
427 #if $section.columns != '': 422 #if $section.columns != '':
428 --columns "${section.columns}" 423 --columns '${section.columns}'
429 #end if 424 #end if
430 </token> 425 </token>
431 426
432 <xml name="macro_haploid2diploid"> 427 <xml name="macro_haploid2diploid">
433 <param name="haploid2diploid" type="boolean" truevalue="--haploid2diploid" falsevalue="" label="Haploid2Diploid" help="convert haploid genotypes to diploid homozygotes" /> 428 <param name="haploid2diploid" type="boolean" truevalue="--haploid2diploid" falsevalue="" label="Haploid2Diploid" help="convert haploid genotypes to diploid homozygotes" />
451 and VCF<->BCF conversion. 446 and VCF<->BCF conversion.
452 447
453 This Galaxy tool recommends using the compressed BCF format 448 This Galaxy tool recommends using the compressed BCF format
454 as piping is not implemented, and uncompressed data would 449 as piping is not implemented, and uncompressed data would
455 use unnecessary amounts of space. 450 use unnecessary amounts of space.
456 451 ]]></token>
457 ]]></token>
458 <token name="@REGIONS_HELP@"> 452 <token name="@REGIONS_HELP@">
459 <![CDATA[ 453 <![CDATA[
460 Region Selections 454 Region Selections
461 ----------------- 455 -----------------
462 456
473 chromosomes, the VCF will always be processed in ascending 467 chromosomes, the VCF will always be processed in ascending
474 genomic coordinate order no matter what order they appear in 468 genomic coordinate order no matter what order they appear in
475 FILE. Note that overlapping regions in FILE can result in 469 FILE. Note that overlapping regions in FILE can result in
476 duplicated out of order positions in the output. This option 470 duplicated out of order positions in the output. This option
477 requires indexed VCF/BCF files. 471 requires indexed VCF/BCF files.
478 472 ]]></token>
479 ]]></token>
480 <token name="@TARGETS_HELP@"><![CDATA[ 473 <token name="@TARGETS_HELP@"><![CDATA[
481 Targets 474 Targets
482 ------- 475 -------
483 476
484 Similar to regions, but the next position is accessed by streaming the whole 477 Similar to regions, but the next position is accessed by streaming the whole
539 | both | abbreviation of "-c indels -c snps" | 532 | both | abbreviation of "-c indels -c snps" |
540 +------------+----------------------------------------------------------------+ 533 +------------+----------------------------------------------------------------+
541 | id | only records with identical ID column are compatible. | 534 | id | only records with identical ID column are compatible. |
542 | | Supportedby bcftools merge only. | 535 | | Supportedby bcftools merge only. |
543 +------------+----------------------------------------------------------------+ 536 +------------+----------------------------------------------------------------+
544
545 </token> 537 </token>
546 538
547 <token name="@EXPRESSIONS_HELP@"> 539 <token name="@EXPRESSIONS_HELP@">
548 <![CDATA[ 540 <![CDATA[
549 Expressions 541 Expressions
664 TYPE="snp" && QUAL>=10 && (DP4[2]+DP4[3] > 2) 656 TYPE="snp" && QUAL>=10 && (DP4[2]+DP4[3] > 2)
665 MIN(DP)>35 && AVG(GQ)>50 657 MIN(DP)>35 && AVG(GQ)>50
666 ID=@file .. selects lines with ID present in the file 658 ID=@file .. selects lines with ID present in the file
667 ID!=@~/file .. skip lines with ID present in the ~/file 659 ID!=@~/file .. skip lines with ID present in the ~/file
668 MAF[0]<0.05 .. select rare variants at 5% cutoff 660 MAF[0]<0.05 .. select rare variants at 5% cutoff
669 661 ]]></token>
670 ]]></token>
671
672
673
674
675 </macros> 662 </macros>