Skip to main content

rmlst-cli is a simple tool to use the rMLST API through the command line.

Project description

rmlst-cli

rmlst-cli is a simple tool to use the rMLST API through the command line.

Install

pip install rmlst-cli
# or
uv tool install rmlst-cli
# or
conda install -c bioconda rmlst-cli
# or
pixi add -c bioconda rmlst-cli

Quickstart

Single FASTA file:

rmlst -f sample.fasta

Directory of FASTA files:

rmlst -d ./fastas/ -O ./results/

Output modes

  • Full JSON (default):

    rmlst -f sample.fasta
    
  • Species only (two columns: species and support):

    rmlst -f sample.fasta --species-only
    # With custom headers
    rmlst -f sample.fasta --species-only="Species Support"
    

Examples

Trim to 5000 contigs:

rmlst -f large.fasta --trim-to-5000

Graceful failure (continue on error):

rmlst -d ./fastas/ --graceful

Exit codes

Code Meaning
0 Success
1 Unexpected error
2 Input/usage error (invalid FASTA, empty dir, etc.)
3 Too many contigs (>5000) without --trim-to-5000
4 Network error after retries
5 HTTP error or invalid JSON
7 Filesystem error
130 Interrupted (Ctrl-C)

Python API usage

from rmlst_cli import api

# Single file
try:
    result = api.identify("sample.fasta")
    print(result)
except Exception as e:
    print(f"Error: {e}")

# Directory
for basename, result in api.identify_dir("./fastas/", graceful=True):
    print(f"{basename}: {result}")

# Extract species
from rmlst_cli.formats import extract_species, extract_species_and_support
species = extract_species(result)  # Comma-separated string
species_names, support_values = extract_species_and_support(result)  # Separate strings

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rmlst_cli-1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmlst_cli-1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file rmlst_cli-1.1.tar.gz.

File metadata

  • Download URL: rmlst_cli-1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rmlst_cli-1.1.tar.gz
Algorithm Hash digest
SHA256 20651b38aad7625e96a7fb85858495d12197fdf5c2deebbdbd10f665c96df553
MD5 8a2168c590369cb78c18f144bba82fe2
BLAKE2b-256 763445d08c5cf06b8851eb337f76b17e27f27b0ed5c43dcd15c447415a06a670

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmlst_cli-1.1.tar.gz:

Publisher: ci.yml on ssi-dk/rmlst-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rmlst_cli-1.1-py3-none-any.whl.

File metadata

  • Download URL: rmlst_cli-1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rmlst_cli-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 254ec7ccbce0e93a37ab47e183894b3ef72f59aa51c45d8bc16c67c2020874c0
MD5 10d35d95910bf221c504701675d58796
BLAKE2b-256 3aa06ae4564682216a1750509b5f3da0b6168df438eb9ae0e3f5403375d38770

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmlst_cli-1.1-py3-none-any.whl:

Publisher: ci.yml on ssi-dk/rmlst-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page