Multilocus sequence typing by blast from de novo assemblies against PubMLST

Multilocus sequence typing by blast from de novo assemblies against PubMLST - Published in JOSS (2016)

https://github.com/sanger-pathogens/mlst_check

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: ncbi.nlm.nih.gov, joss.theoj.org
  • Committers with academic emails
    10 of 12 committers (83.3%) from academic institutions
  • Institutional organization owner
    Organization sanger-pathogens has institutional domain (www.sanger.ac.uk)
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

bioinformatics bioinformatics-pipeline genomics global-health infectious-diseases next-generation-sequencing pathogen research sequencing
Last synced: 4 months ago · JSON representation ·

Repository

Multilocus sequence typing by blast using the schemes from PubMLST

Basic Info
Statistics
  • Stars: 30
  • Watchers: 4
  • Forks: 15
  • Open Issues: 8
  • Releases: 1
Topics
bioinformatics bioinformatics-pipeline genomics global-health infectious-diseases next-generation-sequencing pathogen research sequencing
Created over 13 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog Citation Authors

README.md

Multilocus sequence typing

Multilocus sequence typing by blast using the schemes from PubMLST.

Build Status
License: GPL v3
status
install with bioconda
Container ready
Docker Build Status
Docker Pulls
codecov

Contents

Introduction

This application is for taking MLST databases from multiple locations and consolidating them in one place so that they can be easily used (and kept up to date). Then you can provide FASTA files and get out sequence types (ST) for a given MLST database. Two spreadsheets are outputted, one contains the allele number for each locus, and the ST (or nearest ST), the other contains the genomic sequence for each allele.
If more than 1 allele gives 100% identity for a locus, the contaminated flag is set. Optionally you can output a concatenated sequence in FASTA format, which you can then use with tree building programs. New, unseen alleles are saved in FASTA format, with 1 per file, for submission to back to MLST databases.

Quick start

Set the directory where you would like to store the MLST databases (If you use Docker, you can skip this and the next step as the databases are bundled with the container) export MLST_DATABASES=/path/to/where_you_want_to_store_the_databases

Download the database download_mlst_databases

Get sequence types for all FASTA files in my current directory, creates 2 spreadsheets of results. get_sequence_type -s "Escherichia coli" *.fa

Create a multifasta alignment for tree building get_sequence_type -s "Escherichia coli" -c *.fa

List all MLST databases available get_sequence_type -a

More details get_sequence_type -h

Installation

mlst_check has the following dependencies:

Required dependencies

If you encounter an issue when installing mlst_check please contact your local system administrator. If you encounter a bug please log it here.

Instructions are given for installing the software via Docker (can be run on all operating systems), for Debian/Ubuntu distributions and HomeBrew/LinuxBrew.

Bioconda - OSX/Linux

Install conda. Then install bioconda and mlst_check:

conda config --add channels defaults conda config --add channels conda-forge conda config --add channels bioconda conda install perl-bio-mlst-check

Docker

The docker container includes a snapshot of the MLST databases from the day it was built. To install it:

docker pull sangerpathogens/mlst_check

Some example data is included in the container, which can be run using this command: docker run --rm -it -v /home/ubuntu/data:/data sangerpathogens/mlst_check get_sequence_type -s 'Salmonella enterica' /example/sample1.fa /example/sample2.fa /example/sample3.fa Your results will then be in the /home/ubuntu/data directory (or whatever you have called it).

To use the command with your own data place your FASTA files in /home/ubuntu/data (or substituting in your directories): docker run --rm -it -v /home/ubuntu/data:/data sangerpathogens/mlst_check get_sequence_type -s 'Salmonella enterica' my_sample.fa Your results will then be in the /home/ubuntu/data directory as previous.

Debian/Ubuntu

If you run Debian or Ubuntu it should be straightforward to install the software. These instructions assume you have root access. Run:

apt-get update -qq apt-get install -y ncbi-blast+ cpanminus gcc autoconf make libxml2-dev zlib1g zlib1g-dev libmodule-install-perl cpanm -f Bio::MLST::Check

Set the directory where you would like to store the MLST databases. export MLST_DATABASES=/path/to/where_you_want_to_store_the_databases

Download the latest copy of the databases (run it once per month) download_mlst_databases To use the software to find the sequence types for all fasta files in your current directory: get_sequence_type -s "Clostridium difficile" *.fa

HomeBrew/LinuxBrew

If you run OSX, a non-Debian Linux or you do not have root access on your machine, you can use HomeBrew/LinuxBrew to install the dependancies. First install Homebrew (OSX) or LinuxBrew (Linux).

brew tap homebrew/science brew install cpanminus blast

Assuming you have setup perl modules to install in your local directory (~/perl5 in this case), install the software and all its Perl dependancies: cpanm --local-lib=~/perl5 -f Bio::MLST::Check Set a directory where you would like to store the MLST databases. export MLST_DATABASES=/path/to/where_you_want_to_store_the_databases

Download the latest copy of the databases (run it once per month) download_mlst_databases To use the software to find the sequence types for all fasta files in your current directory: get_sequence_type -s "Clostridium difficile" *.fa

Running the tests

The test can be run from the top level directory:
dzil test --test-verbose

Usage

The MLST databases must be downloaded first. This is something you would only do every now and again. You need to set the $MLSTDATABASES environment variable first to a location where you want to save your databases. If you use Docker, you can skip this step as the databases are bundled with the container. ``` Usage: downloadmlstdatabases [options] -c STR Config file containing details of MLST databases from pubMLST -b STR Directory where MLST databases are stored [$MLSTDATABASES] -h Print this message and exit -v Print version number and exit ```

The getsequencetype script allows you to calculate the ST of a FASTA file against one or more database. If you dont provide the '-s' option, then every database will be searched. If you wish to build a phylogenetic tree use the '-c' or '-y' options to get a single aligned FASTA/Phylip file. ``` Usage: getsequencetype [options] *.fasta

-s STR Species of MLST database (0 or more comma separated) -d INT Number of threads [1] -c Output a FASTA file of concatenated alleles and unknown sequences -y Output a phylip file of concatenated alleles and unknown sequences -o STR Output directory [.] -a Print out all available MLST databases and exit -h Print this message and exit -v Print version number and exit ```

Input format

The input files must be in FASTA format and contain nucleotide sequences. These can be full genome sequences, fragmented de novo assemblies or individual genes. If the gene is truncated or split over 2 sequences, it is unlikely to be detected by this algorithm, however MLST genes usually assemble consistently well because they have been carefully chosen by the schemes creators.

Outputs

The output is * mlst_results.allele.csv

This is a tab separated spreadsheet containing the ST number of each input FASTA file and the corresponding allele numbers for each gene in the scheme. If one of the alleles is not contained in the database, then it will be flagged with 'U' and the 3rd column will describe it as 'Unknown'. If the combination of allele numbers has never been seen before, it will be flagged as 'Novel'. The ST column is populated with the nearest ST found. A whole number indicates an exact match was found for the ST. If it is prepended with a tilda (~) it indicates it is a 'best effort' and the nearest matching ST with the lowest number is used. Should two diffent alleles for a single gene be found, then the allele numbers will be put into the 'Contamination' column (since there shouldnt be 2 copies of these genes). However some schemes are poorly defined so take it with a pinch of salt. If there are no matches such as in sample5 below, the ST is blank and all alleles are marked with unknown (U).

Isolate | ST |"New ST" |Contamination | aroC | dnaN | hemD | hisD | purE | sucA | thrA ------- | --- | --------|------------------|------|------|------|------|------|------|----- sample1 | ~559| Unknown | | 130 | 97 | 25 | 125 | U | 9 | 101 sample2 | 518 | | | 101 | 41 | 40 | 184 | 76 | 90 | 3 sample3 | 150 | | purE-422,purE-84 | 130 | 97 | 25 | 125 | 422 | 9 | 101 sample4 | ~150| Novel | | 130 | 95 | 25 | 125 | 422 | 9 | 101 sample5 | | Unknown | | U | U | U | U | U | U | U

  • mlst_results.genomic.csv

This spreadsheet is similar to the mlst_results.allele.csv spreadsheet, however it gives the full sequences of each allele instead of the allele number.

  • *unknown.fa

You can choose to output any new alleles (-c) which are not contained in the MLST database. These can then be used to feedback to the curators maintaining the MLST databases, where they can be assigned allele numbers and profiles.

  • concatenatedalleles.fa and concatenatedalleles.phylip

You can choose to output a multiple FASTA/Phylip alignment of all of the MLST genes concatenated together, where each sample is represented by a single sequence. This file can then be used as input to a phylogenetic tree building application (such as RAxML or FastTree) to create a phylogenetic tree (dendrogram).

License

mlst_check is free software, licensed under GPLv3.

Feedback/Issues

Please report any issues to the issues page.

Citation

"Multilocus sequence typing by blast from de novo assemblies against PubMLST", Andrew J. Page, Ben Taylor, Jacqueline A. Keane, The Journal of Open Source Software, (2016). doi: http://dx.doi.org/10.21105/joss.00118

Method

The user can decide to use a specific MLST scheme or search all of them. The first step is to generate a blastn database using makeblastdb from the alleles. The input sequences are then blasted against the database using blastn. If there is a 100% match to the full length of an allele, the corresponding allele number is noted. If there is a partial match to an allele, the best hit is chosen, where it has the highest number of matching bases and the highest percentage identity. This nearest allele number is noted and it is flagged as 'Unknown'. If there is contamination, and more than 1 allele for a single gene is 100% present, the corresponding allele numbers are presented in the contamination column. The first allele in the blast results is used for the gene. The profile for the MLST scheme links the combination of allele numbers for each gene to an ST number. This number is presented if there is an exact match. If one or more of the alleles is Unknown, the nearest ST with the lowest integer number is used. Where the combination of allele numbers is unique, the ST is marked as Novel and the ST with the closest number of matches and the lowest integer is presented and indicated with a tilda (~).

Contribute to the software

If you wish to fix a bug or add new features to the software we welcome Pull Requests. Please fork the repo, make the change, then submit a Pull Request with details about what the change is and what it fixes/adds.

Owner

  • Name: Pathogen Informatics, Wellcome Sanger Institute
  • Login: sanger-pathogens
  • Kind: organization
  • Location: Hinxton, Cambs., UK

JOSS Publication

Multilocus sequence typing by blast from de novo assemblies against PubMLST
Published
December 05, 2016
Volume 1, Issue 8, Page 118
Authors
Andrew J. Page ORCID
Pathogen Informatics, Wellcome Trust Sanger Institute
Ben Taylor
Pathogen Informatics, Wellcome Trust Sanger Institute
Jacqueline A. Keane ORCID
Pathogen Informatics, Wellcome Trust Sanger Institute
Editor
Pjotr Prins ORCID
Tags
bioinformatics MLST multilocus sequence typing blast de novo assembly bacteria

Citation (CITATIONS.md)

Please cite this software:

"Multilocus sequence typing by blast from de novo assemblies against PubMLST", 
Andrew J. Page, Ben Taylor, Jacqueline A. Keane, The Journal of Open Source Software, (2016). 
doi: http://dx.doi.org/10.21105/joss.00118

All of the data is downloaded from [PubMLST](http://pubmlst.org/), so please cite it:

"BIGSdb: Scalable analysis of bacterial genome variation at the population level", Jolley & Maiden 2010, BMC Bioinformatics 11:595. http://dx.doi.org/10.1186/1471-2105-11-595

Please also consider citing the individual MLST databases, since it takes a lot of time an effort to curate and maintain them. A full list is here: http://pubmlst.org/databases/

GitHub Events

Total
  • Watch event: 1
  • Issue comment event: 1
Last Year
  • Watch event: 1
  • Issue comment event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 235
  • Total Committers: 12
  • Avg Commits per committer: 19.583
  • Development Distribution Score (DDS): 0.549
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
andrewjpage a****e@g****m 106
Ben Taylor b****r@s****k 78
Sara Sjunnebo s****4@s****k 17
Craig Porter c****7@s****k 13
Carla Cummins c****1@s****k 12
Martin Aslett m****a@s****k 2
Nishadi De Silva n****s@s****k 2
vaofford v****1@s****k 1
kathryn1995 k****2@s****k 1
William Roberts w****7@s****k 1
Tim Stickland t****d@s****k 1
Sara Sjunnebo s****o@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 13
  • Total pull requests: 81
  • Average time to close issues: 18 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 13
  • Total pull request authors: 12
  • Average comments per issue: 1.15
  • Average comments per pull request: 0.1
  • Merged pull requests: 81
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • novitch (1)
  • ssjunnebo (1)
  • sekhwal (1)
  • BioMEC (1)
  • buihoangphuc412 (1)
  • ghost (1)
  • happykhan (1)
  • hafizmtalha (1)
  • chahatupreti (1)
  • bastian-wur (1)
  • VoronDM (1)
  • bgold04 (1)
  • neelam19051 (1)
Pull Request Authors
  • andrewjpage (37)
  • bewt85 (13)
  • ssjunnebo (8)
  • CraigPorter (6)
  • carlacummins (5)
  • jyothishnt (4)
  • aslett1 (3)
  • kathryn1995 (1)
  • vaofford (1)
  • nds (1)
  • trstickland (1)
  • Lfulcrum (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 13
  • Total maintainers: 1
metacpan.org: Bio-MLST-Check

Multilocus sequence type checking using blast

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 0.7%
Stargazers count: 0.9%
Dependent repos count: 1.6%
Average: 8.8%
Dependent packages count: 32.2%
Maintainers (1)
Last synced: 4 months ago