comparison bcftools_convert_from_vcf.xml @ 16:9b29129fb491 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit db275932cbb485cb44ae91e0b421d6f57698db49
author iuc
date Tue, 20 Sep 2022 12:56:02 +0000
parents 34585fd4bd3e
children d58d2e8c7a57
comparison
equal deleted inserted replaced
15:1137ce8efc1e 16:9b29129fb491
1 <?xml version='1.0' encoding='utf-8'?> 1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@ from vcf" id="bcftools_@EXECUTABLE@_from_vcf" version="@TOOL_VERSION@"> 2 <tool name="bcftools @EXECUTABLE@ from vcf" id="bcftools_@EXECUTABLE@_from_vcf" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
3 <description>Converts VCF/BCF to IMPUTE2/SHAPEIT formats</description> 3 <description>Converts VCF/BCF to IMPUTE2/SHAPEIT formats</description>
4 <macros> 4 <macros>
5 <token name="@EXECUTABLE@">convert</token> 5 <token name="@EXECUTABLE@">convert</token>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
7 <xml name="macro_vcf_ids"> 7 <xml name="macro_vcf_ids">
55 @PREPARE_REGIONS_FILE@ 55 @PREPARE_REGIONS_FILE@
56 56
57 bcftools @EXECUTABLE@ 57 bcftools @EXECUTABLE@
58 58
59 #if $convert.convert_to == 'gen_sample': 59 #if $convert.convert_to == 'gen_sample':
60 --tag $convert.tag $convert.chrom $convert.vcf_ids 60 --tag $convert.tag $convert.convert_3N6 $convert.vcf_ids ## chrom option has been deprecated
61 --gensample "$output_gen,$output_samples" 61 --gensample "$output_gen,$output_samples"
62 #elif $convert.convert_to == 'hap_sample': 62 #elif $convert.convert_to == 'hap_sample':
63 $convert.vcf_ids $convert.haploid2diploid 63 $convert.vcf_ids $convert.haploid2diploid
64 --hapsample "$output_hap,$output_samples" 64 --hapsample "$output_hap,$output_samples"
65 #elif $convert.convert_to == 'hap_legend_sample': 65 #elif $convert.convert_to == 'hap_legend_sample':
66 $convert.vcf_ids $convert.haploid2diploid 66 $convert.vcf_ids $convert.haploid2diploid
67 --haplegendsample "$output_hap,$output_legend,$output_samples" 67 --haplegendsample "$output_hap,$output_legend,$output_samples"
68 #end if 68 #end if
69 @SAMPLE_SEX@ 69 @SAMPLE_SEX@
70 70
71 #if $keep_duplicates
72 --keep-duplicates $keep_duplicates
73 #end if
74
71 ## VCF input section 75 ## VCF input section
72 #set $section = $sec_restrict 76 #set $section = $sec_restrict
73 @INCLUDE@ 77 @INCLUDE@
74 @EXCLUDE@ 78 @EXCLUDE@
75 @REGIONS@ 79 @REGIONS@
76 @TARGETS@ 80 @TARGETS@
77 @SAMPLES@ 81 @SAMPLES@
82
78 83
79 ## Primary Input/Outputs 84 ## Primary Input/Outputs
80 "$input_file" . 85 "$input_file" .
81 ]]> 86 ]]>
82 </command> 87 </command>
93 <expand macro="macro_restrict" type="target" label_type="Target" /> 98 <expand macro="macro_restrict" type="target" label_type="Target" />
94 <expand macro="macro_samples" /> 99 <expand macro="macro_samples" />
95 <expand macro="macro_include" /> 100 <expand macro="macro_include" />
96 <expand macro="macro_exclude" /> 101 <expand macro="macro_exclude" />
97 </section> 102 </section>
103 <param argument="--keep-duplicates" type="boolean" truevalue="--keep-duplicates" falsevalue="" checked="false" label="Keep duplicates" help="Keep all multiallelic variants" />
98 <conditional name="convert"> 104 <conditional name="convert">
99 <param name="convert_to" type="select" label="convert to"> 105 <param name="convert_to" type="select" label="convert to">
100 <option value="gen_sample">gen sample - IMPUTE2 or SHAPEIT</option> 106 <option value="gen_sample">gen sample - IMPUTE2 or SHAPEIT</option>
101 <option value="hap_sample">hap sample - IMPUTE2 or SHAPEIT</option> 107 <option value="hap_sample">hap sample - IMPUTE2 or SHAPEIT</option>
102 <option value="hap_legend_sample">hap legend sample - IMPUTE2 or SHAPEIT</option> 108 <option value="hap_legend_sample">hap legend sample - IMPUTE2 or SHAPEIT</option>
108 <option value="GP">GP</option> 114 <option value="GP">GP</option>
109 <!-- 115 <!--
110 <option value="GL">GL</option> 116 <option value="GL">GL</option>
111 --> 117 -->
112 </param> 118 </param>
113 <param name="chrom" type="boolean" truevalue="--chrom" falsevalue="" checked="false" 119 <param name="convert_3N6" argument="--3N6" type="boolean" truevalue="--3N6" falsevalue="" checked="false" label="3N6 format" help="Use 3N+6 column format instead of the old 3N+5 column format" />
114 label="Output chromosome in first column instead of CHROM:POS_REF_ALT" help="(\-\-chrom)"/>
115 <expand macro="macro_vcf_ids"/> 120 <expand macro="macro_vcf_ids"/>
116 <expand macro="macro_sexinfo"/> 121 <expand macro="macro_sexinfo"/>
117 </when> 122 </when>
118 <when value="hap_sample"> 123 <when value="hap_sample">
119 <expand macro="macro_haploid2diploid"/> 124 <expand macro="macro_haploid2diploid"/>
156 </test> 161 </test>
157 <test> 162 <test>
158 <param name="input_file" ftype="vcf" value="convert.vcf" /> 163 <param name="input_file" ftype="vcf" value="convert.vcf" />
159 <param name="convert_to" value="gen_sample" /> 164 <param name="convert_to" value="gen_sample" />
160 <param name="tag" value="GP" /> 165 <param name="tag" value="GP" />
161 <param name="chrom" value="True" /> 166 <param name="convert_3N6" value="True" />
162 <output name="output_gen"> 167 <output name="output_gen">
163 <assert_contents> 168 <assert_contents>
164 <has_text text="X X:2698560_G_A 2698560 G A 1.00"/> 169 <has_text text="X:2698630_A_G X:2698630_A_G 2698630 A G 1.000000 0.000000 0.000000 1.000000 0.000000 0.000000 1.000000"/>
165 </assert_contents> 170 </assert_contents>
166 </output> 171 </output>
167 </test> 172 </test>
168 <test> 173 <test>
169 <param name="input_file" ftype="vcf" value="check.vcf" /> 174 <param name="input_file" ftype="vcf" value="check.vcf" />
170 <param name="convert_to" value="gen_sample" /> 175 <param name="convert_to" value="gen_sample" />
171 <param name="tag" value="GT" /> 176 <param name="tag" value="GT" />
172 <param name="chrom" value="True" /> 177 <param name="convert_3N6" value="True" />
173 <param name="vcf_ids" value="True" /> 178 <param name="vcf_ids" value="True" />
174 <output name="output_gen"> 179 <output name="output_gen">
175 <assert_contents> 180 <assert_contents>
176 <has_text text="1 id3D 3062915 GTTT G 0 1 0 0 1 0"/> 181 <has_text text="1:3062915_GTTT_G id3D 3062915 GTTT G 0 1 0 0 1 0"/>
177 </assert_contents> 182 </assert_contents>
178 </output> 183 </output>
179 </test> 184 </test>
180 <test> 185 <test>
181 <param name="input_file" ftype="vcf" value="convert.vcf" /> 186 <param name="input_file" ftype="vcf" value="convert.vcf" />
203 <assert_contents> 208 <assert_contents>
204 <has_text text="sample population group sex"/> 209 <has_text text="sample population group sex"/>
205 <has_text text="NA00001 NA00001 NA00001 2"/> 210 <has_text text="NA00001 NA00001 NA00001 2"/>
206 </assert_contents> 211 </assert_contents>
207 </output> 212 </output>
213 </test>
214 <!-- Test keep-duplicates option -->
215 <test>
216 <param name="input_file" ftype="vcf" value="convert.vcf" />
217 <param name="convert_to" value="hap_legend_sample" />
218 <param name="keep_duplicates" value="true"/>
219 <output name="output_hap">
220 <assert_contents>
221 <has_text text="1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0"/>
222 </assert_contents>
223 </output>
224 <output name="output_legend">
225 <assert_contents>
226 <has_text text="X:2698769_AAG_A 2698769 AAG A"/>
227 </assert_contents>
228 </output>
229 <output name="output_samples">
230 <assert_contents>
231 <has_text text="sample population group sex"/>
232 <has_text text="NA00001 NA00001 NA00001 2"/>
233 </assert_contents>
234 </output>
235 <assert_command>
236 <has_text text="--keep-duplicates" />
237 </assert_command>
238 </test>
239 <!-- Test region overlap -->
240 <test>
241 <param name="input_file" ftype="vcf" value="convert.vcf" />
242 <param name="convert_to" value="gen_sample" />
243 <section name="sec_restrict">
244 <param name="regions_overlap" value="1"/>
245 </section>
246 <output name="output_gen">
247 <assert_contents>
248 <has_text text="X:2698560_G_A X:2698560_G_A 2698560 G A 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0"/>
249 </assert_contents>
250 </output>
251 <output name="output_samples">
252 <assert_contents>
253 <has_text text="NA00001 NA00001 0"/>
254 </assert_contents>
255 </output>
256 <assert_command>
257 <has_text text="--regions-overlap" />
258 </assert_command>
208 </test> 259 </test>
209 </tests> 260 </tests>
210 261
211 <help><![CDATA[ 262 <help><![CDATA[
212 ===================================== 263 =====================================