changeset 0:1d9e3950ce61 draft

planemo upload for repository https://github.com/WGS-TB/MentaLiST/tree/master/galaxy commit 77d12d12820477cdb046be90175f5d2dab52e620
author dfornika
date Wed, 20 Dec 2017 17:36:03 -0500
parents
children c6a98b93e569
files data_managers/data_manager_conf.xml data_managers/data_manager_mentalist_build_db/data_manager/mentalist_build_db.py data_managers/data_manager_mentalist_build_db/data_manager/mentalist_build_db.xml data_managers/data_manager_mentalist_build_db/tool-data/mentalist_databases.loc.sample data_managers/data_manager_mentalist_build_db/tool_data_table_conf.xml.sample data_managers/data_manager_mentalist_download_cgmlst/data_manager/mentalist_download_cgmlst.py data_managers/data_manager_mentalist_download_cgmlst/data_manager/mentalist_download_cgmlst.xml data_managers/data_manager_mentalist_download_cgmlst/tool-data/mentalist_databases.loc.sample data_managers/data_manager_mentalist_download_cgmlst/tool_data_table_conf.xml.sample data_managers/data_manager_mentalist_download_pubmlst/data_manager/mentalist_download_pubmlst.py data_managers/data_manager_mentalist_download_pubmlst/data_manager/mentalist_download_pubmlst.xml data_managers/data_manager_mentalist_download_pubmlst/tool-data/mentalist_databases.loc.sample data_managers/data_manager_mentalist_download_pubmlst/tool_data_table_conf.xml.sample tools/mentalist_call/mentalist_call.xml
diffstat 11 files changed, 557 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_conf.xml	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<data_managers>
+  <data_manager tool_file="data_manager_mentalist_build_db/data_manager/mentalist_build_db.xml" id="mentalist_build_db" version="0.1.3">
+    <data_table name="mentalist_databases">
+      <output>
+        <column name="value" />
+        <column name="name" />
+        <column name="path" output_ref="out_file">
+          <move type="directory" relativize_symlinks="True">
+            <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">mentalist_databases/${value}</target>
+          </move>
+          <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/mentalist_databases/${value}/${path}</value_translation>
+          <value_translation type="function">abspath</value_translation>
+        </column>
+      </output>
+    </data_table>
+  </data_manager>
+  <data_manager tool_file="data_manager_mentalist_download_cgmlst/data_manager/mentalist_download_cgmlst.xml" id="mentalist_download_cgmlst" version="0.1.3">
+    <data_table name="mentalist_databases">
+      <output>
+        <column name="value" />
+        <column name="name" />
+        <column name="path" output_ref="out_file">
+          <move type="directory" relativize_symlinks="True">
+            <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">mentalist_databases/${value}</target>
+          </move>
+          <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/mentalist_databases/${value}/${path}</value_translation>
+          <value_translation type="function">abspath</value_translation>
+        </column>
+      </output>
+    </data_table>
+  </data_manager>
+  <data_manager tool_file="data_manager_mentalist_download_pubmlst/data_manager/mentalist_download_pubmlst.xml" id="mentalist_download_pubmlst" version="0.1.3">
+    <data_table name="mentalist_databases">
+      <output>
+        <column name="value" />
+        <column name="name" />
+        <column name="path" output_ref="out_file">
+          <move type="directory" relativize_symlinks="True">
+            <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">mentalist_databases/${value}</target>
+          </move>
+          <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/mentalist_databases/${value}/${path}</value_translation>
+          <value_translation type="function">abspath</value_translation>
+        </column>
+      </output>
+    </data_table>
+  </data_manager>
+</data_managers>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_build_db/data_manager/mentalist_build_db.py	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+from __future__ import print_function
+
+import argparse
+import os
+import subprocess
+import sys
+import errno
+from json import dumps, loads
+
+DEFAULT_DATA_TABLE_NAMES = ["mentalist_databases"]
+
+
+def mentalist_build_db( data_manager_dict, database_name, kmer_size, profile, fasta_files, params, target_directory, data_table_names=DEFAULT_DATA_TABLE_NAMES ):
+    args = [ 'mentalist', 'build_db', '--db', database_name, '-k', str(kmer_size)]
+    if profile:
+        args += ['--profile', profile]
+    print(args)
+    args += ['--fasta_files'] + fasta_files
+    proc = subprocess.Popen( args=args, shell=False, cwd=target_directory )
+    return_code = proc.wait()
+    if return_code:
+        print("Error building database.", file=sys.stderr)
+        sys.exit( return_code )
+    data_table_entry = dict( value=database_name, dbkey=database_name, name=database_name, path=database_name )
+    for data_table_name in data_table_names:
+        _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry )
+
+
+def _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry ):
+    data_manager_dict['data_tables'] = data_manager_dict.get( 'data_tables', {} )
+    data_manager_dict['data_tables'][ data_table_name ] = data_manager_dict['data_tables'].get( data_table_name, [] )
+    data_manager_dict['data_tables'][ data_table_name ].append( data_table_entry )
+    return data_manager_dict
+
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument('params')
+    parser.add_argument( '-d', '--db', dest='database_name', default=None, help='Database Name' )
+    parser.add_argument( '-f', '--fasta_files', dest='fasta_files', nargs='+', default=None, help='FASTA Filenames' )
+    parser.add_argument( '-k', '--kmer_size', dest='kmer_size', type=int, default=None, help='kmer Size' )
+    parser.add_argument( '-p', '--profile', dest='profile', type=int, default=None, help='Profile' )
+    args = parser.parse_args()
+
+    params = loads( open( args.params ).read() )
+    target_directory = params[ 'output_data' ][0]['extra_files_path']
+
+    try:
+        os.mkdir( target_directory )
+    except OSError as exc:
+        if exc.errno == errno.EEXIST and os.path.isdir( target_directory ):
+            pass
+        else:
+            raise
+
+    data_manager_dict = {}
+
+    # build the index
+    mentalist_build_db( data_manager_dict, args.database_name, args.kmer_size, args.profile, args.fasta_files, params, target_directory, DEFAULT_DATA_TABLE_NAMES )
+
+    # save info to json file
+    open( args.params, 'wb' ).write( dumps( data_manager_dict ) )
+
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_build_db/data_manager/mentalist_build_db.xml	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<tool id="mentalist_build_db" name="MentaLiST Build DB" tool_type="manage_data" version="0.1.3">
+  <requirements>
+    <requirement type="package" version="0.1.3">mentalist</requirement>
+  </requirements>
+  <command detect_errors="exit_code">
+  <![CDATA[
+	   python '$__tool_directory__/mentalist_build_db.py'
+	   '${out_file}'
+	   --db '$database_name'
+	   -k '$kmer_size'
+	   #if $profile
+	     --profile '$profile'
+	   #end if
+	   --fasta_files ${" ".join(map(str, $input_fastas))}
+  ]]>
+  </command>
+  <inputs>
+    <param name="database_name" type="text"
+	   label="Database Name" help="Database Name" />
+    <param name="kmer_size" type="integer"
+	   label="Kmer size" help="Kmer size"
+	   value="31" min="1" max="32" />
+    <param name="input_fastas" type="data_collection" collection_type="list" format="fasta" multiple="true"
+	   label="Input Fasta" help="Fasta input files" />
+    <param name="profile" type="data" format="tsv" optional="true"
+	   label="Profile" help="Profile for known genotypes" />
+  </inputs>
+  <outputs>
+    <data name="out_file" format="data_manager_json" />
+  </outputs>
+  <citations>
+    <citation type="doi">10.1101/172858</citation>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_build_db/tool_data_table_conf.xml.sample	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tables>
+  <!--Locations of MentaLiST database in the required format -->
+  <table name="mentalist_databases" comment_char="#">
+    <columns>value, name, path</columns>
+      <file path="tool-data/mentalist_databases.loc" />
+  </table>
+</tables>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_cgmlst/data_manager/mentalist_download_cgmlst.py	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+
+from __future__ import print_function
+
+import argparse
+import datetime
+import errno
+import os
+import string
+import subprocess
+import sys
+
+from json import dumps, loads
+
+
+DEFAULT_DATA_TABLE_NAMES = ["mentalist_databases"]
+
+
+def mentalist_download_cgmlst( data_manager_dict, kmer_size, scheme, params, target_directory, data_table_names=DEFAULT_DATA_TABLE_NAMES ):
+    translation_table = string.maketrans(string.punctuation, ("_" * 32))
+    base_path = scheme.lower().replace(" ", "_").translate(translation_table) + "_cgmlst"
+    today = datetime.date.today().isoformat()
+    scheme_files_path = base_path + "_scheme_" + today
+    database_path = base_path + "_k" + str(kmer_size) + "_" + today
+    database_name = base_path + "_k" + str(kmer_size) + "_" + today + ".jld"
+    display_name = scheme + " k=" + str(kmer_size) + " (cgMLST) " + today
+    args = [ 'mentalist', 'download_cgmlst', '-s', scheme, '-k', str(kmer_size), '--db', database_name, '-o', scheme_files_path]
+    proc = subprocess.Popen( args=args, shell=False, cwd=target_directory )
+    return_code = proc.wait()
+    if return_code:
+        print("Error building database.", file=sys.stderr)
+        sys.exit( return_code )
+    data_table_entry = dict( value=database_path, dbkey='cgMLST', name=display_name, path=database_name )
+    for data_table_name in data_table_names:
+        _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry )
+
+
+def _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry ):
+    data_manager_dict['data_tables'] = data_manager_dict.get( 'data_tables', {} )
+    data_manager_dict['data_tables'][ data_table_name ] = data_manager_dict['data_tables'].get( data_table_name, [] )
+    data_manager_dict['data_tables'][ data_table_name ].append( data_table_entry )
+    return data_manager_dict
+
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument('params')
+    parser.add_argument( '-k', '--kmer_size', dest='kmer_size', type=int, default=None, help='kmer Size' )
+    parser.add_argument( '-s', '--scheme', dest='scheme', default=None, help='Scheme' )
+    args = parser.parse_args()
+
+    params = loads( open( args.params ).read() )
+    target_directory = params[ 'output_data' ][0]['extra_files_path']
+
+    try:
+        os.mkdir( target_directory )
+    except OSError as exc:
+        if exc.errno == errno.EEXIST and os.path.isdir( target_directory ):
+            pass
+        else:
+            raise
+
+    data_manager_dict = {}
+
+    # build the index
+    mentalist_download_cgmlst( data_manager_dict, args.kmer_size, args.scheme, params, target_directory, DEFAULT_DATA_TABLE_NAMES )
+
+    # save info to json file
+    open( args.params, 'wb' ).write( dumps( data_manager_dict ) )
+
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_cgmlst/data_manager/mentalist_download_cgmlst.xml	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<tool id="mentalist_download_cgmlst" name="MentaLiST Download from cgMLST" tool_type="manage_data" version="0.1.3">
+  <requirements>
+    <requirement type="package" version="0.1.3">mentalist</requirement>
+  </requirements>
+  <command detect_errors="exit_code">
+    <![CDATA[
+	     python '$__tool_directory__/mentalist_download_cgmlst.py'
+	     '${out_file}'
+	     -k '$kmer_size'
+	     --scheme '$scheme'
+    ]]>
+  </command>
+  <inputs>
+    <param name="kmer_size" type="integer"
+	   label="Kmer size" help="Kmer size"
+	   value="31" min="1" max="32" />
+    <param name="scheme" type="select" multiple="false" label="Select scheme to download">
+      <option value="Acinetobacter baumannii">Acinetobacter baumannii</option>
+      <option value="Clostridioides difficile">Clostridioides difficile</option>
+      <option value="Enterococcus faecium">Enterococcus faecium</option>
+      <option value="Francisella tularensis">Francisella tularensis</option>
+      <option value="Legionella pneumophila">Legionella pneumophila</option>
+      <option value="Listeria monocytogenes">Listeria monocytogenes</option>
+      <option value="Staphylococcus aureus">Staphylococcus aureus</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="out_file" format="data_manager_json" />
+  </outputs>
+  <citations>
+    <citation type="doi">10.1101/172858</citation>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_cgmlst/tool_data_table_conf.xml.sample	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tables>
+  <!--Locations of MentaLiST database in the required format -->
+  <table name="mentalist_databases" comment_char="#">
+    <columns>value, name, path</columns>
+      <file path="tool-data/mentalist_databases.loc" />
+  </table>
+</tables>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_pubmlst/data_manager/mentalist_download_pubmlst.py	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+
+from __future__ import print_function
+
+import argparse
+import datetime
+import errno
+import os
+import string
+import subprocess
+import sys
+
+from json import dumps, loads
+
+
+DEFAULT_DATA_TABLE_NAMES = ["mentalist_databases"]
+
+
+def mentalist_download_pubmlst( data_manager_dict, kmer_size, scheme, params, target_directory, data_table_names=DEFAULT_DATA_TABLE_NAMES ):
+    translation_table = string.maketrans(string.punctuation, ("_" * 32))
+    base_path = scheme.lower().replace(" ", "_").translate(translation_table) + "_pubmlst"
+    today = datetime.date.today().isoformat()
+    scheme_files_path = base_path + "_scheme_" + today
+    database_path = base_path + "_k" + str(kmer_size) + "_" + today
+    database_name = base_path + "_k" + str(kmer_size) + "_" + today + ".jld"
+    display_name = scheme + " k=" + str(kmer_size) + " (PubMLST) " + today
+    args = [ 'mentalist', 'download_pubmlst', '-s', scheme, '-k', str(kmer_size), '--db', database_name, '-o', scheme_files_path]
+    proc = subprocess.Popen( args=args, shell=False, cwd=target_directory )
+    return_code = proc.wait()
+    if return_code:
+        print("Error building database.", file=sys.stderr)
+        sys.exit( return_code )
+    data_table_entry = dict( value=database_path, dbkey='PubMLST', name=display_name, path=database_name )
+    for data_table_name in data_table_names:
+        _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry )
+
+
+def _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry ):
+    data_manager_dict['data_tables'] = data_manager_dict.get( 'data_tables', {} )
+    data_manager_dict['data_tables'][ data_table_name ] = data_manager_dict['data_tables'].get( data_table_name, [] )
+    data_manager_dict['data_tables'][ data_table_name ].append( data_table_entry )
+    return data_manager_dict
+
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument('params')
+    parser.add_argument( '-s', '--scheme', dest='scheme', default=None, help='Scheme' )
+    parser.add_argument( '-k', '--kmer_size', dest='kmer_size', type=int, default=None, help='kmer Size' )
+    args = parser.parse_args()
+
+    params = loads( open( args.params ).read() )
+    target_directory = params[ 'output_data' ][0]['extra_files_path']
+
+    try:
+        os.mkdir( target_directory )
+    except OSError as exc:
+        if exc.errno == errno.EEXIST and os.path.isdir( target_directory ):
+            pass
+        else:
+            raise
+
+    data_manager_dict = {}
+
+    # build the index
+    mentalist_download_pubmlst( data_manager_dict, args.kmer_size, args.scheme, params, target_directory, DEFAULT_DATA_TABLE_NAMES )
+
+    # save info to json file
+    open( args.params, 'wb' ).write( dumps( data_manager_dict ) )
+
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_pubmlst/data_manager/mentalist_download_pubmlst.xml	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<tool id="mentalist_download_pubmlst" name="MentaLiST Download from pubMLST" tool_type="manage_data" version="0.1.3">
+  <requirements>
+    <requirement type="package" version="0.1.3">mentalist</requirement>
+  </requirements>
+  <command detect_errors="exit_code">
+    <![CDATA[
+	     python '$__tool_directory__/mentalist_download_pubmlst.py'
+	     '${out_file}'
+	     -k '$kmer_size'
+	     --scheme '$scheme'
+    ]]>
+  </command>
+  <inputs>
+    <param name="kmer_size" type="integer"
+	   label="Kmer size" help="Kmer size"
+	   value="31" min="1" max="32" />
+    <param name="scheme" type="select" multiple="false" label="Select scheme to download">
+      <option value="Achromobacter spp.">Achromobacter spp.</option>
+      <option value="Acinetobacter baumannii#1">Acinetobacter baumannii#1</option>
+      <option value="Acinetobacter baumannii#2">Acinetobacter baumannii#2</option>
+      <option value="Aeromonas spp.">Aeromonas spp.</option>
+      <option value="Anaplasma phagocytophilum">Anaplasma phagocytophilum</option>
+      <option value="Arcobacter spp.">Arcobacter spp.</option>
+      <option value="Aspergillus fumigatus">Aspergillus fumigatus</option>
+      <option value="Bacillus cereus">Bacillus cereus</option>
+      <option value="Bacillus licheniformis">Bacillus licheniformis</option>
+      <option value="Bacillus subtilis">Bacillus subtilis</option>
+      <option value="Bartonella bacilliformis">Bartonella bacilliformis</option>
+      <option value="Bartonella henselae">Bartonella henselae</option>
+      <option value="Bordetella spp.">Bordetella spp.</option>
+      <option value="Borrelia spp.">Borrelia spp.</option>
+      <option value="Brachyspira hampsonii">Brachyspira hampsonii</option>
+      <option value="Brachyspira hyodysenteriae">Brachyspira hyodysenteriae</option>
+      <option value="Brachyspira intermedia">Brachyspira intermedia</option>
+      <option value="Brachyspira pilosicoli">Brachyspira pilosicoli</option>
+      <option value="Brachyspira spp.">Brachyspira spp.</option>
+      <option value="Brucella spp.">Brucella spp.</option>
+      <option value="Burkholderia cepacia complex">Burkholderia cepacia complex</option>
+      <option value="Burkholderia pseudomallei">Burkholderia pseudomallei</option>
+      <option value="Campylobacter concisus/curvus">Campylobacter concisus/curvus</option>
+      <option value="Campylobacter fetus">Campylobacter fetus</option>
+      <option value="Campylobacter helveticus">Campylobacter helveticus</option>
+      <option value="Campylobacter hyointestinalis">Campylobacter hyointestinalis</option>
+      <option value="Campylobacter insulaenigrae">Campylobacter insulaenigrae</option>
+      <option value="Campylobacter jejuni">Campylobacter jejuni</option>
+      <option value="Campylobacter lanienae">Campylobacter lanienae</option>
+      <option value="Campylobacter lari">Campylobacter lari</option>
+      <option value="Campylobacter sputorum">Campylobacter sputorum</option>
+      <option value="Campylobacter upsaliensis">Campylobacter upsaliensis</option>
+      <option value="Candida albicans">Candida albicans</option>
+      <option value="Candida glabrata">Candida glabrata</option>
+      <option value="Candida krusei">Candida krusei</option>
+      <option value="Candida tropicalis">Candida tropicalis</option>
+      <option value="Carnobacterium maltaromaticum">Carnobacterium maltaromaticum</option>
+      <option value="Chlamydiales spp.">Chlamydiales spp.</option>
+      <option value="Citrobacter freundii">Citrobacter freundii</option>
+      <option value="Clonorchis sinensis">Clonorchis sinensis</option>
+      <option value="Clostridium botulinum">Clostridium botulinum</option>
+      <option value="Clostridium difficile">Clostridium difficile</option>
+      <option value="Clostridium septicum">Clostridium septicum</option>
+      <option value="Corynebacterium diphtheriae">Corynebacterium diphtheriae</option>
+      <option value="Cronobacter spp.">Cronobacter spp.</option>
+      <option value="Dichelobacter nodosus">Dichelobacter nodosus</option>
+      <option value="Edwardsiella spp.">Edwardsiella spp.</option>
+      <option value="Enterobacter cloacae">Enterobacter cloacae</option>
+      <option value="Enterococcus faecalis">Enterococcus faecalis</option>
+      <option value="Enterococcus faecium">Enterococcus faecium</option>
+      <option value="Escherichia coli#1">Escherichia coli#1</option>
+      <option value="Escherichia coli#2">Escherichia coli#2</option>
+      <option value="Flavobacterium psychrophilum">Flavobacterium psychrophilum</option>
+      <option value="Gallibacterium anatis">Gallibacterium anatis</option>
+      <option value="Haemophilus influenzae">Haemophilus influenzae</option>
+      <option value="Haemophilus parasuis">Haemophilus parasuis</option>
+      <option value="Helicobacter cinaedi">Helicobacter cinaedi</option>
+      <option value="Helicobacter pylori">Helicobacter pylori</option>
+      <option value="Helicobacter suis">Helicobacter suis</option>
+      <option value="Kingella kingae">Kingella kingae</option>
+      <option value="Klebsiella oxytoca">Klebsiella oxytoca</option>
+      <option value="Klebsiella pneumoniae">Klebsiella pneumoniae</option>
+      <option value="Kudoa septempunctata">Kudoa septempunctata</option>
+      <option value="Lactobacillus salivarius">Lactobacillus salivarius</option>
+      <option value="Leptospira spp.">Leptospira spp.</option>
+      <option value="Leptospira spp.#2">Leptospira spp.#2</option>
+      <option value="Leptospira spp.#3">Leptospira spp.#3</option>
+      <option value="Listeria monocytogenes">Listeria monocytogenes</option>
+      <option value="Macrococcus canis">Macrococcus canis</option>
+      <option value="Macrococcus caseolyticus">Macrococcus caseolyticus</option>
+      <option value="Mannheimia haemolytica">Mannheimia haemolytica</option>
+      <option value="Melissococcus plutonius">Melissococcus plutonius</option>
+      <option value="Moraxella catarrhalis">Moraxella catarrhalis</option>
+      <option value="Mycobacterium abscessus">Mycobacterium abscessus</option>
+      <option value="Mycobacterium massiliense">Mycobacterium massiliense</option>
+      <option value="Mycoplasma agalactiae">Mycoplasma agalactiae</option>
+      <option value="Mycoplasma bovis">Mycoplasma bovis</option>
+      <option value="Mycoplasma hyopneumoniae">Mycoplasma hyopneumoniae</option>
+      <option value="Mycoplasma hyorhinis">Mycoplasma hyorhinis</option>
+      <option value="Mycoplasma iowae">Mycoplasma iowae</option>
+      <option value="Mycoplasma pneumoniae">Mycoplasma pneumoniae</option>
+      <option value="Mycoplasma synoviae">Mycoplasma synoviae</option>
+      <option value="Neisseria spp.">Neisseria spp.</option>
+      <option value="Orientia tsutsugamushi">Orientia tsutsugamushi</option>
+      <option value="Ornithobacterium rhinotracheale">Ornithobacterium rhinotracheale</option>
+      <option value="Paenibacillus larvae">Paenibacillus larvae</option>
+      <option value="Pasteurella multocida#1">Pasteurella multocida#1</option>
+      <option value="Pasteurella multocida#2">Pasteurella multocida#2</option>
+      <option value="Pediococcus pentosaceus">Pediococcus pentosaceus</option>
+      <option value="Photobacterium damselae">Photobacterium damselae</option>
+      <option value="Porphyromonas gingivalis">Porphyromonas gingivalis</option>
+      <option value="Propionibacterium acnes">Propionibacterium acnes</option>
+      <option value="Pseudomonas aeruginosa">Pseudomonas aeruginosa</option>
+      <option value="Pseudomonas fluorescens">Pseudomonas fluorescens</option>
+      <option value="Rhodococcus spp.">Rhodococcus spp.</option>
+      <option value="Riemerella anatipestifer">Riemerella anatipestifer</option>
+      <option value="Salmonella enterica">Salmonella enterica</option>
+      <option value="Sinorhizobium spp.">Sinorhizobium spp.</option>
+      <option value="Staphylococcus aureus">Staphylococcus aureus</option>
+      <option value="Staphylococcus epidermidis">Staphylococcus epidermidis</option>
+      <option value="Staphylococcus haemolyticus">Staphylococcus haemolyticus</option>
+      <option value="Staphylococcus lugdunensis">Staphylococcus lugdunensis</option>
+      <option value="Staphylococcus pseudintermedius">Staphylococcus pseudintermedius</option>
+      <option value="Stapylococcus hominis">Stapylococcus hominis</option>
+      <option value="Stenotrophomonas maltophilia">Stenotrophomonas maltophilia</option>
+      <option value="Streptococcus agalactiae">Streptococcus agalactiae</option>
+      <option value="Streptococcus bovis/equinus complex (SBSEC)">Streptococcus bovis/equinus complex (SBSEC)</option>
+      <option value="Streptococcus canis">Streptococcus canis</option>
+      <option value="Streptococcus dysgalactiae equisimilis">Streptococcus dysgalactiae equisimilis</option>
+      <option value="Streptococcus gallolyticus">Streptococcus gallolyticus</option>
+      <option value="Streptococcus oralis">Streptococcus oralis</option>
+      <option value="Streptococcus pneumoniae">Streptococcus pneumoniae</option>
+      <option value="Streptococcus pyogenes">Streptococcus pyogenes</option>
+      <option value="Streptococcus suis">Streptococcus suis</option>
+      <option value="Streptococcus thermophilus">Streptococcus thermophilus</option>
+      <option value="Streptococcus thermophilus#2">Streptococcus thermophilus#2</option>
+      <option value="Streptococcus uberis">Streptococcus uberis</option>
+      <option value="Streptococcus zooepidemicus">Streptococcus zooepidemicus</option>
+      <option value="Streptomyces spp">Streptomyces spp</option>
+      <option value="Taylorella spp.">Taylorella spp.</option>
+      <option value="Tenacibaculum spp.">Tenacibaculum spp.</option>
+      <option value="Trichomonas vaginalis">Trichomonas vaginalis</option>
+      <option value="Vibrio cholerae">Vibrio cholerae</option>
+      <option value="Vibrio parahaemolyticus">Vibrio parahaemolyticus</option>
+      <option value="Vibrio spp.">Vibrio spp.</option>
+      <option value="Vibrio tapetis">Vibrio tapetis</option>
+      <option value="Vibrio vulnificus">Vibrio vulnificus</option>
+      <option value="Wolbachia">Wolbachia</option>
+      <option value="Xylella fastidiosa">Xylella fastidiosa</option>
+      <option value="Yersinia pseudotuberculosis">Yersinia pseudotuberculosis</option>
+      <option value="Yersinia ruckeri">Yersinia ruckeri</option>
+      <option value="Yersinia spp.">Yersinia spp.</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="out_file" format="data_manager_json" />
+  </outputs>
+  <citations>
+    <citation type="doi">10.1101/172858</citation>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_managers/data_manager_mentalist_download_pubmlst/tool_data_table_conf.xml.sample	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tables>
+  <!--Locations of MentaLiST database in the required format -->
+  <table name="mentalist_databases" comment_char="#">
+    <columns>value, name, path</columns>
+      <file path="tool-data/mentalist_databases.loc" />
+  </table>
+</tables>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/mentalist_call/mentalist_call.xml	Wed Dec 20 17:36:03 2017 -0500
@@ -0,0 +1,44 @@
+<tool id="mentalist_call" name="MentaLiST MLST Analysis" version="0.1.3">
+  <requirements>
+    <requirement type="package" version="0.1.3">mentalist</requirement>
+  </requirements>
+  <command detect_errors="exit_code"><![CDATA[
+    mentalist
+    call
+    -o '$output_file'
+    --db '$kmer_db.fields.path'
+    #if $input_type.sPaired == "paired":
+       -s $input_type.pInput1.name $input_type.pInput1 $input_type.pInput2
+    #elif $input_type.sPaired == "collections":
+       -s $input_type.fastq_collection.name $input_type.fastq_collection.forward $input_type.fastq_collection.reverse
+    #end if
+  ]]></command>
+  <inputs>
+    <conditional name="input_type">
+      <param name="sPaired" type="select" label="Single Pair or Collection">
+        <option value="collections">Paired-end Collections</option>
+        <option value="paired">Paired-end</option>
+      </param>
+      <when value="paired">
+        <param name="pInput1" type="data" format="fastq,fastqsanger,fastqillumina,fastqsolexa" label="Forward FASTQ file" help="Must have ASCII encoded quality scores"/>
+        <param name="pInput2" type="data" format="fastq,fastqsanger,fastqillumina,fastqsolexa" label="Reverse FASTQ file" help="File format must match the Forward FASTQ file"/>
+      </when>
+      <when value="collections">
+        <param name="fastq_collection" type="data_collection" label="Paired-end Fastq collection" help="" optional="false" format="txt" collection_type="paired" />
+      </when>
+    </conditional>
+    <param name="kmer_db" type="select">
+      <options from_data_table="mentalist_databases">
+	<validator type="no_options" message="No MentaLiST databases are available" />
+      </options>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="output_file" format="tabular"/>
+  </outputs>
+  <help><![CDATA[
+  ]]></help>
+  <citations>
+    <citation type="doi">10.1101/172858</citation>
+  </citations>
+</tool>