view bcftools_concat.xml @ 5:40174941cbda draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 9d03fe38504a35d11660dadb44cb1beee32fcf4e
author iuc
date Thu, 13 Apr 2017 17:44:25 -0400
parents 3b318cfab085
children 2d95ed0b720a
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
    <description>Concatenate or combine VCF/BCF files</description>
    <macros>
        <token name="@EXECUTABLE@">concat</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="aggressive"><![CDATA[
@PREPARE_ENV@
@PREPARE_INPUT_FILES@
#set $section = $sec_restrict
@PREPARE_REGIONS_FILE@

bcftools @EXECUTABLE@

## Default section
#set $section = $sec_default

#if $section.overlaps.allow_overlaps == 'yes':
  --allow-overlaps
  #if $section.overlaps.rm_dups:
    --rm-dups $section.overlaps.rm_dups
  #end if
#end if
${section.ligate}
${section.compact_PS}
#if $section.min_PQ:
  --min-PQ "${section.min_PQ}"
#end if

#set $section = $sec_restrict
@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_regions" />
        </section>
        <section name="sec_default" expanded="true" title="Concat Options">
            <conditional name="overlaps">
                <param name="allow_overlaps" type="select" label="Allow Overlaps">   
                    <help>
                    First coordinate of the next file can precede last record of the current file. 
                    </help>
                    <option value="yes">Yes </option>
                    <option value="no">No </option>
                </param>
                <when value="yes">
                    <param name="rm_dups" type="select" label="Remove duplicate" optional="True" >
                        <help><![CDATA[
                         Output duplicate records present in multiple files only once: 
                           rm-dups <snps|indels|both|all|none>
                        ]]></help>
                        <option value="snps">snps - SNP records</option>
                        <option value="indels">indels - indel records</option>
                        <option value="both">both - both SNP and indel records</option>
                        <option value="all">all - records</option>
                        <option value="none">none - output multiple records instead</option>
                    </param>
                </when>
                <when value="no"/>
            </conditional>
            <param name="ligate" type="boolean" truevalue="--ligate" falsevalue="" label="Ligate" 
                   help="Ligate phased VCFs by matching phase at overlapping haplotypes" />
            <param name="compact_PS" type="boolean" truevalue="--compact-PS" falsevalue="" label="Compact Ps" 
                   help="Do not output PS tag at each site, only at the start of a new phase set block." />
            <param name="min_PQ" type="integer" label="Min Pq" value="30" optional="True" 
                   help="Break phase set if phasing quality is lower than &lt;int&gt;" />
        </section>
        <expand macro="macro_select_output_type" />
    </inputs>
    <outputs>
        <expand macro="macro_vcf_output"/>
    </outputs>
    <tests>
       <test>
            <param name="input_files" ftype="vcf" value="concat.1.b.vcf,concat.1.a.vcf" />
            <param name="output_type" value="v" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="1\t100"/>
                    <has_text_matching expression="3\t192"/>
                </assert_contents>
            </output>
        </test>
       <test>
            <param name="input_files" ftype="vcf" value="concat.2.b.vcf,concat.2.a.vcf" />
            <param name="allow_overlaps" value="yes" />
            <param name="output_type" value="v" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="2\t140\t.\tA\tG"/>
                    <has_text_matching expression="2\t140\t.\tGT\tG"/>
                </assert_contents>
            </output>
        </test>
       <test>
            <param name="input_files" ftype="vcf" value="concat.2.b.vcf,concat.2.a.vcf" />
            <param name="allow_overlaps" value="yes" />
            <param name="rm_dups" value="none" />
            <param name="output_type" value="v" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="2\t160\t.\tTAAAA"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
=====================================
 bcftools @EXECUTABLE@ plugin
=====================================

Concatenate or combine VCF/BCF files. All source files must have the same sample columns appearing in the same order. The program can be used, for example, to concatenate chromosome VCFs into one VCF, or combine a SNP VCF and an indel VCF into one. The input files must be sorted by chr and position. The files must be given in the correct order to produce sorted VCF on output unless the -a, --allow-overlaps option is specified.

@REGIONS_HELP@

@BCFTOOLS_MANPAGE@#@EXECUTABLE@

@BCFTOOLS_WIKI@
]]>
    </help>
    <expand macro="citations" />
</tool>