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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20651b38aad7625e96a7fb85858495d12197fdf5c2deebbdbd10f665c96df553
|
|
| MD5 |
8a2168c590369cb78c18f144bba82fe2
|
|
| BLAKE2b-256 |
763445d08c5cf06b8851eb337f76b17e27f27b0ed5c43dcd15c447415a06a670
|
Provenance
The following attestation bundles were made for rmlst_cli-1.1.tar.gz:
Publisher:
ci.yml on ssi-dk/rmlst-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmlst_cli-1.1.tar.gz -
Subject digest:
20651b38aad7625e96a7fb85858495d12197fdf5c2deebbdbd10f665c96df553 - Sigstore transparency entry: 1809875396
- Sigstore integration time:
-
Permalink:
ssi-dk/rmlst-cli@ec6e3caa490dcaeb1958fad66818fd3d0e60cd43 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/ssi-dk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ec6e3caa490dcaeb1958fad66818fd3d0e60cd43 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
254ec7ccbce0e93a37ab47e183894b3ef72f59aa51c45d8bc16c67c2020874c0
|
|
| MD5 |
10d35d95910bf221c504701675d58796
|
|
| BLAKE2b-256 |
3aa06ae4564682216a1750509b5f3da0b6168df438eb9ae0e3f5403375d38770
|
Provenance
The following attestation bundles were made for rmlst_cli-1.1-py3-none-any.whl:
Publisher:
ci.yml on ssi-dk/rmlst-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rmlst_cli-1.1-py3-none-any.whl -
Subject digest:
254ec7ccbce0e93a37ab47e183894b3ef72f59aa51c45d8bc16c67c2020874c0 - Sigstore transparency entry: 1809875405
- Sigstore integration time:
-
Permalink:
ssi-dk/rmlst-cli@ec6e3caa490dcaeb1958fad66818fd3d0e60cd43 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/ssi-dk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ec6e3caa490dcaeb1958fad66818fd3d0e60cd43 -
Trigger Event:
push
-
Statement type: