view merge.xml @ 3:1efb2b927957 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/delly commit d76130cdcb21f0390b4e68e733d38575fd5cc6c7"
author iuc
date Tue, 14 Dec 2021 19:05:40 +0000
parents 148389992630
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="delly_merge" name="Delly merge" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="18.01">
    <description>structural variants across/within BCF/VCF file(s)</description>
    <expand macro="bio_tools"/>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
## initialize
#for $i, $current in enumerate($input)
    #if $current.is_of_type('vcf')
        bcftools view -Ob '$current' > 'input_${i}.bcf.gz' &&
        bcftools index 'input_${i}.bcf.gz' &&
    #else
        ln -s '${current}' 'input_${i}.bcf.gz' &&
        ln -s '${current.metadata.bcf_index}' 'input_${i}.bcf.gz.csi' &&
    #end if
#end for

## run
delly merge
## generic options
--outfile 'result.bcf'
--chunks $generic.chunks
--vaf $generic.vaf
--coverage $generic.coverage
--minsize $generic.minsize
--maxsize $generic.maxsize
$generic.cnvmode
$generic.precise
$generic.pass
## overlap options
--bp-offset $overlap.bpoffset
--rec-overlap $overlap.recoverlap
## input
#for $i, $current in enumerate($input)
    'input_${i}.bcf.gz'
#end for

## postprocessing
@LOG@
@VCF@
    ]]></command>
    <inputs>
        <expand macro="input" format="bcf,vcf" multiple="true" label="Select input files"/>
        <section name="generic" title="Generic options" expanded="true">
            <param argument="--chunks" type="integer" value="500" label="Set maximum chunk size to merge groups of BCF files"/>
            <param argument="--vaf" type="float" value="0.15" min="0.0" max="1.0" label="Set minimum fractional ALT support"/>
            <expand macro="coverage" label="Set minimum coverage"/>
            <expand macro="minsize" default="0" label="Set minimum SV size"/>
            <expand macro="maxsize" default="1000000" label="Set maximum SV size"/>
            <param argument="--cnvmode" type="boolean" truevalue="--cnvmode" falsevalue="" label="Merge Delly CNV files?"/>
            <param argument="--precise" type="boolean" truevalue="--precise" falsevalue="" label="Filter sites for PRECISE?"/>
            <expand macro="pass"/>
        </section>
        <section name="overlap" title="Overlap options" expanded="true">
            <param name="bpoffset" type="integer" value="1000" label="Set maximum breakpoint offset" help="(--bp-offset)"/>
            <param name="recoverlap" type="float" value="0.8" label="Set minimum reciprocal overlap" help="(--rec-overlap)"/>
        </section>
        <section name="oo" title="Output options" expanded="true">
            <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)">
                <option value="bcf" selected="true">BCF</option>
                <option value="log">Log</option>
                <option value="vcf">VCF</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <expand macro="bcf"/>
        <expand macro="log"/>
        <expand macro="vcf"/>
    </outputs>
    <tests>
        <!-- #1 bcf, default -->
        <test expect_num_outputs="2">
            <param name="input" value="call_1.bcf.gz,call_2.bcf.gz"/>
            <section name="oo">
                <param name="out" value="vcf,bcf"/>
            </section>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1851" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_vcf">
                <assert_contents>
                    <has_n_lines n="128"/>
                    <has_line line="##fileformat=VCFv4.2"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 bcf -->
        <test expect_num_outputs="3">
            <param name="input" value="call_1.bcf.gz,call_2.bcf.gz"/>
            <section name="generic">
                <param name="chunks" value="500"/>
                <param name="vaf" value="0.16"/>
                <param name="coverage" value="10"/>
                <param name="minsize" value="0"/>
                <param name="maxsize" value="1000000"/>
                <param name="cnvmode" value="true"/>
                <param name="precise" value="true"/>
                <param name="pass" value="true"/>
            </section>
            <section name="overlap">
                <param name="bp-offset" value="1000"/>
                <param name="rec-overlap" value="0.79"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf,bcf,log"/>
            </section>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1021" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+Done\."/>
                </assert_contents>
            </output>
            <output name="out_vcf">
                <assert_contents>
                    <has_n_lines n="108"/>
                    <has_line line="##fileformat=VCFv4.2"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO"/>
                </assert_contents>
            </output>
        </test>
        <!-- #3 vcf, default -->
        <test expect_num_outputs="2">
            <param name="input" value="call_1.vcf.gz,call_2.vcf.gz"/>
            <section name="oo">
                <param name="out" value="vcf,bcf"/>
            </section>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1851" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_vcf">
                <assert_contents>
                    <has_n_lines n="128"/>
                    <has_line line="##fileformat=VCFv4.2"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

**Input**

Delly *merge* requires BCF or VCF files.

**Output**

A single file in BCF/VCF format.  Additionally a log file is provided.

.. class:: infomark

**References**

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