view amrfinderplus.xml @ 2:a9e5d593228e draft default tip

planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/ncbi-armfinderplus commit 2c3091cc8850849ac99884f92f195e4de9774f99
author thanhlv
date Wed, 11 Sep 2019 09:51:28 -0400
parents f92ab7729a35
children
line wrap: on
line source

<tool id="amrfinder" name="amrfinder" version="@VERSION@+galaxy1">
    <description>
      identifies AMR genes using either protein annotations or nucleotide sequence.
    </description>
    <macros>
        <token name="@VERSION@">3.1.1b</token>
    </macros>
    <requirements>
        <requirement type="package" version="@VERSION@">ncbi-amrfinderplus</requirement>
    </requirements>
    <version_command><![CDATA[amrfinder --version]]></version_command>

    <command detect_errors="exit_code"><![CDATA[
    amrfinder
    $plus
    --threads \${GALAXY_SLOTS:-1}
    --database '$amrfinder_databases.fields.path'
    #if $input_selection.input_source_selector == 'nuc'
        -n '$input_selection.fasta_file'
    #elif  $input_selection.input_source_selector == 'pro'
        -p '$input_selection.fasta_file'
        #if $input_selection.gff.use == 'gff_yes'
            -g '$input_selection.gff.gff_file'
        #end if
    #elif  $input_selection.input_source_selector == 'both'   
        -n '$input_selection.nuc_file'
        -p '$input_selection.pro_file'
        #if $input_selection.gff.use == 'gff_yes'
            -g '$input_selection.gff.gff_file'
        #end if
    #end if
    #if str($organism) != 'None'
        -O $organism
    #end if
    -o results.tsv
    $report_common
    #if $point_mut_all
        --point_mut_all point_mutate.tsv
    #end if
    $gpipe
    ]]>    </command>

    <inputs>
        <conditional name="input_selection">
            <param name="input_source_selector" type="select" label="Input data type">
                <option value="nuc">Nucleotide</option>
                <option value="pro">Protein</option>
                <option value="both">Nucleotide and Protein</option>
            </param>
            <when value="nuc">
                <param name="fasta_file" type="data" format="fasta" label="Select nucleotide fasta file"/>
            </when>
            <when value="pro">
                <param name="fasta_file" type="data" format="fasta" label="Select protein fasta file"/>
                <conditional name="gff">
                    <param name="use" type="select" label="Using GFF to get genomic coordinates">
                        <option value="gff_yes">Yes</option>
                        <option value="gff_no" selected="true">No</option>
                    </param>
                    <when value="gff_yes">
                        <param name="gff_file" type="data" format="gff,gff3" label="Select GFF file" help="Protein id should be in the attribute 'Name=id' (9th field) of the rows with type 'CDS' or 'gene' (3rd field)."/>
                    </when>
                    <when value="gff_no">
                    </when>
                </conditional>
            </when>
            <when value="both">
                <param name="nuc_file" type="data" format="fasta" label="Select a nucleotide fasta file"/>
                <param name="pro_file" type="data" format="fasta" label="Select a protein fasta file"/>
                <conditional name="gff">
                    <param name="use" type="select" label="Using GFF to get genomic coordinates">
                        <option value="gff_yes">Yes</option>
                        <option value="gff_no" selected="true">No</option>
                    </param>
                    <when value="gff_yes">
                        <param name="gff_file" type="data" format="gff,gff3" label="Select GFF file" help="Protein id should be in the attribute 'Name=id' (9th field) of the rows with type 'CDS' or 'gene' (3rd field)."/>
                    </when>
                    <when value="gff_no">
                    </when>
                </conditional>
            </when>
        </conditional>
                <!-- DATABASE INPUT-->
        <param name="amrfinder_databases" label="Select a database" type="select">
            <options from_data_table="amrfinder_databases">
                <validator message="No database is available" type="no_options" />
            </options>
        </param>
        <param name="organism" type="select" optional="true" label="Get organism-specific results">
            <option value="Campylobacter">Campylobacter</option>
            <option value="Escherichia">Escherichia</option>
            <option value="Klebsiella">Klebsiella</option>
            <option value="Salmonella">Salmonella</option>
            <option value="Staphylococcus">Staphylococcus</option>
            <option value="Vibrio">Vibrio</option>
        </param>
        <param name="min_iden" argument="--ident_min" type="float" value="-1" label="Minimum identity for a blast-based hit" help="(Methods BLAST or PARTIAL). -1 means use a curated threshold if it exists and 0.9 otherwise. Setting this value to something other than -1 will override any curated similarity cutoffs" />
        <param name="min_cov" argument="--coverage_min" type="float" min="0" max="1" value="0.5" label="Minimum coverage of the reference protein" />
        <param name="plus" type="boolean" truevalue="--plus" falsevalue="" label="Add the plus genes to the report" />
        <param name="report_common" type="boolean" truevalue="--report_common" falsevalue="" label="Suppress proteins common to a taxonomy group" />
        <param name="point_mut_all" type="boolean" truevalue="true" falsevalue="false" label="Report all target positions of reference point mutations" />
        <param name="gpipe" type="boolean" truevalue="--gpipe" falsevalue="" label="Protein identifiers in the protein FASTA file have format gnl-project-accession" />
    </inputs>

    <outputs>
        <data name="result" format="tabular" from_work_dir="results.tsv" label="${tool.name} on ${on_string}: Result"/>
        <data name="point_mutate" format="tabular" from_work_dir="point_mutate.tsv" label="${tool.name} on ${on_string}: Point mutate all">
            <filter>point_mut_all</filter>
        </data>
    </outputs>

    <tests>
        <test> <!-- dna input-->
            <param name="input_source_selector" value="nuc"/>
            <param name="fasta_file" value="test_dna.fa" ftype="fasta"/>
            <param name="amrfinder_databases" value="2019-08-27.1" />
            <output name="result" file="test_dna.expected" lines_diff="1"/>
        </test>
        <test> <!-- dna input and organism, plus gene-->
            <param name="input_source_selector" value="nuc"/>
            <param name="fasta_file" value="test_dna.fa" ftype="fasta"/>
            <param name="organism" value="Escherichia" />
            <param name="plus" value="true" />
            <param name="amrfinder_databases" value="2019-08-27.1" />
            <output name="result" file="test_dna_Escherichia.expected" lines_diff="1"/>
        </test>
        <test> <!-- AA input-->
            <param name="input_source_selector" value="pro"/>
            <param name="fasta_file" value="test_prot.fa" ftype="fasta"/>
            <param name="amrfinder_databases" value="2019-08-27.1" />
            <output name="result" file="test_prot.expected" lines_diff="1"/>
        </test>
        <test> <!-- DNA and AA input-->
            <param name="input_source_selector" value="both"/>
            <param name="use" value="gff_yes"/>
            <param name="nuc_file" value="test_dna.fa" ftype="fasta"/>
            <param name="pro_file" value="test_prot.fa" ftype="fasta"/>
            <param name="use" value="gff_yes"/>
            <param name="gff_file" value="test_prot.gff" ftype="gff3"/>
            <param name="amrfinder_databases" value="2019-08-27.1" />
            <output name="result" file="test_both.expected" lines_diff="1"/>
        </test>
    </tests>


    <help><![CDATA[
    This software and the accompanying database are designed to find acquired
    antimicrobial resistance genes in bacterial protein or assembled nucleotide
    sequences as well as known point mutations for several taxa. With
    AMRFinderPlus we have added select members of additional classes of genes
    such as virulence factors, biocide, heat, acid, and metal resistance genes.
    More details: https://github.com/ncbi/amr/wiki
                ]]>    </help>
    <citations>
        <citation type="doi">10.1101/550707</citation>
    </citations>

</tool>