Mercurial > repos > iuc > bcftools_merge
view bcftools_merge.xml @ 23:d3286f971e89 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 08:05:39 +0000 |
| parents | 2215287d5cc9 |
| children |
line wrap: on
line source
<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description>Merge multiple VCF/BCF files from non-overlapping sample sets to create one multi-sample file</description> <macros> <token name="@EXECUTABLE@">merge</token> <import>macros.xml</import> </macros> <expand macro="bio_tools"/> <expand macro="requirements"/> <expand macro="version_command"/> <command detect_errors="aggressive"><![CDATA[ @PREPARE_INPUT_FILES@ #set $section = $sec_restrict @PREPARE_REGIONS_FILE@ bcftools @EXECUTABLE@ ## Header section #set $section = $sec_header ${section.print_header} #if $section.use_header: --use-header "${section.use_header}" #end if ## Merge section #set $section = $sec_merge ${section.force_samples} #if $section.info_rules: --info-rules "${section.info_rules}" #end if #if $section.merge: --merge "${section.merge}" $section.no_index #end if #set $section = $sec_restrict @APPLY_FILTERS@ @REGIONS@ @OUTPUT_TYPE@ @THREADS@ ## Primary Input/Outputs @INPUT_FILES@ > '$output_file' ]]> </command> <inputs> <expand macro="macro_inputs"/> <section name="sec_restrict" expanded="false" title="Restrict to"> <expand macro="macro_apply_filters"/> <expand macro="macro_region_restrict"/> </section> <section name="sec_merge" expanded="true" title="Merge Options"> <param name="force_samples" type="boolean" truevalue="--force-samples" falsevalue="" label="Force Samples" help="Resolve duplicate sample names"/> <param name="info_rules" type="text" label="Info Rules" help="Rules for merging INFO fields (method is one of sum,avg,min,max,join) or "-" to turn off the default [DP:sum,DP4:sum]"/> <param name="merge" type="select" label="Merge" optional="True" help="Allow multiallelic records for: snps|indels|both|all|none|id, see man page for details [both]"> <option value="none">none - no new multiallelics, output multiple records instead</option> <option value="snps">snps - allow multiallelic SNP records</option> <option value="indels">indels - allow multiallelic indel records</option> <option value="both">both - both SNP and indel records can be multiallelic</option> <option value="all">all - SNP records can be merged with indel records</option> <option value="id">id - merge by ID</option> </param> <param argument="--no-index" type="boolean" truevalue="--no-index" falsevalue="" checked="false" label="Allow merge unindexed files" help="Requires the input files to have chromosomes in th same order and consistent with the order of sequences in the header"/> </section> <section name="sec_header" expanded="false" title="Header Options"> <param name="use_header" type="data" format="vcf" label="Use Header" optional="True" help="Use the provided header"/> <param name="print_header" type="boolean" truevalue="--print-header" falsevalue="" label="Print Header" help="Print only the merged header and exit"/> </section> <expand macro="macro_select_output_type"/> </inputs> <outputs> <expand macro="macro_vcf_output"/> </outputs> <tests> <test> <param name="input_files" ftype="vcf" value="merge.a.vcf,merge.b.vcf,merge.c.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text text="3000150"/> <has_text text="3188209"/> <has_text_matching expression="\tq10;q20\t[\s]*INDEL"/> </assert_contents> </output> </test> <test> <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="merge" value="none"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000000\t.\tC\tCCG\t"/> <has_text_matching expression="1\t3000000\t.\tC\tG\t"/> </assert_contents> </output> </test> <test> <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="merge" value="both"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000150\t\.\tC\t(A,G|G,A)\t"/> <has_text_matching expression="1\t3106154\t\.\tC\t(CC,CCC|CCC,CC)\t"/> </assert_contents> </output> </test> <test> <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="merge" value="all"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000000\t\.\tC\t(CCG,G|G,CCG)\t"/> </assert_contents> </output> </test> <test> <param name="input_files" ftype="vcf" value="merge.3.a.vcf,merge.3.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="info_rules" value="TR:sum,TA:sum,TG:sum"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000000\t.\tC\t(CG,CCG|CCG,CG)\t"/> <has_text_matching expression="TR=[^;\t]*11"/> </assert_contents> </output> </test> <!-- Test no_index option --> <test> <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="merge" value="id"/> <param name="no_index" value="true"/> </section> <param name="output_type" value="v"/> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000000\tid1\tC\t(A,CCG|CCG,A)\t"/> </assert_contents> </output> <assert_command> <has_text text="--no-index"/> </assert_command> </test> <!-- Test region overlap option --> <test> <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf"/> <section name="sec_merge"> <param name="force_samples" value="true"/> <param name="merge" value="id"/> </section> <param name="output_type" value="v"/> <section name="sec_restrict"> <conditional name="regions"> <param name="regions_src" value="regions" /> <repeat name="region_specs"> <param name="chrom" value="1" /> </repeat> </conditional> </section> <output name="output_file"> <assert_contents> <has_text_matching expression="1\t3000000\tid1\tC\t(A,CCG|CCG,A)\t"/> </assert_contents> </output> <assert_command> <has_text text="--regions-overlap"/> </assert_command> </test> </tests> <help><![CDATA[ ===================================== bcftools @EXECUTABLE@ ===================================== Merge multiple VCF/BCF files from non-overlapping sample sets to create one multi-sample file. Note that only records from different files can be merged, never from the same file. For "vertical" merge take a look at "bcftools norm" instead. @REGIONS_HELP@ @BCFTOOLS_MANPAGE@#@EXECUTABLE@ @BCFTOOLS_HOWTOS@ ]]> </help> <expand macro="citations"/> </tool>
