view mlst.xml @ 4:1f5641a52664 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mlst commit 19f25d46a82936f0b1a7b53ca1f70d5d6ef69cbe
author iuc
date Sat, 29 Dec 2018 13:30:32 -0500
parents 68cdb40ff91c
children 31812e7a1315
line wrap: on
line source

<tool id="mlst" name="MLST" version="@VERSION@">
    <description>Scans genomes against PubMLST schemes.</description>
    <macros>
        <import>macros.xml</import>

        <xml name="legacy_param">
            <param argument="--legacy" type="boolean" truevalue="--legacy" falsevalue="" checked="true" label="Include allele header" help="Include allele header row in output table (requires scheme to be set)" />
        </xml>
    </macros>
    <expand macro="requirements" />
    <expand macro="version_command" />

    <command detect_errors="aggressive"><![CDATA[
        #import re

        ## Creates symlinks for each input file based on the Galaxy 'element_identifier'
        ## Used so that a human-readable name appears in the output table (instead of 'dataset_xyz.dat')
        #set $named_input_files = ''
        #for $input_file in $input_files
            ## Add single quotes around each input file identifier
            #set $_input_file = "'{}'".format($input_file.element_identifier)
            ln -s '${input_file}' ${_input_file} &&
            #set $named_input_files = $named_input_files + ' ' + $_input_file
        #end for

        mlst --nopath
        --threads "\${GALAXY_SLOTS:-1}"
        #if str($settings.advanced) == "advanced"
            #if str($settings.minid)
                --minid=$settings.minid
            #end if
            #if str($settings.mincov)
                --mincov=$settings.mincov
            #end if
            #if $settings.novel
                --novel '${novel_alleles}'
            #end if
            #if str($settings.scheme_condition.set_scheme) == "auto"
                #if str($settings.scheme_condition.minscore)
                    --minscore=$settings.scheme_condition.minscore
                #end if
                #if str($settings.scheme_condition.exclude)
                    --exclude '${settings.scheme_condition.exclude}'
                #end if
            #elif str($settings.scheme_condition.set_scheme) == "list" or str($settings.scheme_condition.set_scheme) == "manual"
                #if str($settings.scheme_condition.scheme)
                    --scheme='${settings.scheme_condition.scheme}'
                #end if
                $settings.scheme_condition.legacy
            #end if
        #end if
        ${named_input_files}
        > "$report"
    ]]></command>

    <inputs>
        <param type="data" name="input_files" format="fasta,genbank" multiple="true" />
        <conditional name="settings">
            <param name="advanced" type="select" label="Specify advanced parameters">
                <option value="simple" selected="true">No, use program defaults.</option>
                <option value="advanced">Yes, see full parameter list.</option>
            </param>
            <when value="simple">
            </when>
            <when value="advanced">
                <param argument="--minid" type="integer" label="Minimum DNA %identity" value="95" min="0" max="100" help="Minimum DNA %identity of full allelle to consider 'similar' (default 95, must be between 0-100)" optional="true" />
                <param argument="--mincov" type="integer" label="Minimum DNA %coverage" value="10" help="Minimum DNA %coverage to report partial allele at all (default 10, must be between 0-100)" optional="true" />
                <param argument="--novel" type="boolean" checked="false" label="Output novel alleles" />
                <conditional name="scheme_condition">
                    <param name="set_scheme" type="select" label="Automatically set MLST scheme">
                        <option value="auto" selected="true">Automatic MLST scheme detection</option>
                        <option value="list">Select from a list of MLST schemes</option>
                        <option value="manual">Manually set MLST scheme</option>
                    </param>
                    <when value="auto">
                        <param argument="--minscore" type="integer" label="Minimum score to match scheme" value="50" min="0" max="100" help="Minumum score out of 100 to match a scheme" optional="true" />
                        <param argument="--exclude" type="text" area="false" label="Exclude these schemes" help="Ignore these schemes from auto detection (comma sep. list) (default 'ecoli_2,abaumannii')" optional="true" />
                    </when>
                    <when value="list">
                        <param argument="--scheme" type="select" label="PubMLST Scheme (list)" help="Select a MLST scheme">
                            <option value="abaumannii">abaumannii</option>
                            <option value="abaumannii_2">abaumannii_2</option>
                            <option value="achromobacter">achromobacter</option>
                            <option value="aeromonas">aeromonas</option>
                            <option value="aphagocytophilum">aphagocytophilum</option>
                            <option value="arcobacter">arcobacter</option>
                            <option value="bbacilliformis">bbacilliformis</option>
                            <option value="bcc">bcc</option>
                            <option value="bcereus">bcereus</option>
                            <option value="bhampsonii">bhampsonii</option>
                            <option value="bhenselae">bhenselae</option>
                            <option value="bhyodysenteriae">bhyodysenteriae</option>
                            <option value="bintermedia">bintermedia</option>
                            <option value="blicheniformis">blicheniformis</option>
                            <option value="bordetella">bordetella</option>
                            <option value="borrelia">borrelia</option>
                            <option value="bpilosicoli">bpilosicoli</option>
                            <option value="bpseudomallei">bpseudomallei</option>
                            <option value="brachyspira">brachyspira</option>
                            <option value="brucella">brucella</option>
                            <option value="bsubtilis">bsubtilis</option>
                            <option value="campylobacter">campylobacter</option>
                            <option value="cbotulinum">cbotulinum</option>
                            <option value="cconcisus">cconcisus</option>
                            <option value="cdifficile">cdifficile</option>
                            <option value="cdiphtheriae">cdiphtheriae</option>
                            <option value="cfetus">cfetus</option>
                            <option value="cfreundii">cfreundii</option>
                            <option value="chelveticus">chelveticus</option>
                            <option value="chlamydiales">chlamydiales</option>
                            <option value="chyointestinalis">chyointestinalis</option>
                            <option value="cinsulaenigrae">cinsulaenigrae</option>
                            <option value="clanienae">clanienae</option>
                            <option value="clari">clari</option>
                            <option value="cmaltaromaticum">cmaltaromaticum</option>
                            <option value="cronobacter">cronobacter</option>
                            <option value="csepticum">csepticum</option>
                            <option value="csputorum">csputorum</option>
                            <option value="cupsaliensis">cupsaliensis</option>
                            <option value="dnodosus">dnodosus</option>
                            <option value="ecloacae">ecloacae</option>
                            <option value="ecoli">ecoli</option>
                            <option value="ecoli_2">ecoli_2</option>
                            <option value="edwardsiella">edwardsiella</option>
                            <option value="efaecalis">efaecalis</option>
                            <option value="efaecium">efaecium</option>
                            <option value="fpsychrophilum">fpsychrophilum</option>
                            <option value="ganatis">ganatis</option>
                            <option value="hcinaedi">hcinaedi</option>
                            <option value="hinfluenzae">hinfluenzae</option>
                            <option value="hparasuis">hparasuis</option>
                            <option value="hpylori">hpylori</option>
                            <option value="hsuis">hsuis</option>
                            <option value="kaerogenes">kaerogenes</option>
                            <option value="kkingae">kkingae</option>
                            <option value="koxytoca">koxytoca</option>
                            <option value="kpneumoniae">kpneumoniae</option>
                            <option value="leptospira">leptospira</option>
                            <option value="leptospira_2">leptospira_2</option>
                            <option value="leptospira_3">leptospira_3</option>
                            <option value="lmonocytogenes">lmonocytogenes</option>
                            <option value="lsalivarius">lsalivarius</option>
                            <option value="mabscessus">mabscessus</option>
                            <option value="magalactiae">magalactiae</option>
                            <option value="mbovis">mbovis</option>
                            <option value="mcanis">mcanis</option>
                            <option value="mcaseolyticus">mcaseolyticus</option>
                            <option value="mcatarrhalis">mcatarrhalis</option>
                            <option value="mhaemolytica">mhaemolytica</option>
                            <option value="mhyopneumoniae">mhyopneumoniae</option>
                            <option value="mhyorhinis">mhyorhinis</option>
                            <option value="miowae">miowae</option>
                            <option value="mmassiliense">mmassiliense</option>
                            <option value="mplutonius">mplutonius</option>
                            <option value="mpneumoniae">mpneumoniae</option>
                            <option value="msynoviae">msynoviae</option>
                            <option value="mycobacteria">mycobacteria</option>
                            <option value="neisseria">neisseria</option>
                            <option value="orhinotracheale">orhinotracheale</option>
                            <option value="otsutsugamushi">otsutsugamushi</option>
                            <option value="pacnes">pacnes</option>
                            <option value="paeruginosa">paeruginosa</option>
                            <option value="pdamselae">pdamselae</option>
                            <option value="pfluorescens">pfluorescens</option>
                            <option value="pgingivalis">pgingivalis</option>
                            <option value="plarvae">plarvae</option>
                            <option value="pmultocida_multihost">pmultocida_multihost</option>
                            <option value="pmultocida_rirdc">pmultocida_rirdc</option>
                            <option value="ppentosaceus">ppentosaceus</option>
                            <option value="pputida">pputida</option>
                            <option value="psalmonis">psalmonis</option>
                            <option value="ranatipestifer">ranatipestifer</option>
                            <option value="rhodococcus">rhodococcus</option>
                            <option value="sagalactiae">sagalactiae</option>
                            <option value="saureus">saureus</option>
                            <option value="sbsec">sbsec</option>
                            <option value="scanis">scanis</option>
                            <option value="sdysgalactiae">sdysgalactiae</option>
                            <option value="senterica">senterica</option>
                            <option value="sepidermidis">sepidermidis</option>
                            <option value="sgallolyticus">sgallolyticus</option>
                            <option value="shaemolyticus">shaemolyticus</option>
                            <option value="shominis">shominis</option>
                            <option value="sinorhizobium">sinorhizobium</option>
                            <option value="slugdunensis">slugdunensis</option>
                            <option value="smaltophilia">smaltophilia</option>
                            <option value="soralis">soralis</option>
                            <option value="spneumoniae">spneumoniae</option>
                            <option value="spseudintermedius">spseudintermedius</option>
                            <option value="spyogenes">spyogenes</option>
                            <option value="ssuis">ssuis</option>
                            <option value="sthermophilus">sthermophilus</option>
                            <option value="sthermophilus_2">sthermophilus_2</option>
                            <option value="streptomyces">streptomyces</option>
                            <option value="suberis">suberis</option>
                            <option value="szooepidemicus">szooepidemicus</option>
                            <option value="taylorella">taylorella</option>
                            <option value="tenacibaculum">tenacibaculum</option>
                            <option value="tpallidum">tpallidum</option>
                            <option value="ureaplasma">ureaplasma</option>
                            <option value="vcholerae">vcholerae</option>
                            <option value="vcholerae2">vcholerae2</option>
                            <option value="vibrio">vibrio</option>
                            <option value="vparahaemolyticus">vparahaemolyticus</option>
                            <option value="vtapetis">vtapetis</option>
                            <option value="vvulnificus">vvulnificus</option>
                            <option value="wolbachia">wolbachia</option>
                            <option value="xfastidiosa">xfastidiosa</option>
                            <option value="yersinia">yersinia</option>
                            <option value="ypseudotuberculosis">ypseudotuberculosis</option>
                            <option value="yruckeri">yruckeri</option>
                        </param>
                        <expand macro="legacy_param" />
                    </when>
                    <when value="manual">
                        <param name="scheme" type="text" area="false" label="MLST Scheme (manual)" help="Enter a MLST scheme to use (see output of 'MLST List' tool for a list of available schemes)" />
                        <expand macro="legacy_param" />
                    </when>
                </conditional>
            </when>
        </conditional>
    </inputs>

    <outputs>
        <data name="report" format="tabular" label="${tool.name} on ${on_string}: report.tsv"/>
        <data name="novel_alleles" format="fasta" label="${tool.name} on ${on_string}: novel_alleles.fasta">
            <filter>settings['advanced'] == "advanced" and settings['novel']</filter>
        </data>
    </outputs>

    <tests>
        <!-- Basic test - will produce no results. -->
        <test>
            <param name="input_files" value="Acetobacter.fna"/>
            <param name="advanced" value="simple"/>
            <output name="report" ftype="tabular" file="output_noresults.txt"/>
        </test>

        <!-- Basic test - will produce results. -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="simple"/>
            <output name="report" ftype="tabular" file="output_mrsa.txt"/>
        </test>

        <!-- Advanced test - Min DNA Coverage 100 -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="mincov" value="100"/>
            <output name="report" ftype="tabular" file="output_mincov100.txt"/>
        </test>

        <!-- Advanced test - Min DNA ID 100 -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="minid" value="100"/>
            <output name="report" ftype="tabular" file="output_minid100.txt"/>
        </test>

        <!-- Advanced test - Manually set MLST scheme -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="set_scheme" value="manual"/>
            <param name="scheme" value="saureus"/>
            <param name="legacy" value="true"/>
            <output name="report" ftype="tabular" file="output_mrsa_legacy.txt"/>
        </test>

        <!-- Advanced test - Set a MLST scheme from a list -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="set_scheme" value="list"/>
            <param name="scheme" value="saureus"/>
            <param name="legacy" value="true"/>
            <output name="report" ftype="tabular" file="output_mrsa_legacy.txt"/>
        </test>

        <!-- Advanced test - exclude scheme -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="set_scheme" value="auto"/>
            <param name="exclude" value="saureus"/>
            <param name="legacy" value="false"/>
            <output name="report" ftype="tabular" file="output_mrsa_exclude.txt"/>
        </test>

        <!-- Advanced test - output novel alleles. -->
        <test>
            <param name="input_files" value="MRSA0252_trimmed_novel.fna"/>
            <param name="advanced" value="advanced"/>
            <param name="minid" value="98"/>
            <param name="novel" value="true"/>
            <param name="set_scheme" value="manual"/>
            <param name="scheme" value="saureus"/>
            <param name="legacy" value="false"/>
            <output name="report" ftype="tabular" file="output_mrsa_novel.txt"/>
            <output name="novel_alleles" ftype="fasta" file="output_mrsa_novel.fasta"/>
        </test>
    </tests>

    <help><![CDATA[
**What it does**

Given a genome file in FASTA or Genbank format, MLST will scan the file against PubMLST typing schemes.

**Output**

MLST will produce a tab-seperated output file which contains:
- the filename
- the closest PubMLST scheme name
- the ST (sequence type)
- the allele IDs

**Example Output**

::

	genomes/6008.fna        saureus         239  arcc(2)   aroe(3)   glpf(1)   gmk_(1)   pta_(4)   tpi_(4)   yqil(3)

**Without auto-detection**

If you choose to manually set the MLST scheme, it will print a fixed tabular output with a heading containing allele names specific to that scheme (adjustable with **Include allele header**). To view a list of schemes, use the MLST List tool.

::

	FILE      SCHEME     ST    abcZ  adk  aroE  fumC  gdh  pdhC  pgm
	NM003.fa  neisseria  11    2     3    4     3       8     4    6

**Missing data**

MLST does not just look for exact matches to full length alleles. It attempts to tell you as much as possible about what it found using the notation below:

+--------+---------------------------------------+
| Symbol | Meaning                               |
+========+=======================================+
| n      | Exact intact allele                   |
+--------+---------------------------------------+
| ~n     | Novel full length allele similar to n |
+--------+---------------------------------------+
| n?     | Partial match to known allele         |
+--------+---------------------------------------+
| n,m    | Multiple alleles                      |
+--------+---------------------------------------+
|  *-*   | Allele missing                        |
+--------+---------------------------------------+

Setting **Output novel alleles** to true will produce an additional **novel_alleles.fasta** file containing the novel alleles.

Galaxy wrapper maintained by Simon Gladman.
    ]]></help>

    <expand macro="citations" />
</tool>