Mercurial > repos > iuc > bcftools_annotate
comparison bcftools_annotate.xml @ 17:28647eee857d draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ccc967cdce26379110361f8dea521bade23f8612"
| author | iuc |
|---|---|
| date | Tue, 08 Mar 2022 17:26:56 +0000 |
| parents | a974b56e4c43 |
| children | 65d418d476a5 |
comparison
equal
deleted
inserted
replaced
| 16:a974b56e4c43 | 17:28647eee857d |
|---|---|
| 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>Annotate and edit VCF/BCF files</description> | 3 <description>Annotate and edit VCF/BCF files</description> |
| 4 <macros> | 4 <macros> |
| 5 <token name="@EXECUTABLE@">annotate</token> | 5 <token name="@EXECUTABLE@">annotate</token> |
| 6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
| 7 </macros> | 7 </macros> |
| 15 #set $annotation_hdr = None | 15 #set $annotation_hdr = None |
| 16 #set $section = $sec_annofile | 16 #set $section = $sec_annofile |
| 17 #if $section.annofile.anno_fmt == 'vcf': | 17 #if $section.annofile.anno_fmt == 'vcf': |
| 18 #if $section.annofile.annotations.is_of_type('vcf') | 18 #if $section.annofile.annotations.is_of_type('vcf') |
| 19 #set $annotation_file = 'annotations.vcf.gz' | 19 #set $annotation_file = 'annotations.vcf.gz' |
| 20 bgzip -c "$section.annofile.annotations" > $annotation_file && | 20 bgzip -c '$section.annofile.annotations' > $annotation_file && |
| 21 bcftools index $annotation_file && | 21 bcftools index $annotation_file && |
| 22 #elif $section.annofile.annotations.is_of_type('bcf') | 22 #elif $section.annofile.annotations.is_of_type('bcf') |
| 23 #set $annotation_file = 'annotations.bcf' | 23 #set $annotation_file = 'annotations.bcf' |
| 24 ln -s '$section.annofile.annotations' $annotation_file && | 24 ln -s '$section.annofile.annotations' $annotation_file && |
| 25 #if $section.annofile.annotations.metadata.bcf_index: | 25 #if $section.annofile.annotations.metadata.bcf_index: |
| 29 #end if | 29 #end if |
| 30 #end if | 30 #end if |
| 31 #elif $section.annofile.anno_fmt == 'tab': | 31 #elif $section.annofile.anno_fmt == 'tab': |
| 32 #if $section.annofile.annotations.is_of_type('bed') | 32 #if $section.annofile.annotations.is_of_type('bed') |
| 33 #set $annotation_file = 'annotations.bed.gz' | 33 #set $annotation_file = 'annotations.bed.gz' |
| 34 bgzip -c "$section.annofile.annotations" > $annotation_file && | 34 bgzip -c '$section.annofile.annotations' > $annotation_file && |
| 35 tabix -s 1 -b 2 -e 3 $annotation_file && | 35 tabix -s 1 -b 2 -e 3 $annotation_file && |
| 36 #else: | 36 #else: |
| 37 #set $annotation_file = 'annotations.tab.gz' | 37 #set $annotation_file = 'annotations.tab.gz' |
| 38 bgzip -c "$section.annofile.annotations" > $annotation_file && | 38 bgzip -c '$section.annofile.annotations' > $annotation_file && |
| 39 tabix -s 1 -b 2 -e 2 $annotation_file && | 39 tabix -s 1 -b 2 -e 2 $annotation_file && |
| 40 #end if | 40 #end if |
| 41 #if $section.annofile.header_file: | 41 #if $section.annofile.header_file: |
| 42 #set $annotation_hdr = $section.annofile.header_file | 42 #set $annotation_hdr = $section.annofile.header_file |
| 43 #elif $section.annofile.header_lines: | 43 #elif $section.annofile.header_lines: |
| 44 #set $annotation_hdr = 'annotation.hdr' | 44 #set $annotation_hdr = 'annotation.hdr' |
| 45 grep '^\#\#INFO' ${hdr_file} > $annotation_hdr && | 45 grep '^\#\#INFO' '${hdr_file}' > $annotation_hdr && |
| 46 #end if | 46 #end if |
| 47 #end if | 47 #end if |
| 48 #set $section = $sec_restrict | 48 #set $section = $sec_restrict |
| 49 | 49 |
| 50 bcftools @EXECUTABLE@ | 50 bcftools @EXECUTABLE@ |
| 51 @PREPARE_REGIONS_FILE@ | 51 @PREPARE_REGIONS_FILE@ |
| 52 | 52 |
| 53 #set $section = $sec_annofile | 53 #set $section = $sec_annofile |
| 54 @COLUMNS@ | 54 @COLUMNS@ |
| 55 #if $annotation_file: | 55 #if $annotation_file: |
| 56 --annotations "${annotation_file}" | 56 --annotations '${annotation_file}' |
| 57 #end if | 57 #end if |
| 58 #if $annotation_hdr: | 58 #if $annotation_hdr: |
| 59 --header-lines "${annotation_hdr}" | 59 --header-lines '${annotation_hdr}' |
| 60 #end if | 60 #end if |
| 61 | 61 |
| 62 #if $section.set_id: | 62 #if $section.set_id: |
| 63 --set-id "${section.set_id}" | 63 --set-id '${section.set_id}' |
| 64 #end if | 64 #end if |
| 65 #if $section.mark_sites: | 65 #if $section.mark_sites: |
| 66 --mark-sites "${section.mark_sites}" | 66 --mark-sites '${section.mark_sites}' |
| 67 #end if | 67 #end if |
| 68 | 68 |
| 69 #set $section = $sec_annotate | 69 #set $section = $sec_annotate |
| 70 #if $section.rename_chrs: | 70 #if $section.rename_chrs: |
| 71 --rename-chrs "${section.rename_chrs}" | 71 --rename-chrs '${section.rename_chrs}' |
| 72 #end if | 72 #end if |
| 73 #if $section.remove: | 73 #if $section.remove: |
| 74 --remove "${section.remove}" | 74 --remove '${section.remove}' |
| 75 #end if | 75 #end if |
| 76 | 76 |
| 77 ## Default section | 77 ## Default section |
| 78 #set $section = $sec_restrict | 78 #set $section = $sec_restrict |
| 79 @INCLUDE@ | 79 @INCLUDE@ |
| 116 BED, or a tab-delimited file with mandatory columns CHROM, POS (or, alternatively, FROM and TO), | 116 BED, or a tab-delimited file with mandatory columns CHROM, POS (or, alternatively, FROM and TO), |
| 117 optional columns REF and ALT, and arbitrary number of annotation columns. | 117 optional columns REF and ALT, and arbitrary number of annotation columns. |
| 118 Note that in case of tab-delimited file, the coordinates POS, FROM and TO are one-based and inclusive. | 118 Note that in case of tab-delimited file, the coordinates POS, FROM and TO are one-based and inclusive. |
| 119 ]]></help> | 119 ]]></help> |
| 120 </param> | 120 </param> |
| 121 <param name="header_file" type="data" format="txt" label="Header Lines File" optional="True" help="lines which should be appended to the VCF header" /> | 121 <param name="header_file" type="data" format="txt" label="Header Lines File" optional="true" help="lines which should be appended to the VCF header" /> |
| 122 <param name="header_lines" type="text" area="True" label="Header Lines" optional="True" help="lines which should be appended to the VCF header" > | 122 <param name="header_lines" type="text" area="true" label="Header Lines" optional="true" help="lines which should be appended to the VCF header" > |
| 123 <help><![CDATA[ | 123 <help><![CDATA[ |
| 124 ##INFO=<ID=NUMERIC_TAG,Number=1,Type=Integer,Description="Example header line"> | 124 ##INFO=<ID=NUMERIC_TAG,Number=1,Type=Integer,Description="Example header line"> |
| 125 ##INFO=<ID=STRING_TAG,Number=1,Type=String,Description="Yet another header line"> | 125 ##INFO=<ID=STRING_TAG,Number=1,Type=String,Description="Yet another header line"> |
| 126 ]]></help> | 126 ]]></help> |
| 127 <sanitizer sanitize="False"/> | 127 <sanitizer sanitize="False"/> |
| 128 </param> | 128 </param> |
| 129 </when> | 129 </when> |
| 130 </conditional> | 130 </conditional> |
| 131 <param name="mark_sites" type="text" value="" label="Mark Sites TAG" | 131 <param argument="--mark-sites" type="text" value="" label="Mark Sites TAG" |
| 132 help="add INFO/TAG flag to sites which are ("+") or are not ("-") listed in the annotations file" /> | 132 help="add INFO/TAG flag to sites which are ("+") or are not ("-") listed in the annotations file" /> |
| 133 <param name="set_id" type="text" value="" optional="true" label="Set Id"> | 133 <param argument="--set-id" type="text" value="" optional="true" label="Set Id"> |
| 134 <help>Assign ID on the fly using the given format. | 134 <help>Assign ID on the fly using the given format. |
| 135 By default all existing IDs are replaced. | 135 By default all existing IDs are replaced. |
| 136 If the format string is preceded by "+", only missing IDs will be set. | 136 If the format string is preceded by "+", only missing IDs will be set. |
| 137 For example: '%CHROM\_%POS\_%REF\_%FIRST_ALT' | 137 For example: '%CHROM\_%POS\_%REF\_%FIRST_ALT' |
| 138 </help> | 138 </help> |
| 139 <sanitizer sanitize="False"/> | 139 <sanitizer sanitize="False"/> |
| 140 <validator type="regex" message="">^([+]?(%[A-Z]+)(\_%[A-Z]+)*)?$</validator> | 140 <validator type="regex" message="">^([+]?(%[A-Z_]+)(\\_%[A-Z_]+)*)?$</validator> |
| 141 </param> | 141 </param> |
| 142 </section> | 142 </section> |
| 143 <section name="sec_annotate" expanded="false" title="Change Annotations"> | 143 <section name="sec_annotate" expanded="false" title="Change Annotations"> |
| 144 <param name="remove" type="text" value="" label="Remove annotations" optional="true"> | 144 <param argument="--remove" type="text" value="" label="Remove annotations" optional="true"> |
| 145 <help><![CDATA[ | 145 <help><![CDATA[ |
| 146 List of annotations to remove. | 146 List of annotations to remove. |
| 147 Use "FILTER" to remove all filters or "FILTER/SomeFilter" to remove a specific filter. | 147 Use "FILTER" to remove all filters or "FILTER/SomeFilter" to remove a specific filter. |
| 148 Similarly, "INFO" can be used to remove all INFO tags and "FORMAT" to remove all FORMAT tags except GT. | 148 Similarly, "INFO" can be used to remove all INFO tags and "FORMAT" to remove all FORMAT tags except GT. |
| 149 To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER). | 149 To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER). |
| 150 "INFO" can be abbreviated to "INF" and "FORMAT" to "FMT". | 150 "INFO" can be abbreviated to "INF" and "FORMAT" to "FMT". |
| 151 ]]></help> | 151 ]]></help> |
| 152 <validator type="regex" message="">^(\^?[A-Z]+(/\w+)?(,\^?[A-Z]+(/\w+)?)*)?$</validator> | 152 <validator type="regex" message="">^(\^?[A-Z]+(/\w+)?(,\^?[A-Z]+(/\w+)?)*)?$</validator> |
| 153 </param> | 153 </param> |
| 154 <param name="rename_chrs" type="data" format="tabular" label="Rename CHROM" optional="True" | 154 <param argument="--rename-chrs" type="data" format="tabular" label="Rename CHROM" optional="true" |
| 155 help="rename chromosomes according to the map in file, with old_name new_name pairs separated by whitespaces, each on a separate line." /> | 155 help="rename chromosomes according to the map in file, with old_name new_name pairs separated by whitespaces, each on a separate line." /> |
| 156 </section> | 156 </section> |
| 157 <section name="sec_restrict" expanded="false" title="Restrict to"> | 157 <section name="sec_restrict" expanded="false" title="Restrict to"> |
| 158 <expand macro="macro_include" /> | 158 <expand macro="macro_include" /> |
| 159 <expand macro="macro_exclude" /> | 159 <expand macro="macro_exclude" /> |
| 180 </assert_contents> | 180 </assert_contents> |
| 181 </output> | 181 </output> |
| 182 </test> | 182 </test> |
| 183 <test> | 183 <test> |
| 184 <param name="input_file" ftype="vcf" value="annotate.vcf" /> | 184 <param name="input_file" ftype="vcf" value="annotate.vcf" /> |
| 185 <param name="anno_fmt" value="tab" /> | 185 <section name="sec_annofile"> |
| 186 <param name="annotations" value="annotate2.tab" /> | 186 <param name="columns" value="CHROM,FROM,TO,T_STR" /> |
| 187 <param name="header_file" value="annotate.hdr" /> | 187 <conditional name="annofile"> |
| 188 <param name="columns" value="CHROM,FROM,TO,T_STR" /> | 188 <param name="anno_fmt" value="tab" /> |
| 189 <param name="annotations" value="annotate2.tab" /> | |
| 190 <param name="header_file" value="annotate.hdr" /> | |
| 191 </conditional> | |
| 192 <param name="set_id" value="%CHROM\_%POS\_%REF\_%FIRST_ALT" /> | |
| 193 </section> | |
| 189 <param name="output_type" value="v" /> | 194 <param name="output_type" value="v" /> |
| 190 <output name="output_file"> | 195 <output name="output_file"> |
| 191 <assert_contents> | 196 <assert_contents> |
| 192 <has_text text="T_STR=region_3000150_3106154" /> | 197 <has_text text="T_STR=region_3000150_3106154" /> |
| 198 <has_text text="1_3062915_GTTT_G" /> | |
| 193 </assert_contents> | 199 </assert_contents> |
| 194 </output> | 200 </output> |
| 195 </test> | 201 </test> |
| 196 <test> | 202 <test> |
| 197 <param name="input_file" ftype="vcf" value="annotate.vcf" /> | 203 <param name="input_file" ftype="vcf" value="annotate.vcf" /> |
