Skip to content

gseek

One reproducible alignment layer for eight DNA tools.

gseek turns BLAST+, minimap2, MUMmer4, KMA, BWA, mash, sourmash, and skani into one request/result model — with content-addressed indexes, lossless records, and replayable run manifests. It is pure Python: zero runtime dependencies.

Python ≥ 3.12 8 backends stdlib only MIT

Quickstart Tutorial API reference

Why gseek

  • One record model


    BLAST outfmt, PAF, SAM, KMA, and MUMmer output normalize into the same AlignmentRecord / DistanceRecord, with coordinates, identity, and coverage carrying their source.

  • Content-addressed indexes


    Index keys include adapter version, semantic parameters, target content hash, and tool version. No mtime guessing; concurrent builds are locked.

  • Replayable manifests


    Every run can write gseek.run/1 with inputs, commands, tool versions, result hash, and an allowlisted environment. verify and replay check the evidence instead of trusting logs.

  • Zero runtime dependencies


    gseek is stdlib-only Python. External aligners stay external, discovered at runtime with actionable errors when a binary or version is missing.

How it fits together

gseek architecture

Consumers share one API; adapters only plan commands and parse output; biological rules stay in the consumer.

Backends

Backend Input Index Operations
blast FASTA target alignment (DNA/protein tasks)
minimap2 FASTA / FASTQ / paired target alignment
kma FASTA / FASTQ / paired target alignment
mummer FASTA none alignment (MUMmer 4)
bwa FASTA / FASTQ / paired target alignment
mash FASTA / FASTQ sketch distance / screen
sourmash FASTA / FASTQ sketch search / gather
skani FASTA sketch ANI distance

Install

pip install gseek==0.10.5
gseek --version
gseek doctor
gseek backends --json

doctor probes every external tool and exits non-zero when one is missing. backends --json is the machine-readable capability matrix.

First call

from pathlib import Path

import gseek

result = gseek.align(
    backend="minimap2",
    query=Path("sample.fna"),
    target=[Path("scheme/alleles.fna")],
    preset="asm5",
    threads=8,
    index="auto",
    manifest=Path("runs/sample.manifest.json"),
)

print(result.stats.record_count)
for hit in result.records:
    print(hit.query_id, hit.target_id, hit.identity)

Start here

  • Quickstart


    Install gseek and complete a first CLI or Python alignment.

    Quickstart

  • Tutorial


    A complete walkthrough: indexes, distance, manifests, replay, and errors.

    Tutorial

  • API reference


    Public functions, result models, the adapter protocol, and schemas.

    API reference

  • CLI reference


    Commands, JSON output, exit codes, and automation conventions.

    CLI reference

  • Error model


    Typed exceptions, gseek.error/1, and stable process exit codes.

    Error model

  • Compatibility


    Migrate gside, gspec, or gmlst through legacy | gseek | shadow.

    Compatibility

Built for the ecosystem

gseek is the shared alignment layer for gside, gspec, and gmlst. Consumers keep their own thresholds, allele calling, and species rules; gseek keeps the evidence reproducible.

Development