comparison bcftools_norm.xml @ 0:e9555e894608 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ef90c4602bdb83ea7455946c9d175ea27284e643
author iuc
date Wed, 06 Jul 2016 07:04:29 -0400
parents
children d110fb275304
comparison
equal deleted inserted replaced
-1:000000000000 0:e9555e894608
1 <?xml version='1.0' encoding='utf-8'?>
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
3 <description>Left-align and normalize indels; check if REF alleles match the reference; split multiallelic sites into multiple rows; recover multiallelics from multiple rows</description>
4 <macros>
5 <token name="@EXECUTABLE@">norm</token>
6 <import>macros.xml</import>
7 </macros>
8 <expand macro="requirements" />
9 <expand macro="version_command" />
10 <command detect_errors="aggressive"><![CDATA[
11 @PREPARE_ENV@
12 @PREPARE_INPUT_FILE@
13 #set $section = $sec_ref
14 @PREPARE_FASTA_REF@
15 #set $section = $sec_restrict
16 @PREPARE_TARGETS_FILE@
17
18 bcftools @EXECUTABLE@
19
20 #set $section = $sec_ref
21 @FASTA_REF@
22 ${section.do_not_normalize}
23 #if $section.check_ref:
24 --check-ref "${section.check_ref}"
25 #end if
26
27 ## Default section
28 #set $section = $sec_default
29 #if $section.rm_dup:
30 --rm-dup "${section.rm_dup}"
31 #end if
32 #if $section.multiallelics:
33 #set $mtype = ''
34 #if $section.multiallelic_types:
35 #set $mtype = $section.multiallelic_types
36 #end if
37 --multiallelics "${section.multiallelics}${mtype}"
38 #end if
39 ${section.strict_filter}
40 #if $section.site_win:
41 --site-win "${section.site_win}"
42 #end if
43
44 #set $section = $sec_restrict
45 @REGIONS@
46 @TARGETS@
47
48 @OUTPUT_TYPE@
49 @THREADS@
50
51 ## Primary Input/Outputs
52 @INPUT_FILE@
53 > "$output_file"
54 ]]>
55 </command>
56 <inputs>
57 <expand macro="macro_input" />
58 <section name="sec_restrict" expanded="false" title="Restrict to">
59 <expand macro="macro_regions" />
60 <expand macro="macro_targets" />
61 </section>
62 <section name="sec_ref" expanded="false" title="Reference Options">
63 <expand macro="macro_fasta_ref" />
64 <param name="check_ref" type="select" label="Check REF" optional="true"
65 help="What to do when incorrect or missing REF allele is encountered">
66 <option value="e">check REF alleles and exit (e)</option>
67 <option value="w">warn (w)</option>
68 <option value="x">exclude (x)</option>
69 <option value="s">set bad sites (s)</option>
70 <option value="wx">warn and exclude (wx)</option>
71 <option value="ws">warn and set bad sites (ws)</option>
72 </param>
73 <param name="do_not_normalize" type="boolean" truevalue="--do-not-normalize" falsevalue="" label="Skip Normalization, just set REF allele"
74 help="Do not normalize indels, just fix or set the REF allele from the reference (-N, --do-not-normalize with -m or -c s)" />
75 </section>
76
77 <section name="sec_default" expanded="false" title="Default Options">
78 <param name="rm_dup" type="select" label="Rm Dup" optional="true"
79 help="Remove duplicate snps|indels|both|any">
80 <option value="snps">snps</option>
81 <option value="indels">indels</option>
82 <option value="both">both</option>
83 <option value="any">any</option>
84 </param>
85 <param name="multiallelics" type="select" label="~multiallelics" optional="true">
86 <option value="-">split multiallelic sites into biallelic records (-)</option>
87 <option value="+">join biallelic sites into multiallelic records (+)</option>
88 </param>
89 <param name="multiallelic_types" type="select" label="variant types which should be split or merged" optional="true">
90 <option value="snps">snps - only SNP records should be split or merged</option>
91 <option value="indels">indels - only indel records should be split or merged</option>
92 <option value="both">both - records should be split or merged</option>
93 <option value="any">any - SNPs and indels should be merged into a single record</option>
94 </param>
95 <param name="strict_filter" type="boolean" truevalue="--strict-filter" falsevalue="" label="Strict Filter"
96 help="When merging (-m+), merged site is PASS only if all sites being merged PASS" />
97 <param name="site_win" type="integer" label="Site Window" default="1000" optional="True"
98 help="(-w, --site-win) Buffer for sorting lines which changed position during realignment" />
99 </section>
100
101 <expand macro="macro_select_output_type" />
102 </inputs>
103 <outputs>
104 <expand macro="macro_vcf_output"/>
105 </outputs>
106 <tests>
107 <test>
108 <param name="input_file" ftype="vcf" value="norm.vcf" />
109 <param name="fasta_ref" ftype="fasta" value="norm.fa" />
110 <param name="output_type" value="v" />
111 <output name="output_file">
112 <assert_contents>
113 <has_text text="T,TAACCCTA" />
114 <not_has_text text="TAA,TAACCCTAAA" />
115 </assert_contents>
116 </output>
117 </test>
118
119 <test>
120 <param name="input_file" ftype="vcf" value="norm.split.vcf" />
121 <param name="multiallelics" value="-" />
122 <param name="output_type" value="v" />
123 <output name="output_file">
124 <assert_contents>
125 <not_has_text text="TAA,TAACCCTAAA" />
126 <has_text_matching expression="1\t105\t.\tTAAACCCTAAA\tTAA\t"/>
127 <has_text_matching expression="1\t105\t.\tTAAACCCTAAA\tTAACCCTAAA\t"/>
128 </assert_contents>
129 </output>
130 </test>
131
132 <test>
133 <param name="input_file" ftype="vcf" value="norm.split.vcf" />
134 <param name="fasta_ref" ftype="fasta" value="norm.fa" />
135 <param name="multiallelics" value="-" />
136 <param name="output_type" value="v" />
137 <output name="output_file">
138 <assert_contents>
139 <not_has_text text="TAA,TAACCCTAAA" />
140 <has_text_matching expression="1\t105\t.\tTAAACCCTA\tT\t"/>
141 <has_text_matching expression="1\t105\t.\tTA\tT\t"/>
142 </assert_contents>
143 </output>
144 </test>
145
146 <test>
147 <param name="input_file" ftype="vcf" value="norm.merge.vcf" />
148 <param name="multiallelics" value="+" />
149 <param name="output_type" value="v" />
150 <output name="output_file">
151 <assert_contents>
152 <has_text text="TAA,TAACCCTAAA" />
153 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tFAIL"/>
154 </assert_contents>
155 </output>
156 </test>
157 <test>
158 <param name="input_file" ftype="vcf" value="norm.merge.vcf" />
159 <param name="multiallelics" value="+" />
160 <param name="strict_filter" value="true" />
161 <param name="output_type" value="v" />
162 <output name="output_file">
163 <assert_contents>
164 <has_text text="TAA,TAACCCTAAA" />
165 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tPASS"/>
166 </assert_contents>
167 </output>
168 </test>
169
170 <test>
171 <param name="input_file" ftype="vcf" value="norm.setref.vcf" />
172 <param name="fasta_ref" ftype="fasta" value="norm.fa" />
173 <param name="do_not_normalize" value="true" />
174 <param name="check_ref" value="s" />
175 <param name="output_type" value="v" />
176 <output name="output_file">
177 <assert_contents>
178 <has_text_matching expression="2\t101\t.\tA\tc\t999\tPASS"/>
179 <has_text_matching expression="2\t105\t.\tT\t&lt;DEL&gt;\t999\tPASS"/>
180 </assert_contents>
181 </output>
182 </test>
183
184 </tests>
185 <help><![CDATA[
186 =====================================
187 bcftools @EXECUTABLE@
188 =====================================
189
190
191 Left-align and normalize indels; check if REF alleles match the reference; split multiallelic sites into multiple rows; recover multiallelics from multiple rows.
192
193 @REGIONS_HELP@
194 @TARGETS_HELP@
195
196 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
197
198 @BCFTOOLS_WIKI@
199 ]]>
200 </help>
201 <expand macro="citations" />
202 </tool>