HUB
Sign inSign up

bbeckleyhub/saurus-cli

By bbeckleyhub

•Updated 5 days ago

WELCOME TO SAURUS-CLI

Image
0

390

bbeckleyhub/saurus-cli repository overview

⁠SAURUS-CLI (Docker image)

Command-line interface for the SAURUS Staphylococcus aureus genomic surveillance database.

Query the SAURUS master table (134,273 S. aureus genomes, 134,160 with typing results) from your terminal. Filter by lineage, resistance cassette, capsule serotype, country, source, host, or collection year. Export in seven formats: TSV, CSV, JSON, assembly accession, BioSample, SRA run, or BioProject.

All data is bundled inside this image (data release v1.1.0). No downloads, API keys, or network access are required after docker pull.

⁠Why use this image

The image contains:

  • The complete SAURUS data bundle v1.1.0: 16 gzipped TSV tables plus a DATA_VERSION marker, covering 134,160 typed genomes across the typing, gene, and metadata modules, loaded transparently by the CLI
  • The NCBI datasets command-line tool, so you can fetch genome assemblies without installing anything on your host
  • A minimal Python 3.12 runtime with pandas as the only Python dependency

If you already have a Python environment, pip install saurus-cli is faster. Use the Docker image when you want zero host dependencies, reproducible execution, or a self-contained pipeline step.

⁠Quick start

Pull the image:

docker pull bbeckleyhub/saurus-cli:latest

Verify it works:

docker run --rm bbeckleyhub/saurus-cli:latest --version

This prints the CLI version (v0.4.0) and the active data version (v1.1.0).

Run a real query:

docker run --rm bbeckleyhub/saurus-cli:latest --lineage USA300 --count

Expected output: 10,448

⁠Available tags

  • 0.4.0 (current release): ships data bundle v1.1.0, with the VFDB layer repaired to its full 1,136,550 rows covering 98,948 genomes; SHA256 integrity checks for bundled and downloaded data; clear error messages and exit code 1 for unknown gene names, lineage labels, and configuration keys; and an explicit warning and exclusion count for genomes without a clonal-complex assignment
  • 0.3.0: adds SRA / BioSample / BioProject export, --has-sra, flexible data directories, volume persistence, and saurus init (ships data bundle v1.0.0)
  • 0.1.0: first public release
  • latest: always points to the most recent stable release

Pin to a specific version in production. Use latest only for exploration.

⁠Common commands

Count USA300 genomes globally:

docker run --rm bbeckleyhub/saurus-cli:latest --lineage USA300 --count

Count USA100 bloodstream isolates in the USA:

docker run --rm bbeckleyhub/saurus-cli:latest \
    --lineage USA100 --country USA --source blood --count

Expected output: 341

Export matching genomes to your host directory:

docker run --rm -v "$PWD:/work" bbeckleyhub/saurus-cli:latest \
    --lineage USA300 --country USA --source blood \
    --format tsv,accession -o usa300_blood

This writes two files to the current directory on your host:

  • usa300_blood.tsv: full metadata table
  • usa300_blood.txt: plain accession list

Filter by resistance gene content:

docker run --rm bbeckleyhub/saurus-cli:latest --amr mecA,tetM --count

Expected output: 8,060

Combine typing and gene filters (independent, combined in one call):

docker run --rm bbeckleyhub/saurus-cli:latest --st 8 --vfdb lukS-PV --count

Expected output: 6,919

Filter by collection year:

docker run --rm bbeckleyhub/saurus-cli:latest --year 2020 --count

Expected output: 10,636

Filter to genomes with retrievable raw reads:

docker run --rm bbeckleyhub/saurus-cli:latest --has-sra --count

Expected output: 22,322

Show the full example gallery:

docker run --rm bbeckleyhub/saurus-cli:latest --examples

Show author, affiliation, and citation information:

docker run --rm bbeckleyhub/saurus-cli:latest --about

⁠Exporting raw reads (since v0.3.0)

SAURUS-CLI can export SRA run accessions directly, ready for fastq-dl or prefetch:

docker run --rm -v "$PWD:/work" bbeckleyhub/saurus-cli:latest \
    --lineage USA300 --format sra -o usa300_runs

This writes usa300_runs_sra_runs.txt with deduplicated SRR/ERR/DRR accessions. Fetch the FASTQ files on your host:

fastq-dl --accession-list usa300_runs_sra_runs.txt

Or, if you prefer BioSamples (for fastq-dl --group-by-sample) or BioProjects (for study-level downloads):

docker run --rm -v "$PWD:/work" bbeckleyhub/saurus-cli:latest \
    --lineage USA300 --format biosample,bioproject -o usa300_meta

⁠Pipeline integration

Pipe accessions directly into NCBI datasets, all inside the container:

docker run --rm bbeckleyhub/saurus-cli:latest --lineage USA300 --quiet | \
    datasets download genome accession --inputfile /dev/stdin --filename usa300.zip

Or write the accessions to the host and pipe from the host:

docker run --rm bbeckleyhub/saurus-cli:latest --lineage USA300 --quiet > accessions.txt
datasets download genome accession --inputfile accessions.txt --filename usa300.zip

The second form requires datasets on the host. The first does not.

⁠Persisting and updating data (since v0.3.0)

The image ships with data bundle v1.1.0 baked in. If you want the data to survive container restarts and be upgradeable without pulling a new image, mount a named volume at /data:

# First run: entrypoint seeds /data from the bundled dataset
docker run --rm -v saurus_data:/data bbeckleyhub/saurus-cli:latest --lineage USA300 --count

# Update the data in the same volume (no image pull required)
docker run --rm -v saurus_data:/data bbeckleyhub/saurus-cli:latest init --force

# Subsequent runs use the updated data
docker run --rm -v saurus_data:/data bbeckleyhub/saurus-cli:latest --version

The entrypoint automatically sets SAURUS_DATA_DIR=/data when a volume is mounted, so all queries and updates use the persistent location.

⁠Pinning to a specific data version
docker run --rm -v saurus_data:/data bbeckleyhub/saurus-cli:latest \
    init --version v1.0.0 --force
⁠Installing from a local zip (air-gapped)
docker run --rm -v saurus_data:/data -v "$PWD:/work" \
    bbeckleyhub/saurus-cli:latest \
    init --from-file /work/saurus_data.zip --force

⁠Interactive mode

To explore the container:

docker run --rm -it --entrypoint sh bbeckleyhub/saurus-cli:latest

Then run any command:

saurus --examples
saurus --about
saurus --lineage USA300 --count

Exit with exit or Ctrl+D.

⁠Bundled data

When no volume is mounted, the data is at /usr/local/share/saurus/data/ inside the container. When a volume is mounted at /data, the entrypoint seeds that volume from the bundled data on first run and points the CLI at /data.

To inspect the raw tables:

docker run --rm --entrypoint sh bbeckleyhub/saurus-cli:latest \
    -c "ls -la /usr/local/share/saurus/data/"

You will see eight subdirectories plus a DATA_VERSION file:

agr  capsule  DATA_VERSION  gene_annotation  metadata  mlst  mrsa  sccmec  spa

All files are gzipped TSVs, readable with zcat or pandas. Example:

docker run --rm --entrypoint sh bbeckleyhub/saurus-cli:latest \
    -c "zcat /usr/local/share/saurus/data/mrsa/mrsa_all.tsv.gz | head -5"

⁠Data directory priority

The CLI searches for the data bundle in the following order (highest priority first):

  1. --data-dir <path> flag
  2. $SAURUS_DATA_DIR environment variable
  3. $XDG_DATA_HOME/saurus (default ~/.local/share/saurus)
  4. ~/.saurus/data (legacy)
  5. ./data (development)
  6. sys.prefix/share/saurus/data (bundled)

The entrypoint sets SAURUS_DATA_DIR=/data when a volume is mounted, so the volume always wins over the bundled snapshot.

⁠What is SAURUS

SAURUS (Staphylococcus aureus Unified Resource for Universal Surveillance) is a free, open genomic resource that consolidates eleven typing, gene-annotation, and epidemiological modules for the entire public S. aureus repository behind a single queryable interface.

The web version runs in your browser at https://saurus-db.org/⁠

SAURUS-CLI is the terminal companion, with the same dataset, the same modules, and the same accession-first output.

⁠Part of ARGUS

SAURUS-CLI is part of the ARGUS initiative (Antimicrobial Resistance Genomic Unified Surveillance), a family of open genomic surveillance resources covering the WHO priority ESKAPE pathogens.

ARGUS code hub: https://github.com/bbeckley-hub/argus-code⁠

⁠Citation

If you use SAURUS-CLI in your research, please cite:

Beckley B. SAURUS-CLI: a reproducible command-line interface for typing-based genome retrieval in Staphylococcus aureus (version 0.4.0) [Computer software]. Zenodo. 2026. doi:10.5281/zenodo.24599839

Data bundle: doi:10.5281/zenodo.24568725 (saurus-data v1.1.0)

Underlying typing pipeline:

Beckley B, Amarh V. StaphScope: a species-optimized computational pipeline for rapid and accessible Staphylococcus aureus genotyping and surveillance. BMC Genomics. 2026;27(1):261. doi:10.1186/s12864-026-12609-x

Source gene annotation dataset:

Shelenkov A, Slavokhotova A, Yunusova M, et al. Genomic typing, antimicrobial resistance gene, virulence factor and plasmid replicon database for the important pathogenic bacteria Staphylococcus aureus. BMC Genom Data. 2025;26(1):65. doi:10.1186/s12863-025-01363-w

⁠License

MIT License. See https://github.com/bbeckley-hub/saurus-cli/blob/main/LICENSE⁠

⁠Support

Bug reports and feature requests: https://github.com/bbeckley-hub/saurus-cli/issues⁠

Email: [email protected]⁠

Tag summary

Content type

Image

Digest

sha256:d93137cfd…

Size

132 MB

Last updated

5 days ago

docker pull bbeckleyhub/saurus-cli