view pacu_snp.xml @ 0:7ba3e44093c9 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pacu commit 4290547cefb0459595f28fbba063f2cf58b35086
author iuc
date Tue, 13 Aug 2024 13:45:25 +0000
parents
children
line wrap: on
line source

<tool id="pacu_snp" name="PACU" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>whole genome sequencing based phylogeny of Illumina and ONT R9/R10 data</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro='xrefs'/>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code">
        <![CDATA[
        PACU_galaxy

        ## Input files
        --ref-fasta '$input.ref_fasta'
        --ref-fasta-name '$input.ref_fasta.element_identifier'

        #for $bam in $input.bam_ilmn:
            #if $bam:
                --bam-ilmn $bam '$bam.element_identifier'
            #end if
        #end for

        #for $bam in $input.bam_ont:
            #if $bam:
                --bam-ont $bam '$bam.element_identifier'
            #end if
        #end for

        ## Excluded regions
        #if $input.ref_bed:
            --ref-bed $input.ref_bed
        #end if

        ## Tree building method
        #if $params.tree_method == 'mega':
            --use-mega
        #end if

        ## Other parameters
        --min-global-depth $params.min_global_depth
        $params.skip_gubbins

        ## Output files
        --output-html '$html'
        --output '$html.files_path'

        ## Variant filters
        --min-snp-af $filtering.min_snp_af
        --min-snp-qual $filtering.min_snp_qual
        --min-snp-depth $filtering.min_snp_depth
        --min-snp-dist $filtering.min_snp_dist

        ## Other options
        --threads \${GALAXY_SLOTS}
        ]]>
    </command>
    <inputs>
        <!-- Input files -->
        <section name="input" title="Input files" expanded="true">
            <param argument="--ref-fasta" type="data" format="fasta" label="Reference genome"/>
            <param argument="--bam-ilmn" type="data" format="bam" multiple="true" optional="true"
                   label="BAM files (Illumina)"
                   help="Make sure the reads are mapped to the reference selected above."/>
            <param argument="--bam-ont" type="data" format="bam" multiple="true" optional="true" label="BAM files (ONT)"
                   help="Make sure the reads are mapped to the reference selected above."/>
            <param argument="--ref-bed" type="data" format="bed" optional="true" label="Excluded regions BED file" help="BED file with (pro)phage or other regions in the reference genome to be omitted from the SNP analysis."/>
        </section>

        <!-- Parameters -->
        <section name="params" title="Parameters" expanded="False">
            <param name="tree_method" type="select" label="Tree building method"
                   help="MEGA is not part of the Conda installation and may be unavailable.">
                <option value="iqtree" selected="true">IQ-TREE</option>
                <option value="mega">MEGA X</option>
            </param>
            <param argument="--skip-gubbins" type="boolean" label="Skip Gubbins" checked="false"
                   truevalue="--skip-gubbins" falsevalue=""
                   help="Skips recombination detection using Gubbins, this option can be used to work with fragmented reference genomes."/>
            <param argument="--min-global-depth" type="integer" label="Min. global depth" value="5" min="0" max="100"
                   help="Minimum depth across all samples for a position to be included in the SNP analysis."/>
        </section>

        <!-- Variant filtering -->
        <section name="filtering" title="Variant filters" expanded="false">
            <param argument="--min-snp-af" type="float" value="0.66" min="0.0" max="1.0" label="Min. allele frequency"/>
            <param argument="--min-snp-depth" type="integer" value="5" min="0" label="Min. depth"/>
            <param argument="--min-snp-qual" type="integer" value="50" min="0" max="255" label="Min. SNP quality"/>
            <param argument="--min-snp-dist" type="integer" value="10" min="0" max="100"
                   label="Min. distance between SNPs"/>
        </section>
    </inputs>

    <outputs>
        <data name="html" format="html" label="PACU (${input.ref_fasta.element_identifier})"/>
    </outputs>
    <tests>
        <test>
            <section name="input">
                <param name="ref_fasta" value="NC_002695.2-subset.fasta"/>
                <param name="bam_ilmn" value="TIAC1151.bam,TIAC1153.bam,TIAC1660.bam"/>
                <param name="bam_ont" value="TIAC1638-R9-ds.bam,TIAC1151-R10-ds.bam"/>
            </section>
            <section name="params">
                <param name="tree_method" value="iqtree"/>
            </section>
            <output name="html" ftype="html">
                <assert_contents>
                    <has_text text="PACU report"/>
                </assert_contents>
            </output>
        </test>
        <test>
            <section name="input">
                <param name="ref_fasta" value="NC_002695.2-subset.fasta"/>
                <param name="ref_bed" value="NC_002695.2-sample.bed"/>
                <param name="bam_ilmn" value="TIAC1151.bam,TIAC1153.bam,TIAC1660.bam"/>
                <param name="bam_ont" value="TIAC1638-R9-ds.bam,TIAC1151-R10-ds.bam"/>
            </section>
            <section name="params">
                <param name="tree_method" value="iqtree"/>
            </section>
            <output name="html" ftype="html">
                <assert_contents>
                    <has_text text="PACU report"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
        **Warning:** At least four input BAM files are required for bootstrapping (these can be a mix of Illumina / ONT
        datasets).

        **Note:** You can use the *'PACU - mapping'* tool in Galaxy to map Illumina or ONT reads to the reference
        genome.
    </help>
    <expand macro="citations"/>
</tool>