upstream-extended/iuc/tools/bcftools/bcftools_plugin_setgt.xml
1<tool name="bcftools @EXECUTABLE@" id="bcftools_plugin_@PLUGIN_ID@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>plugin Sets genotypes</description>
3 <macros>
4 <token name="@EXECUTABLE@">setGT</token>
5 <token name="@PLUGIN_ID@">setgt</token>
6 <import>macros.xml</import>
7 </macros>
8 <expand macro="bio_tools" />
9 <expand macro="requirements" />
10 <expand macro="version_command" />
11 <command detect_errors="aggressive"><![CDATA[
12@PREPARE_INPUT_FILE@
13#set $section = $sec_restrict
14@PREPARE_TARGETS_FILE@
15@PREPARE_REGIONS_FILE@
16bcftools plugin @EXECUTABLE@
17
18## VCF input section
19#set $section = $sec_restrict
20@REGIONS@
21@TARGETS@
22
23@OUTPUT_TYPE@
24@THREADS@
25
26## Primary Input/Outputs
27@INPUT_FILE@
28
29## Plugin section
30#set $section = $sec_plugin
31--
32--target-gt '$section.target_gt'
33--new-gt '$section.new_gt'
34
35#set $section = $sec_restrict
36@INCLUDE@
37@EXCLUDE@
38> '$output_file'
39]]>
40 </command>
41 <inputs>
42 <expand macro="macro_input" />
43 <section name="sec_restrict" title="Restrict to">
44 <expand macro="macro_region_restrict" />
45 <expand macro="macro_target_restrict" />
46 <expand macro="macro_include" />
47 <expand macro="macro_exclude" />
48 </section>
49 <section name="sec_plugin" expanded="true" title="Plugin Options">
50 <param name="target_gt" type="select" label="Target genotypes to change">
51 <option value="./.">./. completely missing (. or ./., depending on ploidy)</option>
52 <option value="./x">./x partially missing (./0 or .|1)</option>
53 <option value=".">. partially or completely missing</option>
54 <option value="a">a all genotypes</option>
55 <option value="b">b heterozygous genotypes failing two-tailed binomial test</option>
56 <option value="q">q select genotypes using -i/-e options</option>
57 </param>
58 <param name="new_gt" type="select" label="New genotypes to set">
59 <option value=".">. missing (. or ./., keeps ploidy)</option>
60 <option value="0">0 reference allele (e.g. 0/0 or 0, keeps ploidy)</option>
61 <option value="c:GT">c:GT custom genotype (e.g. 0/0, 0, 0/1, m/M, overrides ploidy)</option>
62 <option value="c:./.">c:./. missing genotype with arbitrary ploidy</option>
63 <option value="M">M major allele</option>
64 <option value="m">m minor (the second most common) allele (e.g. 1/1 or 1, keeps ploidy)</option>
65 <option value="p">p phased genotype</option>
66 <option value="u">u unphase genotype and sort by allele (1|0 becomes 0/1)</option>
67 </param>
68 </section>
69 <expand macro="macro_select_output_type" />
70 </inputs>
71 <outputs>
72 <expand macro="macro_vcf_output" />
73 </outputs>
74 <tests>
75 <test>
76 <param name="input_file" ftype="vcf" value="plugin1.vcf" />
77 <section name="sec_plugin">
78 <param name="target_gt" value="." />
79 <param name="new_gt" value="0" />
80 </section>
81 <param name="output_type" value="v" />
82 <output name="output_file">
83 <assert_contents>
84 <has_text text="0/0:245" />
85 </assert_contents>
86 </output>
87 </test>
88 <test>
89 <param name="input_file" ftype="vcf" value="plugin1.vcf" />
90 <section name="sec_restrict">
91 <param name="exclude" value="FMT/GQ>20"/>
92 </section>
93 <section name="sec_plugin">
94 <param name="target_gt" value="q" />
95 <param name="new_gt" value="." />
96 </section>
97 <param name="output_type" value="v" />
98 <output name="output_file">
99 <assert_contents>
100 <has_text text="DP4=1,2,3,4;INDEL;STR=test" />
101 <has_n_lines n="38"/>
102 </assert_contents>
103 </output>
104 </test>
105 <test>
106 <param name="input_file" ftype="vcf" value="plugin1.vcf" />
107 <section name="sec_plugin">
108 <param name="target_gt" value="." />
109 <param name="new_gt" value="c:./." />
110 </section>
111 <param name="output_type" value="v" />
112 <output name="output_file">
113 <assert_contents>
114 <has_text text="GT" />
115 <has_text text="DP4=1,2,3,4;INDEL;STR=test" />
116 </assert_contents>
117 </output>
118 </test>
119 </tests>
120 <help><![CDATA[
121=====================================
122 bcftools @EXECUTABLE@ plugin
123=====================================
124
125@REGIONS_HELP@
126@TARGETS_HELP@
127@EXPRESSIONS_HELP@
128
129 ]]></help>
130 <expand macro="citations" />
131</tool>