view lr.xml @ 0:629a0066003d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/delly commit 86ada42b811af0262618636f2d8d1788274f9884"
author iuc
date Mon, 28 Sep 2020 07:45:41 +0000
parents
children d5124d5c8131
line wrap: on
line source

<?xml version="1.0"?>
<tool id="delly_lr" name="Delly long-read (lr)" version="@TOOL_VERSION@+galaxy0" profile="18.01">
    <description>optimized calling and genotyping of structural variants</description>
    <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($samples)
    ln -s '${current}' 'sample_${i}.bam' &&
    ln -s '${current.metadata.bam_index}' 'sample_${i}.bam.bai' &&
#end for
        
## run
delly lr
## generic options
--svtype $generic.svtype
--technology $generic.technology
--genome '$generic.genome'
#if $generic.exclude
    --exclude '$generic.exclude'
#end if
--outfile 'result.bcf'
## discovery options
--mapqual $discovery.mapqual
--minclip $discovery.minclip
--minrefsep $discovery.minrefsep
--maxreadsep $discovery.maxreadsep
## genotyping options
#if $genotyping.vcffile
    --vcffile '$genotyping.vcffile'
#end if
--geno-qual $genotyping.genoqual
#if 'dump' in $oo.out
    --dump 'dump.tsv.gz'
#end if
## samples
#for $i, $current in enumerate($samples)
    'sample_${i}.bam'
#end for

## postprocessing
#if 'log' in $oo.out
    |& tee 'log.txt'
#end if
#if 'vcf' in $oo.out
    && test -f 'result.bcf' && bcftools view 'result.bcf' > 'result.vcf' || echo 'No results.'
#end if
#if 'dump' in $oo.out
    && test -f 'dump.tsv.gz' && bgzip -d 'dump.tsv.gz' || echo 'No dump file.'
#end if
    ]]></command>
    <inputs>
        <expand macro="samples"/>
        <section name="generic" title="Generic options" expanded="true">
            <expand macro="genome"/>
            <expand macro="svtype"/>
            <expand macro="exclude"/>
            <param argument="--technology" type="select" label="Select sequencing technology">
                <option value="ont" selected="true">Oxford Nanopore (ont)</option>
                <option value="pb">Pacbio (pb)</option>
            </param>
        </section>
        <section name="discovery" title="Discovery options" expanded="true">
            <param argument="--mapqual" type="integer" value="1" label="Set minimum mapping quality"/>
            <expand macro="minclip"/>
            <expand macro="minrefsep"/>
            <expand macro="maxreadsep"/>
        </section>
        <section name="genotyping" title="Genotyping options" expanded="true">
            <expand macro="vcffile"/>
            <expand macro="genoqual"/>
        </section>
        <section name="oo" title="Output options">
            <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)">
                <option value="bcf" selected="true">BCF</option>
                <option value="vcf">VCF</option>
                <option value="dump">SV-reads</option>
                <option value="log">Log</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <expand macro="vcf"/>
        <expand macro="bcf"/>
        <expand macro="dump"/>
        <expand macro="log"/>
    </outputs>
    <tests>
        <!-- no test implemented for parameter vcffile -->

        <!-- #1 default, single -->
        <test expect_num_outputs="2">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf,bcf"/>
            </section>
            <output name="out_vcf">
                <assert_contents>
                    <has_size value="3661" delta="10"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;normal"/>
                </assert_contents>
            </output>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1184" delta="10"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 default, multi; test data to small, results are empty -->
        <test expect_num_outputs="3">
            <param name="samples" value="normal.bam,tumor.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf,bcf,log"/>
            </section>
            <output name="out_vcf">
                <assert_contents>
                    <has_size value="3667" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1189" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+Done.+"/>
                </assert_contents>
            </output>
        </test>
       <!-- #3 -->
        <test expect_num_outputs="4">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="exclude" value="exclude.tsv"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf,bcf,dump,log"/>
            </section>
            <output name="out_vcf">
                <assert_contents>
                    <has_size value="3661" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1186" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_dump">
                <assert_contents>
                    <has_n_lines n="0"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+Done.+"/>
                </assert_contents>
            </output>
        </test>
        <!-- #4 -->
        <test expect_num_outputs="4">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="svtype" value="DEL"/>
                <param name="technology" value="pb"/>
            </section>
            <section name="discovery">
                <param name="mapqual" value="2"/>
                <param name="qualtra" value="19"/>
                <param name="madcutoff" value="8"/>
                <param name="minclip" value="24"/>
                <param name="minrefsep" value="24"/>
                <param name="maxreadsep" value="39"/>
            </section>
            <section name="genotyping">
                <param name="genoqual" value="4"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf,bcf,dump,log"/>
            </section>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1182" delta="10"/>
                </assert_contents>
            </output>
            <output name="out_vcf">
                <assert_contents>
                    <has_size value="3661" delta="10"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;normal"/>
                </assert_contents>
            </output>
            <output name="out_dump">
                <assert_contents>
                    <has_size value="0"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+"/>
                </assert_contents>
            </output>
        </test>
        <!-- #5 -->
        <test expect_num_outputs="1">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="svtype" value="INS"/>
            </section>
            <section name="oo">
                <param name="out" value="vcf"/>
            </section>
            <output name="out_vcf">
                <assert_contents>
                    <has_size value="3661" delta="10"/>
                    <has_line line="#CHROM&#009;POS&#009;ID&#009;REF&#009;ALT&#009;QUAL&#009;FILTER&#009;INFO&#009;FORMAT&#009;normal"/>
                </assert_contents>
            </output>
        </test>
        <!-- #6 -->
        <test expect_num_outputs="1">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="svtype" value="DUP"/>
            </section>
            <section name="oo">
                <param name="out" value="bcf"/>
            </section>
            <output name="out_bcf">
                <assert_contents>
                    <has_size value="1182" delta="10"/>
                </assert_contents>
            </output>
        </test>
        <!-- #7 -->
        <test expect_num_outputs="1">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="svtype" value="INV"/>
            </section>
            <section name="oo">
                <param name="out" value="dump"/>
            </section>
            <output name="out_dump">
                <assert_contents>
                    <has_size value="0"/>
                </assert_contents>
            </output>
        </test>
        <!-- #8 -->
        <test expect_num_outputs="1">
            <param name="samples" value="normal.bam"/>
            <section name="generic">
                <param name="genome" value="genome.fasta"/>
                <param name="svtype" value="BND"/>
            </section>
            <section name="oo">
                <param name="out" value="log"/>
            </section>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

Delly *lr* uses the long-read SV discovery mode.

**Input**

Delly *lr* needs a sorted, indexed and duplicate marked BAM file for every input sample. An indexed reference genome is required to identify split-reads. Additionally a VCF/BCF file for genotyping can be applied.

**Output**

The output is available in BCF and VCF format. Additionally a output file for SV-reads is provided.

.. class:: infomark

**References**

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