Mercurial > repos > iuc > bcftools_norm
comparison bcftools_norm.xml @ 8:76655fe2c70e draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit e648d86d550ddf2eb67237752320c390b3a780e5
author | iuc |
---|---|
date | Wed, 05 Jun 2019 13:02:34 -0400 |
parents | 19905c025d2a |
children | 67e2bd1c4579 |
comparison
equal
deleted
inserted
replaced
7:19905c025d2a | 8:76655fe2c70e |
---|---|
1 <?xml version='1.0' encoding='utf-8'?> | 1 <?xml version='1.0' encoding='utf-8'?> |
2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@"> | 2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy1"> |
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> | 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> | 4 <macros> |
5 <token name="@EXECUTABLE@">norm</token> | 5 <token name="@EXECUTABLE@">norm</token> |
6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
7 </macros> | 7 </macros> |
10 </expand> | 10 </expand> |
11 <expand macro="version_command" /> | 11 <expand macro="version_command" /> |
12 <command detect_errors="aggressive"><![CDATA[ | 12 <command detect_errors="aggressive"><![CDATA[ |
13 @PREPARE_ENV@ | 13 @PREPARE_ENV@ |
14 @PREPARE_INPUT_FILE@ | 14 @PREPARE_INPUT_FILE@ |
15 #set $section = $sec_ref | 15 #set $section = $reference_source |
16 @PREPARE_FASTA_REF@ | 16 @PREPARE_FASTA_REF@ |
17 #set $section = $sec_restrict | 17 #set $section = $sec_restrict |
18 @PREPARE_TARGETS_FILE@ | 18 @PREPARE_TARGETS_FILE@ |
19 @PREPARE_REGIONS_FILE@ | 19 @PREPARE_REGIONS_FILE@ |
20 | 20 |
21 bcftools @EXECUTABLE@ | 21 bcftools @EXECUTABLE@ |
22 | 22 |
23 #set $section = $sec_ref | 23 #set $section = $reference_source |
24 @FASTA_REF@ | 24 @FASTA_REF@ |
25 ${section.do_not_normalize} | 25 --check-ref $check_ref |
26 #if $section.check_ref: | 26 $normalize_indels |
27 --check-ref "${section.check_ref}" | 27 #if $rm_dup: |
28 #end if | 28 --rm-dup "$rm_dup" |
29 | 29 #end if |
30 ## Default section | 30 #if $multiallelics.mode: |
31 #set $section = $sec_default | 31 --multiallelics '${multiallelics.mode}${multiallelics.multiallelic_types}' |
32 #if $section.rm_dup: | 32 #end if |
33 --rm-dup "${section.rm_dup}" | 33 #if $multiallelics.mode == '+': |
34 #end if | 34 ${multiallelics.strict_filter} |
35 #if $section.multiallelics: | 35 #end if |
36 #set $mtype = '' | 36 #if $sec_default.site_win: |
37 #if $section.multiallelic_types: | 37 --site-win ${sec_default.site_win} |
38 #set $mtype = $section.multiallelic_types | |
39 #end if | |
40 --multiallelics "${section.multiallelics}${mtype}" | |
41 #end if | |
42 ${section.strict_filter} | |
43 #if $section.site_win: | |
44 --site-win "${section.site_win}" | |
45 #end if | 38 #end if |
46 | 39 |
47 #set $section = $sec_restrict | 40 #set $section = $sec_restrict |
48 @REGIONS@ | 41 @REGIONS@ |
49 @TARGETS@ | 42 @TARGETS@ |
56 > '$output_file' | 49 > '$output_file' |
57 ]]> | 50 ]]> |
58 </command> | 51 </command> |
59 <inputs> | 52 <inputs> |
60 <expand macro="macro_input" /> | 53 <expand macro="macro_input" /> |
61 <section name="sec_restrict" expanded="false" title="Restrict to"> | 54 <expand macro="macro_fasta_ref" /> |
62 <expand macro="macro_regions" /> | 55 <param name="check_ref" type="select" display="radio" |
63 <expand macro="macro_targets" /> | 56 label="When any REF allele does not match the reference genome base" |
64 </section> | 57 help="Warnings about REF mismatches will be emitted to the standard |
65 <section name="sec_ref" expanded="false" title="Reference Options"> | 58 error (stderr) stream, and it is recommended to check there for |
66 <expand macro="macro_fasta_ref" /> | 59 problems if you choose not to exit with an error immediately upon |
67 <param name="check_ref" type="select" label="Check REF" optional="true" | 60 encountering a mismatch."> |
68 help="What to do when incorrect or missing REF allele is encountered"> | 61 <option value="w">ignore the problem (-w)</option> |
69 <option value="e">check REF alleles and exit (e)</option> | 62 <option value="wx">exclude the variant record from the output (-wx)</option> |
70 <option value="w">warn (w)</option> | 63 <option value="ws">fix the variant record using the reference genome information (-ws)</option> |
71 <option value="x">exclude (x)</option> | 64 <option value="e">exit with an error (-e)</option> |
72 <option value="s">set bad sites (s)</option> | 65 </param> |
73 <option value="wx">warn and exclude (wx)</option> | 66 <param argument="--do-not-normalize" name="normalize_indels" type="boolean" truevalue="" falsevalue="--do-not-normalize" checked="false" |
74 <option value="ws">warn and set bad sites (ws)</option> | 67 label="Left-align and normalize indels?" /> |
75 </param> | 68 <param name="rm_dup" type="select" display="radio" |
76 <param name="do_not_normalize" type="boolean" truevalue="--do-not-normalize" falsevalue="" label="Skip Normalization, just set REF allele" | 69 label="Perform deduplication for the folowing types of variant records"> |
77 help="Do not normalize indels, just fix or set the REF allele from the reference (-N, --do-not-normalize with -m or -c s)" /> | 70 <option value="">do not deduplicate any records</option> |
78 </section> | 71 <option value="snps">snps</option> |
79 | 72 <option value="indels">indels</option> |
80 <section name="sec_default" expanded="false" title="Default Options"> | 73 <option value="both">both</option> |
81 <param name="rm_dup" type="select" label="Rm Dup" optional="true" | 74 <option value="any">any</option> |
82 help="Remove duplicate snps|indels|both|any"> | 75 </param> |
83 <option value="snps">snps</option> | 76 <conditional name="multiallelics"> |
84 <option value="indels">indels</option> | 77 <param name="mode" type="select" label="~multiallelics"> |
85 <option value="both">both</option> | 78 <option value="">preserve multiallelic/biallelic sites</option> |
86 <option value="any">any</option> | |
87 </param> | |
88 <param name="multiallelics" type="select" label="~multiallelics" optional="true"> | |
89 <option value="-">split multiallelic sites into biallelic records (-)</option> | 79 <option value="-">split multiallelic sites into biallelic records (-)</option> |
90 <option value="+">join biallelic sites into multiallelic records (+)</option> | 80 <option value="+">join biallelic sites into multiallelic records (+)</option> |
91 </param> | 81 </param> |
92 <param name="multiallelic_types" type="select" label="variant types which should be split or merged" optional="true"> | 82 <when value="" /> |
93 <option value="snps">snps - only SNP records should be split or merged</option> | 83 <when value="-"> |
94 <option value="indels">indels - only indel records should be split or merged</option> | 84 <param name="multiallelic_types" type="select" display="radio" |
95 <option value="both">both - records should be split or merged</option> | 85 label="split the following variant types"> |
96 <option value="any">any - SNPs and indels should be merged into a single record</option> | 86 <option value="snps">SNPs</option> |
97 </param> | 87 <option value="indels">indels</option> |
98 <param name="strict_filter" type="boolean" truevalue="--strict-filter" falsevalue="" label="Strict Filter" | 88 <option value="both" selected="true">both</option> |
99 help="When merging (-m+), merged site is PASS only if all sites being merged PASS" /> | 89 </param> |
90 </when> | |
91 <when value="+"> | |
92 <param name="multiallelic_types" type="select" display="radio" | |
93 label="merge the following variant types"> | |
94 <option value="snps">SNPs</option> | |
95 <option value="indels">indels</option> | |
96 <option value="both" selected="true">SNPs and indels, but keep variants of the two types separate (both)</option> | |
97 <option value="any">SNPs and indels, and merge variant records of different types (any)</option> | |
98 </param> | |
99 <param name="strict_filter" type="boolean" truevalue="--strict-filter" falsevalue="" | |
100 label="Strict Filter" | |
101 help="merged site is PASS only if all sites being merged PASS" /> | |
102 </when> | |
103 </conditional> | |
104 <section name="sec_restrict" expanded="false" title="Restrict all operations to"> | |
105 <expand macro="macro_restrict" type="region" label_type="Region" /> | |
106 <expand macro="macro_restrict" type="target" label_type="Target"> | |
107 <expand macro="macro_invert_targets" /> | |
108 </expand> | |
109 </section> | |
110 | |
111 <section name="sec_default" expanded="false" title="Other Options"> | |
100 <param name="site_win" type="integer" label="Site Window" value="1000" optional="True" | 112 <param name="site_win" type="integer" label="Site Window" value="1000" optional="True" |
101 help="(-w, --site-win) Buffer for sorting lines which changed position during realignment" /> | 113 help="(-w, --site-win) Buffer for sorting lines which changed position during realignment" /> |
102 </section> | 114 </section> |
103 | |
104 <expand macro="macro_select_output_type" /> | 115 <expand macro="macro_select_output_type" /> |
105 </inputs> | 116 </inputs> |
106 <outputs> | 117 <outputs> |
107 <expand macro="macro_vcf_output"/> | 118 <expand macro="macro_vcf_output"/> |
108 </outputs> | 119 </outputs> |
109 <tests> | 120 <tests> |
110 <test> | 121 <test> |
111 <param name="input_file" ftype="vcf" value="norm.vcf" /> | 122 <param name="input_file" ftype="vcf" value="norm.vcf" /> |
112 <param name="fasta_ref" ftype="fasta" value="norm.fa" /> | 123 <expand macro="test_using_reference" ref="norm.fa" /> |
124 <param name="normalize_indels" value="true" /> | |
113 <param name="output_type" value="v" /> | 125 <param name="output_type" value="v" /> |
114 <output name="output_file"> | 126 <output name="output_file"> |
115 <assert_contents> | 127 <assert_contents> |
116 <has_text text="T,TAACCCTA" /> | 128 <has_text text="T,TAACCCTA" /> |
117 <not_has_text text="TAA,TAACCCTAAA" /> | 129 <not_has_text text="TAA,TAACCCTAAA" /> |
118 </assert_contents> | 130 </assert_contents> |
119 </output> | 131 </output> |
120 </test> | 132 </test> |
121 | 133 |
122 <test> | 134 <test> |
135 <param name="input_file" ftype="vcf" dbkey="?" value="norm.vcf" /> | |
136 <expand macro="test_using_reference" select_from="cached" ref="norm" /> | |
137 <param name="normalize_indels" value="true" /> | |
138 <param name="output_type" value="v" /> | |
139 <output name="output_file"> | |
140 <assert_contents> | |
141 <has_text text="T,TAACCCTA" /> | |
142 <not_has_text text="TAA,TAACCCTAAA" /> | |
143 </assert_contents> | |
144 </output> | |
145 </test> | |
146 | |
147 <test> | |
123 <param name="input_file" ftype="vcf" value="norm.split.vcf" /> | 148 <param name="input_file" ftype="vcf" value="norm.split.vcf" /> |
124 <param name="multiallelics" value="-" /> | 149 <expand macro="test_using_reference" ref="norm.fa" /> |
150 <conditional name="multiallelics"> | |
151 <param name="mode" value="-" /> | |
152 </conditional> | |
125 <param name="output_type" value="v" /> | 153 <param name="output_type" value="v" /> |
126 <output name="output_file"> | 154 <output name="output_file"> |
127 <assert_contents> | 155 <assert_contents> |
128 <not_has_text text="TAA,TAACCCTAAA" /> | 156 <not_has_text text="TAA,TAACCCTAAA" /> |
129 <has_text_matching expression="1\t105\t.\tTAAACCCTAAA\tTAA\t"/> | 157 <has_text_matching expression="1\t105\t.\tTAAACCCTAAA\tTAA\t"/> |
132 </output> | 160 </output> |
133 </test> | 161 </test> |
134 | 162 |
135 <test> | 163 <test> |
136 <param name="input_file" ftype="vcf" value="norm.split.vcf" /> | 164 <param name="input_file" ftype="vcf" value="norm.split.vcf" /> |
137 <param name="fasta_ref" ftype="fasta" value="norm.fa" /> | 165 <expand macro="test_using_reference" ref="norm.fa" /> |
138 <param name="multiallelics" value="-" /> | 166 <param name="normalize_indels" value="true" /> |
167 <conditional name="multiallelics"> | |
168 <param name="mode" value="-" /> | |
169 </conditional> | |
139 <param name="output_type" value="v" /> | 170 <param name="output_type" value="v" /> |
140 <output name="output_file"> | 171 <output name="output_file"> |
141 <assert_contents> | 172 <assert_contents> |
142 <not_has_text text="TAA,TAACCCTAAA" /> | 173 <not_has_text text="TAA,TAACCCTAAA" /> |
143 <has_text_matching expression="1\t105\t.\tTAAACCCTA\tT\t"/> | 174 <has_text_matching expression="1\t105\t.\tTAAACCCTA\tT\t"/> |
146 </output> | 177 </output> |
147 </test> | 178 </test> |
148 | 179 |
149 <test> | 180 <test> |
150 <param name="input_file" ftype="vcf" value="norm.merge.vcf" /> | 181 <param name="input_file" ftype="vcf" value="norm.merge.vcf" /> |
151 <param name="multiallelics" value="+" /> | 182 <expand macro="test_using_reference" ref="norm.fa" /> |
183 <conditional name="multiallelics"> | |
184 <param name="mode" value="+" /> | |
185 </conditional> | |
152 <param name="output_type" value="v" /> | 186 <param name="output_type" value="v" /> |
153 <output name="output_file"> | 187 <output name="output_file"> |
154 <assert_contents> | 188 <assert_contents> |
155 <has_text text="TAA,TAACCCTAAA" /> | 189 <has_text text="TAA,TAACCCTAAA" /> |
156 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tFAIL"/> | 190 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tFAIL"/> |
157 </assert_contents> | 191 </assert_contents> |
158 </output> | 192 </output> |
159 </test> | 193 </test> |
160 <test> | 194 <test> |
161 <param name="input_file" ftype="vcf" value="norm.merge.vcf" /> | 195 <param name="input_file" ftype="vcf" value="norm.merge.vcf" /> |
162 <param name="multiallelics" value="+" /> | 196 <expand macro="test_using_reference" ref="norm.fa" /> |
163 <param name="strict_filter" value="true" /> | 197 <conditional name="multiallelics"> |
198 <param name="mode" value="+" /> | |
199 <param name="strict_filter" value="true" /> | |
200 </conditional> | |
164 <param name="output_type" value="v" /> | 201 <param name="output_type" value="v" /> |
165 <output name="output_file"> | 202 <output name="output_file"> |
166 <assert_contents> | 203 <assert_contents> |
167 <has_text text="TAA,TAACCCTAAA" /> | 204 <has_text text="TAA,TAACCCTAAA" /> |
168 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tPASS"/> | 205 <has_text_matching expression="2\t114\t.\tTC\tTTCC,TTC\t999\tPASS"/> |
170 </output> | 207 </output> |
171 </test> | 208 </test> |
172 | 209 |
173 <test> | 210 <test> |
174 <param name="input_file" ftype="vcf" value="norm.setref.vcf" /> | 211 <param name="input_file" ftype="vcf" value="norm.setref.vcf" /> |
175 <param name="fasta_ref" ftype="fasta" value="norm.fa" /> | 212 <expand macro="test_using_reference" ref="norm.fa" /> |
176 <param name="do_not_normalize" value="true" /> | 213 <param name="check_ref" value="ws" /> |
177 <param name="check_ref" value="s" /> | |
178 <param name="output_type" value="v" /> | 214 <param name="output_type" value="v" /> |
179 <output name="output_file"> | 215 <output name="output_file"> |
180 <assert_contents> | 216 <assert_contents> |
181 <has_text_matching expression="2\t101\t.\tA\tc\t999\tPASS"/> | 217 <has_text_matching expression="2\t101\t.\tA\tc\t999\tPASS"/> |
182 <has_text_matching expression="2\t105\t.\tT\t<DEL>\t999\tPASS"/> | 218 <has_text_matching expression="2\t105\t.\tT\t<DEL>\t999\tPASS"/> |