view ivar_variants.xml @ 0:12d66d0d05ac draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
author iuc
date Mon, 30 Mar 2020 07:45:57 -0400
parents
children 147465efa99c
line wrap: on
line source

<tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy0">
    <description>Call variants from aligned BAM file</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$ref' ref.fa &&
        ln -s '$input_bam' sorted.bam &&
        samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants 
        -p variants
        -q $min_qual
        -t $min_freq
    ]]>    </command>
    <inputs>
        <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/>
        <param name="ref" type="data" format="fasta" label="Reference"/>
        <param name="min_qual" argument="-q" type="integer" min="1" value="20" label="Minimum quality score threshold to count base"/>
        <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/>
    </inputs>
    <outputs>
        <data name="output_variants" format="tabular" label="${tool.name} on ${on_string}" from_work_dir="variants.tsv"/>
    </outputs>
    <tests>
        <test>
            <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" />
            <param name="ref" value="zika/db/PRV.fa" />
            <output name="output_variants" file="zika/Z52_a.tsv" lines_diff="10"/>
        </test>
    </tests>
    <help><![CDATA[
        iVar uses the output of the samtools mpileup command to call variants -
        single nucleotide variants(SNVs) and indels. In order to call variants
        correctly, the reference file used for alignment must be passed to iVar
        using the -r flag. The output of samtools pileup is piped into ivar variants
        to generate a .tsv file with the variants. There are two parameters that can
        be set for variant calling using iVar - minimum quality(Default: 20) and
        minimum frequency(Default: 0.03). Minimum quality is the minimum quality for
        a base to be counted towards the ungapped depth to canculate iSNV frequency
        at a given position. For insertions, the quality metric is discarded and the
        mpileup depth is used directly. Minimum frequency is the minimum frequency
        required for a SNV or indel to be reported.
        
        Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_.
    ]]>    </help>
    <expand macro="citations" />
</tool>