A Python package to update and manage the MLST database for the MLST tool.
Project description
mlstdb
⚠️ Known Issue:
mlstdb connectis currently not workingDue to recent changes in the BIGSdb (v1.53.x), the
mlstdb connectOAuth authentication flow is currently broken. We are actively working on a fix.Workaround: Use the
--no-authflag withmlstdb updateto download public schemes without authentication in the interim:mlstdb update --no-authWe apologise for the inconvenience and will release a fix as soon as possible. Track progress in #35.
Keep your mlst databases up to date. mlstdb handles OAuth authentication with PubMLST and BIGSdb Pasteur so you can download the latest MLST schemes and build a BLAST database, in two commands.
Install
conda create -n mlst -c bioconda mlst
conda activate mlst
pip install mlstdb
Other installation methods
# From bioconda (include conda-forge for dependencies)
conda install -c conda-forge -c bioconda mlstdb
# Or install both tools together
conda create -n mlst -c conda-forge -c bioconda mlst mlstdb
# From PyPI only
pip install mlstdb
Quick Start
1. Register with each database (one-time setup):
mlstdb connect --db pubmlst
mlstdb connect --db pasteur
This opens a browser for OAuth registration. Follow the prompts to authorise mlstdb.
2. Download schemes and build the BLAST database:
mlstdb update
This downloads the curated MLST schemes from both PubMLST and Pasteur and creates a BLAST database.
3. Use with mlst:
mlst --blastdb blast/mlst.fa --datadir pubmlst your_assembly.fasta
That's it. For advanced scheme exploration, custom filtering, and detailed option reference, see the full documentation.
Removing contaminated STs or alleles
Discovered a dodgy sequence type or allele in your local database? You can remove it without re-downloading the whole scheme:
# Remove a single ST (orphaned alleles are cleaned up automatically)
mlstdb purge --scheme salmonella --st 3
# Remove a specific allele (also removes any STs that reference it)
mlstdb purge --scheme salmonella --allele aroC:1
The BLAST database is rebuilt automatically after each purge. See the purge documentation for the full reference.
Caution
- Back up your existing MLST databases before running updates.
- If using
mlstdb fetchto build a custom scheme list, double-check that all schemes are compatible with themlsttool. Not all schemes are validated for use withmlst. Themlsttool is designed for bacterial species only. mlstdb purgepermanently modifies your local database. Take a backup of yourpubmlst/directory before purging, especially when using--force.
Acknowledgements
Built upon the work of:
- BIGSdb_downloader by Keith Jolley
- pyMLST by Benoit Valot
License
mlstdb was previously licensed under MIT. As of version 0.1.7, it is licensed under GPL v3. Original MIT‑licensed code is preserved and attributed according to MIT terms.
For additional support, please raise an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlstdb-1.2.0.tar.gz.
File metadata
- Download URL: mlstdb-1.2.0.tar.gz
- Upload date:
- Size: 39.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.5 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b54aa9e95c3a6cef797f0e68f6bfa8e18cf7d0c2ebeb3ae94381e5ccb028f9a5
|
|
| MD5 |
6e7777cdb916d57d6ce220e381af6d33
|
|
| BLAKE2b-256 |
d280f598232a64bade03dfd1d0c9b95f8406e0ddfd4a91c90bcf71ba35b98704
|
File details
Details for the file mlstdb-1.2.0-py3-none-any.whl.
File metadata
- Download URL: mlstdb-1.2.0-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.14.5 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79c0070c4220e632e578b1424278628aa655be70fb9197ad4ab0937b573648d9
|
|
| MD5 |
89f8aa4b3f02914431d10172b4fb4593
|
|
| BLAKE2b-256 |
87a2af3b445dafb825d4be47b8d4b7d0dbd80fb5400b43ab98d2e80029d634ba
|