Skip to main content

gspec

English | 中文

Declarative typing databases for bacterial genomes. One directory describes a database (records, provenance, licence, optional sidecars); one versioned scheme document decides the phenotype; BLAST, minimap2 or k-mer containment supplies the evidence. AMR, virulence, serotype, antigen-locus and custom panels all speak the same language. Contig screening emits abricate-compatible TSV; JSON and Markdown are first-class outputs. Python 3.12.

Install

pip install gspec

BLAST+ (blastn, blastx, makeblastdb, blastdbcmd) and minimap2 must be on PATH. The pixi/conda paths install them for you; see installation for those, Docker, and pinned setups.

# from a clone, with the external binaries managed for you
git clone https://github.com/indexofire/gspec.git
cd gspec
pixi install
pixi run gspec --version

Quick start

Bundled databases work offline on first use; every other database is fetched with gspec db fetch.

# contigs -> abricate-compatible TSV on stdout
gspec screen contigs.fa --db eco_dec

# JSON / Markdown for agents and humans
gspec screen contigs.fa --db eco_dec --format json
gspec screen contigs.fa --db eco_dec --format md

# FASTQ reads through minimap2
gspec screen --r1 R1.fastq.gz --r2 R2.fastq.gz --read-type sr --db eco_dec

# two-stage gene typing: screen writes the table, typing designates from it
gspec screen isolate.fa --db eco_dec --output result.tsv
gspec typing result.tsv

# summarize many reports into a gene matrix
gspec summary *.tsv

# databases
gspec db fetch -d ncbi
gspec db list

# introspect the output contract
gspec schema report

Contig defaults are --minid 80 --mincov 80; reads presence defaults to 90% alignment breadth. Full flags and examples: contigs, reads, typing, summary.

Documentation

Topic Page
Install, quickstart installation, quickstart
Contig screening, cluster databases screen
Reads and assembly surveys reads
Gene matrices summary
Typing schemes and phenotypes typing
JSON/Markdown contracts, error envelope outputs, gspec schema
Database catalog, providers, bundles databases
Datadir, sharing, Docker datadir
Custom databases custom-db
Agents and MCP server agents, mcp
Optional gseek engine gseek

Full manual: https://indexofire.github.io/gspec/.

Development and license

Contributor workflow and gates: CONTRIBUTING.md; internal rules: AGENTS.md; trust boundaries: SECURITY.md; changes: CHANGELOG.md.

gspec is MIT-licensed. It is a behavioral reimplementation of abricate (GPL-2.0) and copies no Perl code. The seven gspec-curated bundled databases are permissively licensed; every other provider downloads from upstream at fetch time under its own license. If you use gspec, cite CITATION.cff.

Metadata

Release files for gspec 0.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gspec 0.10.2
File Size Uploaded Provenance Actions
gspec-0.10.2.tar.gz 5.7 MB With provenance Details for gspec-0.10.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gspec 0.10.2
File Interpreter ABI Platform Actions
gspec-0.10.2-py3-none-any.whl Python 3 none any Details for gspec-0.10.2-py3-none-any.whl

Total release size: 11.1 MB

Release files / gspec-0.10.2.tar.gz

Download URL gspec-0.10.2.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e80bffe8b8f92152fe960dc083f9cbe52473b99d3891506c4fbe78d50f4fa6d6
BLAKE2b-256 checksum
How to use checksums
3a4591fc40c0bd6a31058bf33c21d0280cca8bed4f3ca4ba81c00a142ba4d0cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / gspec-0.10.2-py3-none-any.whl

Download URL gspec-0.10.2-py3-none-any.whl
Size 5.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a1096ab313aa7725236988f164fa7744c2f6c5db0b80d9415dbc5c509482e40e
BLAKE2b-256 checksum
How to use checksums
1e418f45e17a609d40620afdb44b73a7ab8438752966cdae95651be7b021b6c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for gspec 0.10.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gspec-0.10.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page