annotate macros.xml @ 0:1d4c51dcbbbe draft

Uploaded
author greg
date Wed, 19 Dec 2018 08:58:27 -0500
parents
children bb0f975d69b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
1 <macros>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
2 <token name="@VERSION@">1.4.0</token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
3 <xml name="requirements">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
4 <requirements>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
5 <requirement type="package" version="1.9">bcftools</requirement>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
6 <requirement type="package" version="1.9">htslib</requirement>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
7 <yield />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
8 </requirements>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
9 </xml>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
10 <xml name="citations">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
11 <citations>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
12 <citation type="doi">10.1093/bioinformatics/btp352</citation>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
13 <yield />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
14 </citations>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
15 </xml>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
16 <token name="@THREADS@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
17 --threads \${GALAXY_SLOTS:-4}
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
18 </token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
19 <token name="@PREPARE_ENV@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
20 <![CDATA[
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
21 export BCFTOOLS_PLUGINS=`which bcftools | sed 's,bin/bcftools,libexec/bcftools,'`;
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
22 ]]>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
23 </token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
24 <xml name="macro_input">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
25 <param name="input_file" type="data" format="vcf,vcf_bgzip,bcf,bcf_bgzip" label="VCF/BCF Data" />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
26 </xml>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
27 <token name="@PREPARE_INPUT_FILE@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
28 <![CDATA[
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
29 ## May need to symlink input if there is an associated
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
30 #set $input_vcf = 'input.vcf.gz'
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
31 #if $input_file.is_of_type('vcf')
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
32 bgzip -c '$input_file' > $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
33 bcftools index $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
34 #elif $input_file.is_of_type('vcf_bgzip')
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
35 ln -s '$input_file' $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
36 #elif $input_file.is_of_type('bcf')
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
37 #set $input_vcf = 'input.bcf'
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
38 ln -s '$input_file' $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
39 #if $input_file.metadata.bcf_index:
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
40 ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
41 #else
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
42 bcftools index $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
43 #end if
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
44 #elif $input_file.is_of_type('bcf_bgzip')
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
45 ln -s '$input_file' $input_vcf &&
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
46 #end if
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
47 ]]>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
48 </token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
49 <token name="@INPUT_FILE@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
50 $input_vcf
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
51 </token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
52 <xml name="macro_select_output_type">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
53 <param name="output_type" type="select">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
54 <option value="b">compressed BCF</option>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
55 <option value="u">uncompressed BCF</option>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
56 <option value="z">compressed VCF</option>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
57 <option value="v">uncompressed VCF</option>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
58 </param>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
59 </xml>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
60 <token name="@OUTPUT_TYPE@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
61 #if str($output_type) != "__none__":
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
62 --output-type '${output_type}'
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
63 #end if
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
64 </token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
65
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
66 <xml name="macro_vcf_output">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
67 <data name="output_file" format="vcf">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
68 <change_format>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
69 <when input="output_type" value="b" format="bcf" />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
70 <when input="output_type" value="u" format="bcf" />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
71 <when input="output_type" value="z" format="vcf_bgzip" />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
72 <when input="output_type" value="v" format="vcf" />
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
73 </change_format>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
74 </data>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
75 </xml>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
76
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
77 <token name="@OUTPUT_HELP@">
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
78 <![CDATA[
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
79 Output Type
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
80 -----------
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
81
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
82 Output compressed BCF (b), or uncompressed VCF (v).
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
83 Use the BCF option when piping between bcftools subcommands to speed up
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
84 performance by removing unecessary compression/decompression
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
85 and VCF<->BCF conversion.
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
86
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
87 This Galaxy tool recommends using the compressed BCF format
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
88 as piping is not implemented, and uncompressed data would
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
89 use unnecessary amounts of space.
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
90 ]]></token>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
91 </macros>
1d4c51dcbbbe Uploaded
greg
parents:
diff changeset
92