Mercurial > repos > iuc > bcftools_consensus
comparison bcftools_consensus.xml @ 26:62ed6ee05b6f draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/bcftools commit f6efda26965eb73c9107d367fd5ffdf246ed0dbc
| author | iuc |
|---|---|
| date | Tue, 02 Dec 2025 07:57:56 +0000 |
| parents | 5970245e8525 |
| children |
comparison
equal
deleted
inserted
replaced
| 25:411b66c55cf9 | 26:62ed6ee05b6f |
|---|---|
| 1 <?xml version='1.0' encoding='utf-8'?> | |
| 2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | 1 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 3 <description>Create consensus sequence by applying VCF variants to a reference fasta file</description> | 2 <description>Create consensus sequence by applying VCF variants to a reference fasta file</description> |
| 4 <macros> | 3 <macros> |
| 5 <token name="@EXECUTABLE@">consensus</token> | 4 <token name="@EXECUTABLE@">consensus</token> |
| 6 <import>macros.xml</import> | 5 <import>macros.xml</import> |
| 7 </macros> | 6 </macros> |
| 8 <expand macro="bio_tools" /> | 7 <expand macro="bio_tools"/> |
| 9 <expand macro="requirements"> | 8 <expand macro="requirements"> |
| 10 <expand macro="samtools_requirement"/> | 9 <expand macro="samtools_requirement"/> |
| 11 <requirement type="package" version="5.0.1">gawk</requirement> | 10 <requirement type="package" version="5.3.0">gawk</requirement> |
| 12 </expand> | 11 </expand> |
| 13 <expand macro="version_command" /> | 12 <expand macro="version_command"/> |
| 14 <command detect_errors="aggressive"><![CDATA[ | 13 <command detect_errors="aggressive"><![CDATA[ |
| 15 @PREPARE_ENV@ | |
| 16 @PREPARE_INPUT_FILE@ | 14 @PREPARE_INPUT_FILE@ |
| 17 #set $section = $reference_source | 15 #set $section = $reference_source |
| 18 @PREPARE_FASTA_REF@ | 16 @PREPARE_FASTA_REF@ |
| 19 | 17 |
| 18 #set $section = $sec_restrict | |
| 19 #if $section.regions.regions_src != '__none__': | |
| 20 samtools faidx | |
| 21 #if $section.regions.regions_src == 'regions': | |
| 22 #set $intervals = $section.regions.region_specs | |
| 23 @PARSE_INTERVALS@ | |
| 24 #set $ref_regions_spec = " ".join("'" + c + "'" for c in $components) | |
| 25 '$input_fa_ref' $ref_regions_spec | | |
| 26 #else if $section.regions.regions_src == 'regions_file': | |
| 27 -r '$section.regions.regions_file' '$input_fa_ref' | | |
| 28 #end if | |
| 29 #set $input_fa_ref = "-" | |
| 30 #end if | |
| 31 | |
| 20 bcftools @EXECUTABLE@ | 32 bcftools @EXECUTABLE@ |
| 21 | 33 |
| 34 #if $section.regions.regions_src != '__none__': | |
| 35 --regions-overlap $section.regions_overlap | |
| 36 #end if | |
| 37 | |
| 38 #set $section = $reference_source | |
| 22 @FASTA_REF@ | 39 @FASTA_REF@ |
| 23 | 40 |
| 24 ## Default section | 41 $mode.select |
| 25 #set $section = $sec_default | 42 #if not str($mode.select): |
| 26 | 43 $mode.specify_samples.how |
| 27 ${section.iupac_codes} | 44 #if str($mode.specify_samples.how) in ["-s", "-S"]: |
| 28 | 45 '${mode.specify_samples.invert_samples}${mode.specify_samples.samples_spec}' |
| 29 #if $section.mask: | 46 #end if |
| 30 --mask '${section.mask}' | 47 #else if str($mode.select) == "-H": |
| 31 #end if | 48 #if str(mode.haplotype.rule) in ["", "pIu"]: |
| 32 | 49 #set haplotype_option = str(mode.haplotype.allele_n) + str(mode.haplotype.rule) |
| 33 #if $section.mark_del | 50 #else: |
| 34 --mark-del '$section.mark_del' | 51 #set haplotype_option = str(mode.haplotype.rule) |
| 35 #end if | 52 #end if |
| 36 | 53 $haplotype_option |
| 37 #if $section.mark_ins | 54 #if $mode.sample: |
| 38 --mark-ins $section.mark_ins | 55 --sample '$mode.sample' |
| 39 #end if | 56 #end if |
| 40 | 57 #end if |
| 41 #if $section.mark_snv | 58 |
| 42 --mark-snv $section.mark_snv | 59 #set $masks = [] |
| 43 #end if | 60 #for $m in $masking_options.mask: |
| 44 | 61 #if $m: |
| 45 #if $section.select_haplotype: | 62 #silent $masks.append($m) |
| 46 --haplotype '${section.select_haplotype}' | 63 #end if |
| 47 #end if | 64 #end for |
| 48 @SAMPLE@ | 65 |
| 66 #if $masks: | |
| 67 #if $masking_options.mask_with: | |
| 68 #set $masking_instructions = [] | |
| 69 #for $i in str($masking_options.mask_with).split(",", maxsplit=len($masks)-1): | |
| 70 #silent $masking_instructions.append("--mask-with '" + $i + "'") | |
| 71 #end for | |
| 72 #else: | |
| 73 #set $masking_instructions = [""] | |
| 74 #end if | |
| 75 #if len($masking_instructions) == 1: | |
| 76 ## use same masking instruction for all masks | |
| 77 #set $masking_instructions = [""] * (len($masks) - 1) + $masking_instructions | |
| 78 #else if len($masking_instructions) < len($masks): | |
| 79 ## fill in empty masking instructions for missing ones, which will make bcftools complain about them | |
| 80 #silent $masking_instructions.extend(["--mask-with ''"] * (len($masks) - len($masking_instructions))) | |
| 81 #end if | |
| 82 | |
| 83 #for $m, $i in zip($masks, $masking_instructions): | |
| 84 --mask '$m' $i | |
| 85 #end for | |
| 86 #end if | |
| 87 | |
| 88 #if $masking_options.absent: | |
| 89 --absent '$masking_options.absent' | |
| 90 #end if | |
| 91 | |
| 92 #if $masking_options.mark_del: | |
| 93 --mark-del '$masking_options.mark_del' | |
| 94 #end if | |
| 95 | |
| 96 $masking_options.insertions.mark_ins | |
| 97 #if str($masking_options.insertions.mark_ins) == "--mark-ins": | |
| 98 '$masking_options.insertions.ins_custom' | |
| 99 #end if | |
| 100 | |
| 101 $masking_options.snvs.mark_snv | |
| 102 #if str($masking_options.snvs.mark_snv) == "--mark-snv": | |
| 103 '$masking_options.snvs.snv_custom' | |
| 104 #end if | |
| 49 | 105 |
| 50 #set $section = $sec_restrict | 106 #set $section = $sec_restrict |
| 51 @INCLUDE@ | 107 @INCLUDE@ |
| 52 @EXCLUDE@ | 108 @EXCLUDE@ |
| 53 | 109 |
| 54 #if $chain: | 110 #if $chain: |
| 55 --chain '$chain_file' | 111 --chain '$chain_file' |
| 56 #end if | |
| 57 | |
| 58 #if $absent | |
| 59 --absent '$absent' | |
| 60 #end if | 112 #end if |
| 61 | 113 |
| 62 ## Primary Input/Outputs | 114 ## Primary Input/Outputs |
| 63 #if str($rename) == "no" | 115 #if str($rename) == "no" |
| 64 --output '$output_file' | 116 --output '$output_file' |
| 65 #end if | 117 #end if |
| 66 @INPUT_FILE@ | 118 @INPUT_FILE@ |
| 67 #if str($rename) == "yes": | 119 #if str($rename) == "yes": |
| 68 #set basename=$input_file.element_identifier | 120 #set basename=$input_file.element_identifier |
| 69 | awk 'BEGIN {i=1} {if (match($0, /^>/)) {if (i==1) {name="${basename}"} else {name=sprintf("%s-%d","${basename}",i);} print(gensub(/>[^ ]+( ?.*)/, ">" name "\\1", 1)); i=i+1;} else {print}}' > '$output_file' | 121 | awk 'BEGIN {i=1} {if (match($0, /^>/)) {if (i==1) {name="${basename}"} else {name=sprintf("%s-%d","${basename}",i);} print(gensub(/>[^ ]+( ?.*)/, ">" name "\\1", 1)); i=i+1;} else {print}}' > '$output_file' |
| 70 #end if | 122 #end if |
| 71 ]]> | 123 ]]> |
| 72 </command> | 124 </command> |
| 73 <inputs> | 125 <inputs> |
| 74 <expand macro="macro_input" /> | 126 <expand macro="macro_input"/> |
| 75 <expand macro="macro_fasta_ref" /> | 127 <expand macro="macro_fasta_ref"/> |
| 76 <section name="sec_default" expanded="true" title="Default Options"> | 128 <conditional name="mode"> |
| 77 <param name="mask" type="data" format="tabular" label="Mask" optional="True" help="Replace regions with N" /> | 129 <param name="select" type="select" label="Consensus building mode; at each variant site ..."> |
| 78 <param name="iupac_codes" type="boolean" truevalue="--iupac-codes" falsevalue="" label="Iupac Codes" | 130 <option value="-s -">ignore any sample genotypes; incorporate first allele from ALT column (-s -)</option> |
| 79 help="Output variants in the form of IUPAC ambiguity codes" /> | 131 <option value="-I -s -">ignore any sample genotypes; incorporate IUPAC code representing all alleles from REF/ALT coulmns (-I -s -)</option> |
| 80 <expand macro="macro_sample" /> | 132 <option value="" selected="true">incorporate IUPAC code representing the genotypes of all selected samples (default)</option> |
| 81 <param name="select_haplotype" type="select" optional="true"> | 133 <option value="-H">incorporate specific haplotype allele of one selected sample</option> |
| 82 <option value="1">1</option> | |
| 83 <option value="2">2</option> | |
| 84 </param> | 134 </param> |
| 85 <param argument="--mark-del" type="text" value="" optional="true" label="Mark deletions" help="Instead of removing sequence, insert CHAR for deletions"> | 135 <when value="-s -" /> |
| 86 <sanitizer invalid_char=""> | 136 <when value="-I -s -" /> |
| 87 <valid initial="string.letters,string.digits"> | 137 <when value=""> |
| 88 <add value="_" /> | 138 <expand macro="macro_samples_enhanced" /> |
| 89 </valid> | 139 </when> |
| 90 </sanitizer> | 140 <when value="-H"> |
| 91 <validator type="regex">[0-9a-zA-Z_]+</validator> | 141 <expand macro="macro_sample" help="The name of the single sample alleles of which should get used for the consensus sequence. This field is optional only if your input VCF dataset specifies exactly one sample."/> |
| 142 <conditional name="haplotype"> | |
| 143 <param name="rule" type="select" label="From the selected sample's genotype use ...'"> | |
| 144 <option value="">the Nth allele (for both phased and unphased genotypes) (-H N)</option> | |
| 145 <option value="pIu">the Nth allele if the genotype is phased, the IUPAC code representing the genotype if it's unphased (-H NpIu)</option> | |
| 146 <option value="R">the ALT allele where the sample is homozygous, the REF allele otherwise (-H R)</option> | |
| 147 <option value="A">the ALT allele where the sample is homozygous or heterozygous (-H A)</option> | |
| 148 <option value="LR">the ALT allele where the sample is homozygous, the REF allele where it's heterozygous unless the ALT allele is longer (-H LR)</option> | |
| 149 <option value="LA">the ALT allele where the sample is homozygous, the ALT allele where it's heterozygous unless the REF allele is longer (-H LA)</option> | |
| 150 <option value="SR">the ALT allele where the sample is homozygous, the REF allele where it's heterozygous unless the ALT allele is shorter (-H SR</option> | |
| 151 <option value="SA">the ALT allele where the sample is homozygous, the ALT allele where it's heterozygous unless the REF allele is shorter (-H SA)</option> | |
| 152 </param> | |
| 153 <when value=""> | |
| 154 <param name="allele_n" type="integer" min="1" value="1" label="where N is" /> | |
| 155 </when> | |
| 156 <when value="pIu"> | |
| 157 <param name="allele_n" type="integer" min="1" value="1" label="where N is" /> | |
| 158 </when> | |
| 159 <when value="R" /> | |
| 160 <when value="A" /> | |
| 161 <when value="LR" /> | |
| 162 <when value="LA" /> | |
| 163 <when value="SR" /> | |
| 164 <when value="SA" /> | |
| 165 </conditional> | |
| 166 </when> | |
| 167 </conditional> | |
| 168 <section name="masking_options" expanded="false" title="Masking and marking options" help="The various options in this section are applied in the order they appear, i.e. 1) masking, 2) marking of absent sites, 3) SNV/indel marking."> | |
| 169 <param argument="--mask" type="data" format="tabular" multiple="true" optional="true" label="Mask" help="Replace regions according to the next --mask-with option"/> | |
| 170 <param argument="--mask-with" type="text" value="" optional="true" label="Mask with" help="Replace with CHAR (skips overlapping variants; default: N); use "uc" or "lc" to change to uppercase or lowercase, respectively. If you have provided more than one Mask dataset and you would like to apply a unique mask for the regions in each of them, then you can specify a comma-separated list of masking instructions (as many as mask datasets)." /> | |
| 171 <param argument="--absent" type="text" value="" optional="true" label="Mark absent" help="Replace reference bases at positions absent from the VCF input with a custom character."> | |
| 172 <validator type="regex">^.$</validator> | |
| 92 </param> | 173 </param> |
| 93 <param argument="--mark-ins" type="select" optional="true" label="Mark insertions" help="Highlight insertions in uppercase (uc) or lowercase (lc), leaving the rest as is"> | 174 <param argument="--mark-del" type="text" value="" optional="true" label="Mark deletions" help="Instead of removing the reference base at deleted positions, replace the base with a custom character."> |
| 94 <option value="uc">Uppercase</option> | 175 <validator type="regex">^.$</validator> |
| 95 <option value="lc">Lowercase</option> | |
| 96 </param> | 176 </param> |
| 97 <param argument="--mark-snv" type="select" optional="true" label="Mark substitutions" help="Highlight substitutions in uppercase (uc) or lowercase (lc), leaving the rest as is"> | 177 <conditional name="insertions"> |
| 98 <option value="uc">Uppercase</option> | 178 <param argument="--mark-ins" type="select" label="Mark insertions" help="Highlight insertions in uppercase or lowercase, or by using a fixed character instead of inserted bases, leaving the rest as is"> |
| 99 <option value="lc">Lowercase</option> | 179 <option value="">Do not mark insertions</option> |
| 100 </param> | 180 <option value="--mark-ins uc">Uppercase (uc)</option> |
| 101 <conditional name="conditional_mask"> | 181 <option value="--mark-ins lc">Lowercase (lc)</option> |
| 102 <param name="selector" type="select" label="Mask file option"> | 182 <option value="--mark-ins">Custom character</option> |
| 103 <option value="disabled">Disabled</option> | |
| 104 <option value="enabled">Enabled</option> | |
| 105 </param> | 183 </param> |
| 106 <when value="disabled"/> | 184 <when value="" /> |
| 107 <when value="enabled"> | 185 <when value="--mark-ins uc" /> |
| 108 <param argument="--mask" type="data" format="tabular" label="Mask" help="Replace regions according to the next --mask-with option" /> | 186 <when value="--mark-ins lc" /> |
| 109 <param argument="--mask-with" type="text" value="N" optional="true" label="Mask with" help="Replace with CHAR (skips overlapping variants); change to uppercase (uc) or lowercase (lc)"> | 187 <when value="--mark-ins"> |
| 110 <sanitizer invalid_char=""> | 188 <param name="ins_cutom" type="text" optional="false" label="Character to use instead of an inserted base"> |
| 111 <valid initial="string.letters,string.digits"> | 189 <validator type="empty_field"/> |
| 112 <add value="_" /> | 190 </param> |
| 113 </valid> | 191 </when> |
| 114 </sanitizer> | 192 </conditional> |
| 115 <validator type="regex">[0-9a-zA-Z_]+</validator> | 193 <conditional name="snvs"> |
| 194 <param argument="--mark-snv" type="select" label="Mark substitutions" help="Highlight substitutions in uppercase or lowercase, or by using a fixed character instead of substituted bases, leaving the rest as is"> | |
| 195 <option value="">Do not mark substitutions</option> | |
| 196 <option value="--mark-snv uc">Uppercase (uc)</option> | |
| 197 <option value="--mark-snv lc">Lowercase (lc)</option> | |
| 198 <option value="--mark-snv">Custom character</option> | |
| 199 </param> | |
| 200 <when value="" /> | |
| 201 <when value="--mark-snv uc" /> | |
| 202 <when value="--mark-snv lc" /> | |
| 203 <when value="--mark-snv"> | |
| 204 <param name="snv_custom" type="text" optional="false" label="Character to use instead of a subtituted base"> | |
| 205 <validator type="empty_field"/> | |
| 116 </param> | 206 </param> |
| 117 </when> | 207 </when> |
| 118 </conditional> | 208 </conditional> |
| 119 </section> | 209 </section> |
| 120 <param name="chain" type="boolean" truevalue="yes" falsevalue="no" label="Write a chain file for liftover" /> | 210 <section name="sec_restrict" expanded="false" title="Restrict to"> |
| 121 <param name="rename" type="boolean" truevalue="yes" falsevalue="no" label="Set output FASTA ID from name of VCF" /> | 211 <expand macro="macro_include"/> |
| 122 <param argument="--absent" type="text" value="" label="Absent" optional="true" help="It allows to set positions with no supporting evidence to N (or any other character)"> | 212 <expand macro="macro_exclude"/> |
| 123 <sanitizer invalid_char=""> | 213 <expand macro="macro_region_restrict" label_select="Restrict consensus building to only specified regions of reference?"/> |
| 124 <valid initial="string.letters,string.digits,string.punctuation"> | |
| 125 <remove value="@" /> | |
| 126 <remove value="'" /> | |
| 127 </valid> | |
| 128 </sanitizer> | |
| 129 </param> | |
| 130 <section name="sec_restrict" expanded="false" title="Restrict to"> | |
| 131 <expand macro="macro_include" /> | |
| 132 <expand macro="macro_exclude" /> | |
| 133 </section> | 214 </section> |
| 215 <param name="chain" type="boolean" truevalue="yes" falsevalue="no" label="Write a chain file for liftover"/> | |
| 216 <param name="rename" type="boolean" truevalue="yes" falsevalue="no" label="Set output FASTA ID from name of VCF"/> | |
| 134 </inputs> | 217 </inputs> |
| 135 <outputs> | 218 <outputs> |
| 136 <data name="output_file" format="fasta" label="${tool.name} on ${on_string}: consensus fasta"/> | 219 <data name="output_file" format="fasta" label="${tool.name} on ${on_string}: consensus fasta"/> |
| 137 <data name="chain_file" format="txt" label="${tool.name} on ${on_string}: chain"> | 220 <data name="chain_file" format="txt" label="${tool.name} on ${on_string}: chain"> |
| 138 <filter>chain</filter> | 221 <filter>chain</filter> |
| 139 </data> | 222 </data> |
| 140 </outputs> | 223 </outputs> |
| 141 <tests> | 224 <tests> |
| 142 <test expect_num_outputs="2"> | 225 <test expect_num_outputs="2"> |
| 143 <expand macro="test_using_reference" ref="consensus.fa" /> | 226 <expand macro="test_using_reference" ref="consensus.fa"/> |
| 144 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | 227 <param name="input_file" ftype="vcf" value="consensus.vcf"/> |
| 145 <param name="mask" ftype="tabular" value="consensus.tab" /> | 228 <section name="masking_options"> |
| 146 <param name="chain" value="True" /> | 229 <param name="mask" ftype="tabular" value="consensus.tab"/> |
| 147 <output name="output_file"> | 230 </section> |
| 148 <assert_contents> | 231 <param name="chain" value="true"/> |
| 149 <has_text text="NNNNNNNNNNNNNNNNNNNNNNNNNN" /> | 232 <output name="output_file"> |
| 233 <assert_contents> | |
| 234 <has_text text="NNNNNNNNNNNNNNNNNNNNNNNNNN"/> | |
| 150 </assert_contents> | 235 </assert_contents> |
| 151 </output> | 236 </output> |
| 152 <output name="chain_file"> | 237 <output name="chain_file"> |
| 153 <assert_contents> | 238 <assert_contents> |
| 154 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1" /> | 239 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1"/> |
| 155 </assert_contents> | 240 </assert_contents> |
| 156 </output> | 241 </output> |
| 157 </test> | 242 </test> |
| 158 <test expect_num_outputs="2"> | 243 <test expect_num_outputs="2"> |
| 159 <expand macro="test_using_reference" select_from="cached" ref="consensus" /> | 244 <expand macro="test_using_reference" select_from="cached" ref="consensus"/> |
| 160 <param name="input_file" ftype="vcf" dbkey="?" value="consensus.vcf" /> | 245 <param name="input_file" ftype="vcf" dbkey="?" value="consensus.vcf"/> |
| 161 <param name="mask" ftype="tabular" value="consensus.tab" /> | 246 <section name="masking_options"> |
| 162 <param name="chain" value="True" /> | 247 <param name="mask" ftype="tabular" value="consensus.tab"/> |
| 163 <output name="output_file"> | 248 </section> |
| 164 <assert_contents> | 249 <param name="chain" value="true"/> |
| 165 <has_text text="NNNNNNNNNNNNNNNNNNNNNNNNNN" /> | 250 <output name="output_file"> |
| 251 <assert_contents> | |
| 252 <has_text text="NNNNNNNNNNNNNNNNNNNNNNNNNN"/> | |
| 166 </assert_contents> | 253 </assert_contents> |
| 167 </output> | 254 </output> |
| 168 <output name="chain_file"> | 255 <output name="chain_file"> |
| 169 <assert_contents> | 256 <assert_contents> |
| 170 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1" /> | 257 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1"/> |
| 171 </assert_contents> | 258 </assert_contents> |
| 172 </output> | 259 </output> |
| 173 </test> | 260 </test> |
| 174 <test expect_num_outputs="1"> | 261 <test expect_num_outputs="1"> |
| 175 <expand macro="test_using_reference" ref="consensus.fa" /> | 262 <expand macro="test_using_reference" ref="consensus.fa"/> |
| 176 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | 263 <param name="input_file" ftype="vcf" value="consensus.vcf"/> |
| 177 <param name="mask" ftype="tabular" value="consensus.tab" /> | 264 <section name="masking_options"> |
| 178 <param name="chain" value="False" /> | 265 <param name="mask" ftype="tabular" value="consensus.tab"/> |
| 179 <param name="rename" value="True" /> | 266 </section> |
| 180 <output name="output_file"> | 267 <param name="chain" value="false"/> |
| 181 <assert_contents> | 268 <param name="rename" value="true"/> |
| 182 <has_text text=">consensus.vcf" /> | 269 <output name="output_file"> |
| 183 </assert_contents> | 270 <assert_contents> |
| 184 <assert_contents> | 271 <has_text text=">consensus.vcf"/> |
| 185 <has_text text=">consensus.vcf-2" /> | 272 </assert_contents> |
| 186 </assert_contents> | 273 <assert_contents> |
| 187 </output> | 274 <has_text text=">consensus.vcf-2"/> |
| 188 </test> | 275 </assert_contents> |
| 189 <test expect_num_outputs="1"> | 276 </output> |
| 190 <expand macro="test_using_reference" ref="consensus.fa" /> | 277 </test> |
| 191 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | 278 <test expect_num_outputs="1"> |
| 279 <expand macro="test_using_reference" ref="consensus.fa"/> | |
| 280 <param name="input_file" ftype="vcf" value="consensus.vcf"/> | |
| 281 <conditional name="mode"> | |
| 282 <param name="select" value="-s -"/> | |
| 283 </conditional> | |
| 192 <section name="sec_restrict"> | 284 <section name="sec_restrict"> |
| 193 <param name="include" value='TYPE="snp"' /> | 285 <param name="include" value="TYPE="snp""/> |
| 194 </section> | 286 </section> |
| 195 <output name="output_file"> | 287 <output name="output_file"> |
| 196 <assert_contents> | 288 <assert_contents> |
| 197 <has_text text="TACAAAATATGACATATCAAAAAGAACATAACCTACGTATCAACTAAAGTGGTTGTTTGA" /> | 289 <has_text text="TACAAAATATGACATATCAAAAAGAACATAACCTACGTATCAACTAAAGTGGTTGTTTGA"/> |
| 198 </assert_contents> | 290 </assert_contents> |
| 199 </output> | 291 </output> |
| 200 </test> | 292 </test> |
| 201 <!--Test absent option--> | 293 <!--Test absent option--> |
| 202 <test expect_num_outputs="1"> | 294 <test expect_num_outputs="1"> |
| 203 <expand macro="test_using_reference" ref="consensus.fa" /> | 295 <expand macro="test_using_reference" ref="consensus.fa"/> |
| 204 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | 296 <param name="input_file" ftype="vcf" value="consensus.vcf"/> |
| 297 <conditional name="mode"> | |
| 298 <param name="select" value="-s -"/> | |
| 299 </conditional> | |
| 300 <section name="masking_options"> | |
| 301 <param name="absent" value="W"/> | |
| 302 </section> | |
| 205 <section name="sec_restrict"> | 303 <section name="sec_restrict"> |
| 206 <param name="include" value='TYPE="snp"' /> | 304 <param name="include" value="TYPE="snp""/> |
| 207 </section> | 305 </section> |
| 208 <param name="absent" value="W"/> | 306 <output name="output_file"> |
| 209 <output name="output_file"> | 307 <assert_contents> |
| 210 <assert_contents> | 308 <has_text text="WWWAWAWWAWWWWWWWWCWWWWWWWW"/> |
| 211 <has_text text="WWWAWAWWAWWWWWWWWCWWWWWWWW" /> | |
| 212 </assert_contents> | 309 </assert_contents> |
| 213 </output> | 310 </output> |
| 214 <assert_command> | 311 <assert_command> |
| 215 <has_text text="--absent" /> | 312 <has_text text="--absent"/> |
| 216 </assert_command> | 313 </assert_command> |
| 217 </test> | 314 </test> |
| 218 <!--Test mask options --> | 315 <test expect_num_outputs="1"> |
| 219 <test expect_num_outputs="1"> | 316 <expand macro="test_using_reference" ref="consensus.fa"/> |
| 220 <expand macro="test_using_reference" ref="consensus.fa" /> | 317 <param name="input_file" ftype="vcf" value="consensus.vcf"/> |
| 221 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | 318 <conditional name="mode"> |
| 319 <param name="select" value="-s -"/> | |
| 320 </conditional> | |
| 321 <section name="masking_options"> | |
| 322 <param name="mark_del" value="-"/> | |
| 323 <conditional name="insertions"> | |
| 324 <param name="mark_ins" value="--mark-ins uc"/> | |
| 325 </conditional> | |
| 326 <conditional name="snvs"> | |
| 327 <param name="mark_snv" value="--mark-snv uc"/> | |
| 328 </conditional> | |
| 329 </section> | |
| 222 <section name="sec_restrict"> | 330 <section name="sec_restrict"> |
| 223 <param name="include" value='TYPE="snp"' /> | 331 <param name="include" value="TYPE="snp""/> |
| 224 </section> | 332 </section> |
| 225 <section name="sec_default"> | 333 <output name="output_file"> |
| 226 <param name="mark_del" value="DEL"/> | 334 <assert_contents> |
| 227 <param name="mark_ins" value="uc"/> | 335 <has_text text="TACAAAATATGACATATCAAAAAGAACATAACCTACGTATCAACTAAAGTGGTTGTTTGA"/> |
| 228 <param name="mark_snv" value="uc"/> | |
| 229 </section> | |
| 230 <output name="output_file"> | |
| 231 <assert_contents> | |
| 232 <has_text text="TACAAAATATGACATATCAAAAAGAACATAACCTACGTATCAACTAAAGTGGTTGTTTGA" /> | |
| 233 </assert_contents> | 336 </assert_contents> |
| 234 </output> | 337 </output> |
| 235 <assert_command> | 338 <assert_command> |
| 236 <has_text text="--mark-del" /> | 339 <has_text text="--mark-del"/> |
| 237 <has_text text="--mark-ins" /> | 340 <has_text text="--mark-ins"/> |
| 238 <has_text text="--mark-snv" /> | 341 <has_text text="--mark-snv"/> |
| 239 </assert_command> | 342 </assert_command> |
| 343 </test> | |
| 344 <test expect_num_outputs="1"> | |
| 345 <expand macro="test_using_reference" ref="csq.fa"/> | |
| 346 <param name="input_file" ftype="vcf" value="csq.vcf"/> | |
| 347 <section name="masking_options"> | |
| 348 <param name="absent" value="."/> | |
| 349 <param name="mark_del" value="-"/> | |
| 350 </section> | |
| 351 <section name="sec_restrict"> | |
| 352 <conditional name="regions"> | |
| 353 <param name="regions_src" value="regions"/> | |
| 354 <repeat name="region_specs"> | |
| 355 <param name="chrom" value="1"/> | |
| 356 <param name="start" value="161"/> | |
| 357 <param name="stop" value="190"/> | |
| 358 </repeat> | |
| 359 </conditional> | |
| 360 </section> | |
| 361 <output name="output_file"> | |
| 362 <assert_contents> | |
| 363 <has_line line=">1:161-190"/> | |
| 364 <has_line line="-............................Y"/> | |
| 365 </assert_contents> | |
| 366 </output> | |
| 367 </test> | |
| 368 <test expect_num_outputs="1"> | |
| 369 <expand macro="test_using_reference" ref="csq.fa"/> | |
| 370 <param name="input_file" ftype="vcf" value="csq.vcf"/> | |
| 371 <section name="masking_options"> | |
| 372 <param name="absent" value="."/> | |
| 373 <param name="mark_del" value="-"/> | |
| 374 </section> | |
| 375 <section name="sec_restrict"> | |
| 376 <conditional name="regions"> | |
| 377 <param name="regions_src" value="regions"/> | |
| 378 <repeat name="region_specs"> | |
| 379 <param name="chrom" value="1"/> | |
| 380 <param name="start" value="161"/> | |
| 381 <param name="stop" value="190"/> | |
| 382 </repeat> | |
| 383 <param name="regions_overlap" value="0"/> | |
| 384 </conditional> | |
| 385 </section> | |
| 386 <output name="output_file"> | |
| 387 <assert_contents> | |
| 388 <has_line line=">1:161-190"/> | |
| 389 <has_line line=".............................Y"/> | |
| 390 </assert_contents> | |
| 391 </output> | |
| 240 </test> | 392 </test> |
| 241 </tests> | 393 </tests> |
| 242 <help><![CDATA[ | 394 <help><![CDATA[ |
| 243 ===================================== | 395 ===================================== |
| 244 bcftools @EXECUTABLE@ plugin | 396 bcftools @EXECUTABLE@ plugin |
| 247 | 399 |
| 248 Create consensus sequence by applying VCF variants to a reference fasta file. | 400 Create consensus sequence by applying VCF variants to a reference fasta file. |
| 249 | 401 |
| 250 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ | 402 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ |
| 251 | 403 |
| 252 @BCFTOOLS_WIKI@ | 404 @BCFTOOLS_HOWTOS@ |
| 253 | 405 |
| 254 The option to set the new consensus' FASTA ID from the name of the VCF is provided by post-processing | 406 The option to set the new consensus' FASTA ID from the name of the VCF is provided by post-processing |
| 255 the bcftools consensus output. It is primarily intended for use when the VCF is coming from a list | 407 the bcftools consensus output. It is primarily intended for use when the VCF is coming from a list |
| 256 collection where the elements of the list are named meaningfully (e.g. named after sample names). This | 408 collection where the elements of the list are named meaningfully (e.g. named after sample names). This |
| 257 is useful when consensus sequences are being prepared for, for example, feeding a multiple sequence | 409 is useful when consensus sequences are being prepared for, for example, feeding a multiple sequence |
| 258 alignment to a phylogeny program. | 410 alignment to a phylogeny program. |
| 259 ]]> | 411 ]]> |
| 260 </help> | 412 </help> |
| 261 <expand macro="citations" /> | 413 <expand macro="citations"/> |
| 262 </tool> | 414 </tool> |
