Mercurial > repos > iuc > bcftools_filter
comparison bcftools_filter.xml @ 18:328e2966aeff 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:43:15 +0000 |
| parents | e634a171385c |
| children | 0bb5f14a9955 |
comparison
equal
deleted
inserted
replaced
| 17:8e3cd15df993 | 18:328e2966aeff |
|---|---|
| 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@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 3 <description>Apply fixed-threshold filters</description> | 3 <description>Apply fixed-threshold filters</description> |
| 4 <macros> | 4 <macros> |
| 5 <token name="@EXECUTABLE@">filter</token> | 5 <token name="@EXECUTABLE@">filter</token> |
| 6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
| 7 </macros> | 7 </macros> |
| 27 #end if | 27 #end if |
| 28 #if $section.mode: | 28 #if $section.mode: |
| 29 #set $mode = str($section.mode).replace(',','') | 29 #set $mode = str($section.mode).replace(',','') |
| 30 --mode '$mode' | 30 --mode '$mode' |
| 31 #end if | 31 #end if |
| 32 #if $section.soft_filter: | 32 #if $section.conditional_soft_filter.selector == 'enabled': |
| 33 --soft-filter "${section.soft_filter}" | 33 --soft-filter '${section.conditional_soft_filter.soft_filter}' |
| 34 @MASK@ | |
| 34 #end if | 35 #end if |
| 35 #if $section.select_set_GTs: | 36 #if $section.select_set_GTs: |
| 36 --set-GTs "${section.select_set_GTs}" | 37 --set-GTs "${section.select_set_GTs}" |
| 37 #end if | 38 #end if |
| 38 | 39 |
| 68 and setting to "PASS" when the FILTER string is absent. | 69 and setting to "PASS" when the FILTER string is absent. |
| 69 </help> | 70 </help> |
| 70 <option value="+">(+) append new FILTER strings of failed sites instead of replacing them</option> | 71 <option value="+">(+) append new FILTER strings of failed sites instead of replacing them</option> |
| 71 <option value="x">(x) resets filters of sites which pass to "PASS"</option> | 72 <option value="x">(x) resets filters of sites which pass to "PASS"</option> |
| 72 </param> | 73 </param> |
| 73 <param name="soft_filter" type="text" value="" label="Soft Filter" optional="true"> | 74 <conditional name="conditional_soft_filter"> |
| 74 <help><![CDATA[ (-s) | 75 <param name="selector" type="select" label="Perform soft filtering"> |
| 75 Annotate FILTER column with STRING or, with +, a unique filter name generated by the program ("Filter%d"). | 76 <option value="disabled">Disabled</option> |
| 76 ]]></help> | 77 <option value="enabled">Enabled</option> |
| 77 </param> | 78 </param> |
| 79 <when value="disabled"/> | |
| 80 <when value="enabled"> | |
| 81 <param argument="--soft-filter" type="text" value="" label="Soft Filter" optional="true"> | |
| 82 <help><![CDATA[ (-s) | |
| 83 Annotate FILTER column with STRING or, with +, a unique filter name generated by the program ("Filter%d"). | |
| 84 ]]></help> | |
| 85 </param> | |
| 86 <expand macro="macro_restrict" type="mask" label_type="Mask"/> | |
| 87 </when> | |
| 88 </conditional> | |
| 89 | |
| 78 <param name="select_set_GTs" type="select" label="Set genotypes of failed samples" optional="true" help="(-S)"> | 90 <param name="select_set_GTs" type="select" label="Set genotypes of failed samples" optional="true" help="(-S)"> |
| 79 <option value=".">to missing (.)</option> | 91 <option value=".">to missing (.)</option> |
| 80 <option value="0">to REF (0)</option> | 92 <option value="0">to REF (0)</option> |
| 81 </param> | 93 </param> |
| 82 </section> | 94 </section> |
| 105 <param name="soft_filter" value="Modified" /> | 117 <param name="soft_filter" value="Modified" /> |
| 106 <param name="select_set_GTs" value="." /> | 118 <param name="select_set_GTs" value="." /> |
| 107 <param name="output_type" value="v" /> | 119 <param name="output_type" value="v" /> |
| 108 <output name="output_file"> | 120 <output name="output_file"> |
| 109 <assert_contents> | 121 <assert_contents> |
| 110 <has_text text="Modified" /> | 122 <has_text text="genotypes" /> |
| 111 <has_text text="AN=2;AC=1" /> | 123 <has_text text="AN=2;AC=1" /> |
| 112 <has_text_matching expression="TAAAA\tTA,T\t61.5\tModified" /> | 124 <has_text_matching expression="TAAAA\tTA,T\t61.5\tPASS" /> |
| 113 </assert_contents> | 125 </assert_contents> |
| 114 </output> | 126 </output> |
| 115 </test> | 127 </test> |
| 116 <test> | 128 <test> |
| 117 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 129 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> |
| 126 </test> | 138 </test> |
| 127 | 139 |
| 128 <test> | 140 <test> |
| 129 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 141 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> |
| 130 <param name="exclude" value="INFO/DP=19" /> | 142 <param name="exclude" value="INFO/DP=19" /> |
| 131 <param name="soft_filter" value="XX" /> | 143 <section name="sec_filter"> |
| 144 <conditional name="conditional_soft_filter"> | |
| 145 <param name="selector" value="enabled"/> | |
| 146 <param name="soft_filter" value="XX" /> | |
| 147 </conditional> | |
| 148 </section> | |
| 132 <param name="output_type" value="v" /> | 149 <param name="output_type" value="v" /> |
| 133 <output name="output_file"> | 150 <output name="output_file"> |
| 134 <assert_contents> | 151 <assert_contents> |
| 135 <has_text_matching expression="\tXX\tDP=19" /> | 152 <has_text_matching expression="\tXX\tDP=19" /> |
| 136 <has_text_matching expression="\tq20\tAO" /> | 153 <has_text_matching expression="\tq20\tAO" /> |
| 138 </output> | 155 </output> |
| 139 </test> | 156 </test> |
| 140 <test> | 157 <test> |
| 141 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 158 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> |
| 142 <param name="exclude" value="INFO/DP=19" /> | 159 <param name="exclude" value="INFO/DP=19" /> |
| 143 <param name="soft_filter" value="XX" /> | 160 <section name="sec_filter"> |
| 144 <param name="mode" value="+" /> | 161 <conditional name="conditional_soft_filter"> |
| 145 <param name="output_type" value="v" /> | 162 <param name="selector" value="enabled"/> |
| 146 <output name="output_file"> | 163 <param name="soft_filter" value="XX" /> |
| 147 <assert_contents> | 164 <param name="mode" value="+" /> |
| 148 <has_text_matching expression="\tq20;XX\tDP=19" /> | 165 </conditional> |
| 166 </section> | |
| 167 <param name="output_type" value="v" /> | |
| 168 <output name="output_file"> | |
| 169 <assert_contents> | |
| 170 <has_text_matching expression="238\tXX\tDP=19" /> | |
| 149 <has_text_matching expression="\tq20\tAO" /> | 171 <has_text_matching expression="\tq20\tAO" /> |
| 150 </assert_contents> | 172 </assert_contents> |
| 151 </output> | 173 </output> |
| 152 </test> | 174 </test> |
| 153 <test> | 175 <test> |
| 154 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 176 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> |
| 155 <param name="exclude" value="INFO/DP=19" /> | 177 <param name="exclude" value="INFO/DP=19" /> |
| 156 <param name="soft_filter" value="XX" /> | 178 <section name="sec_filter"> |
| 157 <param name="mode" value="x" /> | 179 <conditional name="conditional_soft_filter"> |
| 180 <param name="selector" value="enabled"/> | |
| 181 <param name="soft_filter" value="XX" /> | |
| 182 <param name="mode" value="+" /> | |
| 183 </conditional> | |
| 184 </section> | |
| 158 <param name="output_type" value="v" /> | 185 <param name="output_type" value="v" /> |
| 159 <output name="output_file"> | 186 <output name="output_file"> |
| 160 <assert_contents> | 187 <assert_contents> |
| 161 <has_text_matching expression="\tXX\tDP=19" /> | 188 <has_text_matching expression="\tXX\tDP=19" /> |
| 162 <has_text_matching expression="\tPASS\tAO" /> | 189 <has_text_matching expression="\tq20\tAO=52101" /> |
| 163 </assert_contents> | 190 </assert_contents> |
| 164 </output> | 191 </output> |
| 165 </test> | 192 </test> |
| 166 <test> | 193 <test> |
| 167 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 194 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> |
| 168 <param name="exclude" value="INFO/DP=19" /> | 195 <param name="exclude" value="INFO/DP=19" /> |
| 169 <param name="soft_filter" value="XX" /> | 196 <section name="sec_filter"> |
| 170 <param name="mode" value="+,x" /> | 197 <conditional name="conditional_soft_filter"> |
| 198 <param name="selector" value="enabled"/> | |
| 199 <param name="soft_filter" value="XX" /> | |
| 200 <param name="mode" value="+" /> | |
| 201 </conditional> | |
| 202 </section> | |
| 203 <param name="output_type" value="v" /> | |
| 204 <output name="output_file"> | |
| 205 <assert_contents> | |
| 206 <has_text_matching expression="\t238\tXX\tDP=19" /> | |
| 207 <has_text_matching expression="\t238\tq20\tAO" /> | |
| 208 </assert_contents> | |
| 209 </output> | |
| 210 </test> | |
| 211 <test> | |
| 212 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | |
| 213 <param name="exclude" value="FMT/GT="0/2"" /> | |
| 214 <param name="output_type" value="v" /> | |
| 215 <output name="output_file"> | |
| 216 <assert_contents> | |
| 217 <not_has_text text="3162006" /> | |
| 218 <has_text text="3162007" /> | |
| 219 </assert_contents> | |
| 220 </output> | |
| 221 </test> | |
| 222 <test> | |
| 223 <param name="input_file" ftype="vcf" value="filter.2.vcf" /> | |
| 224 <param name="include" value="FMT/GT="0/0" && AC[*]=2" /> | |
| 225 <param name="output_type" value="v" /> | |
| 226 <output name="output_file"> | |
| 227 <assert_contents> | |
| 228 <has_text text="AN=4;AC=2" /> | |
| 229 <not_has_text text="AN=4;AC=0" /> | |
| 230 </assert_contents> | |
| 231 </output> | |
| 232 </test> | |
| 233 <!-- Test region overlap --> | |
| 234 <test> | |
| 235 <param name="input_file" ftype="vcf" value="filter.2.vcf" /> | |
| 236 <param name="include" value="FMT/GT="0/0" && AC[*]=2" /> | |
| 237 <param name="output_type" value="v" /> | |
| 238 <section name="sec_restrict"> | |
| 239 <param name="regions_overlap" value="1"/> | |
| 240 </section> | |
| 241 <output name="output_file"> | |
| 242 <assert_contents> | |
| 243 <has_text text="AN=4;AC=2" /> | |
| 244 <not_has_text text="AN=4;AC=0" /> | |
| 245 </assert_contents> | |
| 246 </output> | |
| 247 <assert_command> | |
| 248 <has_text text="--regions-overlap" /> | |
| 249 </assert_command> | |
| 250 </test> | |
| 251 <!-- Test mask options--> | |
| 252 <test> | |
| 253 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | |
| 254 <param name="exclude" value="INFO/DP=19" /> | |
| 255 <section name="sec_filter"> | |
| 256 <param name="mode" value="+,x" /> | |
| 257 <conditional name="conditional_soft_filter"> | |
| 258 <param name="selector" value="enabled"/> | |
| 259 <param name="soft_filter" value="XX" /> | |
| 260 <param name="masks_overlap" value="1"/> | |
| 261 </conditional> | |
| 262 </section> | |
| 263 | |
| 171 <param name="output_type" value="v" /> | 264 <param name="output_type" value="v" /> |
| 172 <output name="output_file"> | 265 <output name="output_file"> |
| 173 <assert_contents> | 266 <assert_contents> |
| 174 <has_text_matching expression="\tq20;XX\tDP=19" /> | 267 <has_text_matching expression="\tq20;XX\tDP=19" /> |
| 175 <has_text_matching expression="\tPASS\tAO" /> | 268 <has_text_matching expression="\tPASS\tAO" /> |
| 176 </assert_contents> | 269 </assert_contents> |
| 177 </output> | 270 </output> |
| 178 </test> | 271 <assert_command> |
| 179 <test> | 272 <has_text text="--mask-overlap" /> |
| 180 <param name="input_file" ftype="vcf" value="filter.3.vcf" /> | 273 </assert_command> |
| 181 <param name="exclude" value="FMT/GT="0/2"" /> | |
| 182 <param name="output_type" value="v" /> | |
| 183 <output name="output_file"> | |
| 184 <assert_contents> | |
| 185 <not_has_text text="3162006" /> | |
| 186 <has_text text="3162007" /> | |
| 187 </assert_contents> | |
| 188 </output> | |
| 189 </test> | |
| 190 <test> | |
| 191 <param name="input_file" ftype="vcf" value="filter.2.vcf" /> | |
| 192 <param name="include" value="FMT/GT="0/0" && AC[*]=2" /> | |
| 193 <param name="output_type" value="v" /> | |
| 194 <output name="output_file"> | |
| 195 <assert_contents> | |
| 196 <has_text text="AN=4;AC=2" /> | |
| 197 <not_has_text text="AN=4;AC=0" /> | |
| 198 </assert_contents> | |
| 199 </output> | |
| 200 </test> | 274 </test> |
| 201 </tests> | 275 </tests> |
| 202 <help><