How tlemane/kmindex works
kmindex builds and queries k-mer indexes for sequencing datasets, reporting shared-k-mer results; its findere-style query uses (s+z)-mers to reduce false positives. The CLI also supports index registration, merging, metadata, compression, and summarized indexes. A separate HTTP server exposes query and index-information endpoints, with a Python client for synchronous or asynchronous requests. The excerpts show the ordinary query’s FASTX batching and index solving, and the server’s routes; several other CLI capabilities are documented by the command registry but their implementations were not sampled, so their internal links are omitted.
Main entry points: cli.hpp Command registry · index.cpp Global index · query.cpp FASTX query · query2.cpp Multi-index query
Components 19
CLI workflows
- CLI entry
app/kmindex/main.cpp - Command registry
app/kmindex/cli.hpp - Index build
app/kmindex/build.hpp - FASTX query
app/kmindex/query.cpp - Multi-index query
app/kmindex/query2.cpp - Summary indexes
app/kmindex/query_sum.cpp - Index management
app/kmindex
Index and query engine
- Index catalog
lib/src/index/index_infos.cpp - Global index
lib/src/index/index.cpp - K-mer index
lib/src/index/kindex.cpp - Query engine
lib/src/query/query.cpp - Result formatting
lib/src/query/query_results.cpp - Summary index
lib/include/kmindex/index/sum_index.hpp
HTTP service
- HTTP server
app/kmindex-server/server.cpp - Request handling
app/kmindex-server/request.hpp
Python client
- Python API client
pykmindex/pykmindex/server.py - Query payloads
pykmindex/pykmindex/query.py
Other components
- Sequencing user
- HTTP client
Connections 19
- Sequencing user → CLI entry: runs
- CLI entry → Command registry: parses commands
app/kmindex/main.cpp - Command registry → Index build: registers build
app/kmindex/cli.hpp - Command registry → FASTX query: registers query
app/kmindex/cli.hpp - Command registry → Multi-index query: registers query2
app/kmindex/cli.hpp - Command registry → Summary indexes: registers sum query
app/kmindex/cli.hpp - Sequencing user → HTTP server: sends requests
- HTTP server → Request handling: dispatches POST
app/kmindex-server/server.cpp - HTTP server → Global index: loads index
app/kmindex-server/server.cpp - Python API client → Query payloads: uses payloads
pykmindex/pykmindex/server.py - HTTP client → Python API client: submits queries
pykmindex/pykmindex/server.py - FASTX query → K-mer index: solves batches
app/kmindex/query.cpp - FASTX query → Result formatting: formats results
app/kmindex/query.cpp - Multi-index query → Global index: loads and merges
app/kmindex/query2.cpp - Multi-index query → Query engine: queries batches
app/kmindex/query2.cpp - Summary indexes → Summary index: searches partitions
app/kmindex/query_sum.cpp - Index build → Global index: builds index
- Index management → Global index: manages indexes
- Request handling → Query engine: solves request