Skip to content

Usage Overview

mlstdb has three commands. Most users only need the first two.


Workflow

┌──────────────────────────────────────────────────────────────┐
│                    mlstdb workflow                           │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│   mlstdb connect ──► Register OAuth credentials              │
│        │              (one-time per database)                │
│        ▼                                                     │
│   mlstdb update  ──► Download schemes + build BLAST DB       │
│        │              (uses built-in curated scheme list)    │
│        ▼                                                     │
│   mlst tool      ──► Run MLST analysis with updated DB       │
│                                                              │
├──────────────────────────────────────────────────────────────┤
│   ADVANCED (optional)                                        │
│                                                              │
│   mlstdb fetch   ──► Explore all available schemes           │
│        │              with custom filters                    │
│        ▼                                                     │
│   mlstdb update  ──► Download using custom scheme list       │
│       --input <file>                                         │
└──────────────────────────────────────────────────────────────┘

Commands

mlstdb connect — Register credentials

Sets up OAuth authentication with PubMLST or Pasteur. Run once per database.

mlstdb connect --db pubmlst
mlstdb connect --db pasteur

Credentials are saved to ~/.config/mlstdb/ and reused automatically by update and fetch.

Full connect reference →


mlstdb update — Download and build

Downloads MLST schemes and creates a BLAST database. This is the main command you'll use regularly.

mlstdb update

By default, it uses the built-in curated list of ~300 MLST schemes from both PubMLST and Pasteur. You can also provide a custom scheme list generated by fetch.

Full update reference →


mlstdb fetch — Explore schemes (advanced)

Discovers and lists all available MLST schemes from PubMLST or Pasteur with custom filtering. Useful when you need to find specific schemes or build a custom scheme list.

mlstdb fetch --db pubmlst --filter "*klebsiella*"

Most users don't need this — the update command already includes a curated list of validated schemes.

Full fetch reference →


Typical usage

First time setup

# Install
conda create -n mlst -c bioconda mlst && conda activate mlst
pip install mlstdb

# Register (one-time)
mlstdb connect --db pubmlst
mlstdb connect --db pasteur

# Download everything
mlstdb update

Routine updates

# Re-download all schemes and rebuild BLAST DB
mlstdb update

Using with mlst

mlst --blastdb blast/mlst.fa --datadir pubmlst your_assembly.fasta