Compare commits

..
1 Commits
Author SHA1 Message Date
Eric Coissac 26026288de refactor(benchmark): consolidate generated artifacts under run/ directory
Release / create-release (push) Successful in 2m34s
Release / build-linux-x86_64 (push) Successful in 8m10s
Release / build-macos-arm64 (push) Failing after 1m19s
Restructure the benchmark pipeline to direct all simulated data, indices, statistics, and query outputs into a unified `run/` directory. Update Makefile targets, shell scripts, and Python utilities to resolve paths relative to this new base. Adjust documentation and dependency tracking to match the revised layout, and remove outdated temporary artifacts.
2026-08-29 00:20:31 +02:00
573 changed files with 16794 additions and 78946 deletions

No files matched your search

-1
View File
@@ -1 +0,0 @@
0.3.12+0.1.1
-246
View File
@@ -1,246 +0,0 @@
# crate-kit: common targets for the crates of a multi-crate Rust project.
#
# This directory (.crate-kit/) is a COPY of the kit/ folder of the crate-kit repository: do not
# modify it here, fix it in crate-kit then run `make kit-update`.
#
# Usage, in the crate's Makefile:
# RELEASE_PROJECT_DESC = acmexxx (short description) # optional
# include .crate-kit/crate.mk
#
# Adjustable variables (before the include or on the command line):
# CARGO, CARGO_TOML, FEATURES, API_DIR, RELEASE_NOTES_DIR, REGISTRY, KIT_SRC
# KIT_LANG language of LLM-generated documents (default en; any language name or ISO code)
# RELEASE=x.y.z forces the version of bump-version / jjrelease
# DRY_RUN=1 publish: checks the package without sending it
#
# Crate kind: CRATE_KIND (default "crate"). kinds/<kind>.mk sets, before the targets, the generic variables
# that the kit reads: BUILD_TARGET (--target of the builds), EXTRA_TARGETS (targets that check and clippy
# go through in addition to the host), PUBLISH, API_TRACKED, WIKI (yes|no: publication to the registry,
# API snapshot and version verdict, wiki), AFTER_RELEASE (command run after the tag). A kind
# can also add its own targets. Kinds specific to an organization come from its overlay (org.mk
# sets REGISTRY and REGISTRY_INDEX); see tools/kit-assemble.sh.
KIT_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
KIT_SRC ?= ../crate-kit
CARGO ?= cargo
CARGO_TOML ?= Cargo.toml
FEATURES ?=
API_DIR ?= api
RELEASE_NOTES_DIR ?= ReleaseNotes
CRATE_KIND ?= crate
BUILD_TARGET ?=
PUBLISH ?= yes
API_TRACKED ?= yes
WIKI ?= yes
AFTER_RELEASE ?=
# Additional targets that check and clippy go through (e.g. EXTRA_TARGETS = wasm32-unknown-unknown).
EXTRA_TARGETS ?=
RELEASE_PROJECT_DESC ?= $(shell sed -n 's/^name = "\(.*\)"/\1/p' $(CARGO_TOML) | head -n 1)
GREEN = \033[0;32m
YELLOW = \033[1;33m
BLUE = \033[1;34m
NC = \033[0m
include $(KIT_DIR)/dev-patch.mk
include $(KIT_DIR)/jj.mk
# Language of the documents an LLM generates (release notes). Default English; an extension kit
# overrides it in its org.mk (KIT_LANG ?= fr), included above, or the user on the command line.
KIT_LANG ?= en
# Language of the commit messages written by `jj auto-doc` (pmojj reads PMOJJ_LANG).
export PMOJJ_LANG = $(KIT_LANG)
ifeq ($(wildcard $(KIT_DIR)/kinds/$(CRATE_KIND).mk),)
$(error unknown crate kind: CRATE_KIND = $(CRATE_KIND) (kinds: $(patsubst $(KIT_DIR)/kinds/%.mk,%,$(wildcard $(KIT_DIR)/kinds/*.mk))))
endif
include $(KIT_DIR)/kinds/$(CRATE_KIND).mk
export KIT_LANG CARGO CARGO_TOML API_DIR RELEASE_NOTES_DIR REGISTRY RELEASE_PROJECT_DESC KIT_SRC CRATE_KIND PUBLISH API_TRACKED WIKI
.DEFAULT_GOAL := build
.PHONY: help build release debug test test-doc doc doc-build clean check fmt fmt-check clippy \
watch ci deps update bench coverage bump-version api-level api-snapshot publish wiki \
jjnew jjpush jjfetch jjrelease bookmark-check kit-check needs-commit kit-update kit-version
help:
@echo "$(GREEN)Available commands:$(NC)"
@sed -n "s/^## *\([^:]*\): */\1$$(printf '\t')/p" $(MAKEFILE_LIST) | column -t -s "$$(printf '\t')" | sed -e 's/^/ /'
## build: Release build (alias of release)
build: release
## release: Release build (the kind's BUILD_TARGET, if it sets one)
release:
@echo "$(YELLOW)→ Building (release)...$(NC)"
$(CARGO) build --release $(if $(BUILD_TARGET),--target $(BUILD_TARGET)) $(FEATURES)
@echo "$(GREEN)✓ Build finished$(NC)"
## debug: Debug build (the kind's BUILD_TARGET, if it sets one)
debug:
@echo "$(YELLOW)→ Building (debug)...$(NC)"
$(CARGO) build $(if $(BUILD_TARGET),--target $(BUILD_TARGET)) $(FEATURES)
@echo "$(GREEN)✓ Build finished$(NC)"
## test: All tests
test:
@echo "$(YELLOW)→ Running the tests...$(NC)"
$(CARGO) test --all --all-features
@echo "$(GREEN)✓ Tests finished$(NC)"
## test-doc: Documentation example tests
test-doc:
@echo "$(YELLOW)→ Testing the documentation examples...$(NC)"
$(CARGO) test --doc --all-features
@echo "$(GREEN)✓ Documentation tests finished$(NC)"
## doc: Generates the documentation and opens it
doc:
@echo "$(YELLOW)→ Generating the documentation...$(NC)"
$(CARGO) doc --no-deps --document-private-items --all-features --open
## doc-build: Generates the documentation without opening it
doc-build:
@echo "$(YELLOW)→ Generating the documentation...$(NC)"
$(CARGO) doc --no-deps --document-private-items --all-features
## clean: Cleanup
clean:
@echo "$(YELLOW)→ Cleaning...$(NC)"
$(CARGO) clean
## msrv-check: Does the declared rust-version name an installed toolchain on which the crate checks? (none declared: nothing)
msrv-check:
@$(KIT_DIR)/scripts/msrv-check.sh
.PHONY: msrv-check
## check: Code check (host, then EXTRA_TARGETS)
check:
@$(KIT_DIR)/scripts/publish-guard.sh
@echo "$(YELLOW)→ Checking the code...$(NC)"
$(CARGO) check --all
@for t in $(EXTRA_TARGETS); do $(CARGO) check --all --target $$t || exit 1; done
@echo "$(GREEN)✓ Code valid$(NC)"
## fmt: Code formatting
fmt:
$(CARGO) fmt --all
## fmt-check: Formatting check
fmt-check:
$(CARGO) fmt --all -- --check
## clippy: Static analysis on the host then EXTRA_TARGETS (warnings = errors)
clippy:
@echo "$(YELLOW)→ Analysing with clippy...$(NC)"
$(CARGO) clippy --all-targets --all-features -- -D warnings
@for t in $(EXTRA_TARGETS); do $(CARGO) clippy --lib --all-features --target $$t -- -D warnings || exit 1; done
@echo "$(GREEN)✓ Clippy analysis finished$(NC)"
## watch: Continuous check
watch:
$(CARGO) watch -x check
## ci: Verification pipeline (deps-check fmt-check clippy msrv-check test doc-build)
ci: deps-check fmt-check clippy msrv-check test doc-build
@echo "$(GREEN)✓ All CI checks passed$(NC)"
## deps: Outdated dependencies
deps:
$(CARGO) outdated
## update: Updates the dependencies
update:
$(CARGO) update
## bench: Benchmarks
bench:
$(CARGO) bench
## coverage: Coverage report (cargo-llvm-cov)
coverage:
@echo "$(YELLOW)→ Generating the coverage report...$(NC)"
@mkdir -p target/coverage
$(CARGO) llvm-cov --json --output-path target/coverage/llvm-cov-report.json
$(CARGO) llvm-cov report
@echo "$(GREEN)✓ Report: target/coverage/llvm-cov-report.json$(NC)"
## api-level: Compares the public API to the last snapshot (initial, unchanged, additive or breaking)
api-level:
@$(KIT_DIR)/scripts/api-level.sh
## api-snapshot: Records the public API of the current version (api/<version>.txt and .json.gz)
api-snapshot:
@$(KIT_DIR)/scripts/api-snapshot.sh
## bump-version: Next version according to the API (breaking: x.y+1.0 in 0.x), or fixed RELEASE=x.y.z
bump-version:
@$(KIT_DIR)/scripts/bump-version.sh
## publish: Publishes to the $(REGISTRY) registry (done by the CI after the tag; manual troubleshooting, DRY_RUN=1: without sending)
publish:
@$(KIT_DIR)/scripts/publish.sh
## wiki: Publishes the API doc to the wiki (done by the CI after the tag; manual troubleshooting, DRY_RUN=1: without push)
wiki:
@$(KIT_DIR)/scripts/wiki.sh
## jjpush: Version bump, API snapshot, documentation, then main advances to the commit and is pushed
jjpush: bookmark-check deps-check bump-version api-snapshot
@echo "$(YELLOW)→ Pushing the commit to main...$(NC)"
@jj auto-doc
@$(KIT_DIR)/scripts/push-main.sh
@$(KIT_DIR)/scripts/new-commit.sh
@echo "$(GREEN)✓ main pushed; new working commit created on top of it$(NC)"
## jjrelease: Release (ci, version according to the API, snapshot, notes, push of main, tag; the CI then publishes)
jjrelease: bookmark-check kit-check ci bump-version api-snapshot
@echo "$(BLUE)→ Documenting the undocumented commits...$(NC)"
@jj auto-doc
@echo "$(BLUE)→ Synchronizing the tags with the remote repository...$(NC)"
@jj git fetch
@$(KIT_DIR)/scripts/release-notes.sh
@echo "$(BLUE)→ Documenting the current commit...$(NC)"
@jj auto-doc
@echo "$(BLUE)→ Pushing main...$(NC)"
@$(KIT_DIR)/scripts/push-main.sh
@$(KIT_DIR)/scripts/tag.sh
@$(KIT_DIR)/scripts/new-commit.sh
@echo "$(GREEN)✓ Tag pushed: the CI (Release workflow) publishes the crate, updates the wiki and creates the release$(NC)"
ifneq ($(strip $(AFTER_RELEASE)),)
@echo "$(BLUE)→ After the release: $(AFTER_RELEASE)$(NC)"
@$(AFTER_RELEASE)
endif
@name=$$(sed -n 's/^name = "\(.*\)"/\1/p' $(CARGO_TOML) | head -n 1); \
v=$$(sed -n 's/^version = "\(.*\)"/\1/p' $(CARGO_TOML) | head -n 1); \
case "$$v" in 0.*) req=$$(echo "$$v" | cut -d. -f1,2);; *) req=$$(echo "$$v" | cut -d. -f1);; esac; \
echo "$(YELLOW)⚠ Dependent projects: the requirement must accept $$v. If it does not, the local [patch] is ignored: raise it in their Cargo.toml $$name = { version = \"$$req\", registry = \"$(REGISTRY)\" } then cargo update -p $$name$(NC)"
## bookmark-check: Does main track main@origin? Otherwise the push of main would fail at the end of the release (read-only)
bookmark-check:
@$(KIT_DIR)/scripts/bookmark-check.sh
## kit-check: Is this crate's kit and release workflow identical to crate-kit's? (read-only)
kit-check:
@$(KIT_DIR)/scripts/kit-check.sh
## needs-commit: Are there changes other than the kit's to commit? (read-only, code 1 if not)
needs-commit:
@$(KIT_DIR)/scripts/needs-commit.sh
## kit-update: Updates .crate-kit/ from the extension kit (KIT_SRC)
kit-update:
@test -x "$(KIT_SRC)/tools/kit-copy.sh" || { echo "crate-kit not found: $(KIT_SRC) (set KIT_SRC=...)"; exit 1; }
@"$(KIT_SRC)/tools/kit-copy.sh" $(KIT_DIR)
@echo "$(GREEN)✓ .crate-kit/ up to date: crate-kit $$(cat $(KIT_DIR)/VERSION)$(NC)"
## print-%: Value of a make variable (e.g. make print-PUBLISH); for the tools
print-%:
@echo '$($*)'
## kit-version: Kit version installed in this crate
kit-version:
@cat $(KIT_DIR)/VERSION
-45
View File
@@ -1,45 +0,0 @@
# Private registry and local Cargo configuration (joint development).
# Fragment included by crate.mk and by the Makefiles that are not crates (workspace):
# include .crate-kit/dev-patch.mk
DEVPATCH_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
CARGO_TOML ?= Cargo.toml
# Values specific to the organization (REGISTRY, REGISTRY_INDEX, FORGE_URL…): org.mk, provided by the
# extension that the crate declares (KIT_OVERLAY, tools/kit-assemble.sh). REGISTRY = crates-io: crates.io, without
# index or [patch]. Without org.mk, no registry: publish and deps-check fail saying so.
-include $(DEVPATCH_DIR)/org.mk
REGISTRY ?=
REGISTRY_INDEX ?=
# MEMBERS_DIR: folder of the workspace when it is not the project root (e.g. src): its Cargo.toml and its
# members are scanned by dev-patch and deps-check, in addition to the root ones.
MEMBERS_DIR ?=
export CARGO_TOML MEMBERS_DIR REGISTRY REGISTRY_INDEX FORGE_TOKEN_FILE
# Private registry: the index comes from the environment, never from a file tracked by the repository (CI,
# Docker and a repository cloned alone therefore work without configuration).
ifneq ($(filter-out crates-io,$(strip $(REGISTRY))),)
REGISTRY_UP := $(shell echo '$(REGISTRY)' | tr 'a-z-' 'A-Z_')
CARGO_REGISTRIES_$(REGISTRY_UP)_INDEX := $(REGISTRY_INDEX)
export CARGO_REGISTRIES_$(REGISTRY_UP)_INDEX
endif
# Joint development: .cargo/config.toml (local, ignored) is regenerated at EVERY invocation of
# make, whatever the target, from the project's actual dependencies. Nothing to remember.
DEV_PATCH_RUN := $(shell CARGO_TOML='$(CARGO_TOML)' MEMBERS_DIR='$(MEMBERS_DIR)' REGISTRY='$(REGISTRY)' REGISTRY_INDEX='$(REGISTRY_INDEX)' $(DEVPATCH_DIR)/scripts/dev-patch.sh)
.PHONY: dev-patch
## dev-patch: Regenerates .cargo/config.toml (registry + local patches); already done at every make
dev-patch:
@$(DEVPATCH_DIR)/scripts/dev-patch.sh
@echo "ok: .cargo/config.toml up to date"
.PHONY: deps-check deps-bump
## deps-check: Dependencies up to date? from the private registry (requirement, lock, neighbour, duplicates) and external (requirement, minor, lock)
deps-check:
@rc=0; $(DEVPATCH_DIR)/scripts/deps-check.sh || rc=1; $(DEVPATCH_DIR)/scripts/deps-check-external.sh || rc=1; exit $$rc
## deps-bump: Raises the outdated requirements (private registry and external) to the latest version, then cargo update -p
deps-bump:
@$(DEVPATCH_DIR)/scripts/deps-check.sh bump
@$(DEVPATCH_DIR)/scripts/deps-check-external.sh bump
-22
View File
@@ -1,22 +0,0 @@
# Jujutsu targets common to all the crates and to crate-kit itself.
# Included by crate.mk; a repository that is not a crate includes it directly.
JJ_KIT_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
GREEN ?= \033[0;32m
YELLOW ?= \033[1;33m
BLUE ?= \033[1;34m
NC ?= \033[0m
## jjnew: Documents the current commit then creates a new one
jjnew:
@echo "$(YELLOW)→ Creating a new commit...$(NC)"
@jj auto-doc
@$(JJ_KIT_DIR)/scripts/new-commit.sh
@echo "$(GREEN)✓ Done$(NC)"
## jjfetch: Fetches the origin and rebases the local work on top of main@origin (nothing is lost)
jjfetch:
@$(JJ_KIT_DIR)/scripts/jjfetch.sh
@# Reruns make to resynchronize .crate-kit/: the Makefile does it at startup, before the rebase, and
@# the rebase may have left conflict markers there (kit copy newer than the origin's).
@$(MAKE) --no-print-directory -s help >/dev/null
-3
View File
@@ -1,3 +0,0 @@
# "crate" kind (default): ordinary Rust crate, published to the private registry, API tracked, wiki.
# The default values of BUILD_TARGET, EXTRA_TARGETS, PUBLISH, API_TRACKED, WIKI and AFTER_RELEASE
# (crate.mk) describe this kind: nothing to set here.
-9
View File
@@ -1,9 +0,0 @@
# Values specific to obi, read by dev-patch.mk (hence by every Makefile of the cluster) and by crate-kit.
# The cargo registry to publish to (a private name, or crates-io) and the forge hosting it.
REGISTRY ?= obi
FORGE_URL ?= https://forge.metabarcoding.org
REGISTRY_INDEX ?= sparse+$(FORGE_URL)/api/packages/$(REGISTRY)/cargo/
# No token here: the forge tokens of a workstation are files of the cluster, in secrets/ next to the
# repositories (secrets/forge.metabarcoding.org.token, ...), outside every repository. FORGETOKEN (CI) overrides them.
# Language of the documents an LLM generates (release notes, commit messages, Claude agents' notes).
KIT_LANG ?= en
-96
View File
@@ -1,96 +0,0 @@
#!/usr/bin/env bash
# Compares the current public API to the last snapshot and prints on standard output:
# initial no snapshot: first tracked version
# unchanged no change in the public API
# additive additions only (nothing removed or modified)
# breaking break: element removed/modified, or break seen by cargo-semver-checks
# All the detail goes to standard error.
#
# Two combined checks: cargo-semver-checks is the reference for breaks, but it does not
# report plain additions; the text diff of cargo public-api acts as a safety net (any removed
# or modified line = break) and provides the count of additions.
set -euo pipefail
. "$(dirname "$0")/common.sh"
if [ "${API_TRACKED:-yes}" = no ]; then
echo unchanged # no tracked Rust API: the version advances by patch (or RELEASE=x.y.z)
exit 0
fi
require_cargo_tool public-api cargo-public-api
require_cargo_tool semver-checks cargo-semver-checks
# A proc-macro crate has no library target: cargo-semver-checks cannot analyse it.
# Its API (the exported macros) is still tracked by the text diff of cargo public-api; this diff does
# not see a change in the macro's behaviour (rejected inputs, generated code): to be judged by hand.
is_proc_macro() {
"$CARGO" metadata --format-version 1 --no-deps | grep -q '"kind":\["proc-macro"\]'
}
last=$(latest_snapshot)
if [ -z "$last" ]; then
info " No snapshot in $API_DIR/: first tracked version"
echo initial
exit 0
fi
# A snapshot written with other tools (rustc, cargo-public-api) than today's is no longer
# comparable: cargo-semver-checks crashes on another rustdoc format, and the text diff sees
# breaks where only the rendering changed. It is regenerated from the tag of its version (no stamp =
# written before stamps existed, hence unknown).
if [ "$(cat "$API_DIR/$last.stamp" 2>/dev/null || true)" != "$(toolchain_stamp)" ]; then
info " Snapshot $last written with other tools: regenerating from tag version-$last"
regenerate_snapshot "$last" || {
err "✗ cannot regenerate snapshot $last: the comparison would be wrong"
exit 1
}
fi
tmp=$(mktemp -d)
trap 'rm -r "$tmp"' EXIT
info " Reference: API published in version $last"
"$CARGO" public-api -s >"$tmp/current.txt" 2>/dev/null || {
err "✗ cargo public-api failed"
exit 1
}
# `filter_unstable` (common.sh) removes from the cargo public-api text whatever is not the crate's API.
diff_out=$(diff <(filter_unstable "$API_DIR/$last.txt") <(filter_unstable "$tmp/current.txt") || true)
removed=$(printf '%s\n' "$diff_out" | grep -c '^<' || true)
added=$(printf '%s\n' "$diff_out" | grep -c '^>' || true)
# Code 100 = break; 0 = nothing to report; other = tool failure.
set +e
if is_proc_macro; then
info " proc-macro crate: cargo-semver-checks not applicable, text diff only"
rc=0
else
gzip -d -c "$API_DIR/$last.json.gz" >"$tmp/baseline.json"
"$CARGO" semver-checks --baseline-rustdoc "$tmp/baseline.json" --release-type minor >"$tmp/semver.log" 2>&1
rc=$?
fi
set -e
level=unchanged
if [ "$rc" -eq 100 ]; then
level=breaking
warn " Break detected by cargo-semver-checks:"
grep -E '^ +[A-Za-z0-9_]+::|^--- failure' "$tmp/semver.log" >&2 || true
elif [ "$rc" -ne 0 ]; then
err "✗ cargo-semver-checks failed (code $rc):"
tail -n 15 "$tmp/semver.log" >&2
exit 1
fi
if [ "$removed" -gt 0 ]; then
level=breaking
warn " $removed API line(s) removed or modified compared to $last:"
printf '%s\n' "$diff_out" | grep '^<' >&2
fi
if [ "$level" = unchanged ] && [ "$added" -gt 0 ]; then
level=additive
fi
info " API: +$added / -$removed lines; verdict: $level"
echo "$level"
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Records the public API of the current version:
# $API_DIR/<version>.txt readable, diffable list (cargo public-api)
# $API_DIR/<version>.json.gz compressed rustdoc JSON, reference of cargo-semver-checks
# $API_DIR/<version>.stamp rustc and cargo-public-api used (api-level regenerates if they change)
set -euo pipefail
. "$(dirname "$0")/common.sh"
if [ "${API_TRACKED:-yes}" = no ]; then
info " (kind ${CRATE_KIND:-crate}: no Rust API to record)"
exit 0
fi
require_cargo_tool public-api cargo-public-api
version=$(current_version)
name=$(crate_name)
warn "→ Public API snapshot of $name $version..."
emit_snapshot "$version" "$API_DIR"
ok "✓ $API_DIR/$version.txt and $API_DIR/$version.json.gz written"
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Checks that the local `main` bookmark tracks `main@origin` (read-only). Without this tracking, jj refuses
# to push main ("Non-tracking remote bookmark"), and jjrelease would fail at the very end,
# after the tests and the version bump: this check detects it beforehand.
# Without a jj repository, without a `main` bookmark or without `main@origin`, there is nothing to check: success.
set -euo pipefail
. "$(dirname "$0")/common.sh"
rows=$(jj bookmark list main --all-remotes -T 'remote ++ "|" ++ tracked ++ "\n"' 2>/dev/null) || exit 0
if printf '%s\n' "$rows" | grep -qx 'origin|false'; then
err "✗ main@origin exists but the local main bookmark does not track it: the push of main would be refused"
info " Fix once and for all: jj bookmark track main@origin"
exit 1
fi
-71
View File
@@ -1,71 +0,0 @@
#!/usr/bin/env bash
# Computes and applies the next version according to the public API (see api-level.sh):
# break -> x.y+1.0 while x = 0, otherwise x+1.0.0
# additions -> x.y+1.0 once x >= 1 (SemVer: new feature), x.y.z+1 while x = 0
# otherwise -> x.y.z+1
# RELEASE=x.y.z forces the version. Updates Cargo.toml, version.txt and the dependency
# lines of README.md (`<crate> = "x.y"` or `<crate> = { version = "x.y", ... }`) when they exist.
set -euo pipefail
. "$(dirname "$0")/common.sh"
warn "→ Computing the next version..."
current=$(current_version)
name=$(crate_name)
info " Current version: $current"
IFS=. read -r major minor patch <<<"$current"
if [ -n "${RELEASE:-}" ]; then
new_version="$RELEASE"
else
level=$("$(dirname "$0")/api-level.sh")
case "$level" in
breaking)
if [ "$major" = "0" ]; then
new_version="0.$((minor + 1)).0"
else
new_version="$((major + 1)).0.0"
fi
;;
additive)
if [ "$major" = "0" ]; then
new_version="0.$minor.$((patch + 1))"
else
new_version="$major.$((minor + 1)).0"
fi
;;
initial | unchanged)
new_version="$major.$minor.$((patch + 1))"
;;
*)
err "✗ unexpected API verdict: '$level'"
exit 1
;;
esac
fi
# No silent jump to another version: a break must never be downgraded.
rc=0
"$(dirname "$0")/tag-exists.sh" "$new_version" || rc=$?
case "$rc" in
0)
err "✗ The release version-$new_version already exists (locally or on the server)"
info " Use RELEASE=x.y.z to force another version"
exit 1
;;
1) ;;
*) warn " (remote tags not checked: no jj repository or origin unreachable)" ;;
esac
info " New version: $new_version"
sed -i.bak "s/^version = \"$current\"/version = \"$new_version\"/" "$CARGO_TOML"
rm "$CARGO_TOML.bak"
[ -f version.txt ] && echo "$new_version" >version.txt
if [ -f README.md ]; then
short=$(echo "$new_version" | cut -d. -f1,2)
sed -E -i.bak \
-e "s/^(${name}[[:space:]]*=[[:space:]]*\")[0-9][0-9.]*\"/\1$short\"/" \
-e "s/^(${name}[[:space:]]*=[[:space:]]*\{([^}]*[ ,])?version[[:space:]]*=[[:space:]]*\")[0-9][0-9.]*\"/\1$short\"/" \
README.md
rm README.md.bak
fi
ok "✓ Version $new_version written to $CARGO_TOML (and version.txt, README.md if they exist)"
-266
View File
@@ -1,266 +0,0 @@
#!/usr/bin/env bash
# Functions shared by the kit scripts. To be sourced: `. "$(dirname "$0")/common.sh"`.
#
# Parameters read from the environment (default values below); crate.mk exports
# them, the scripts also remain usable on their own from the root of a crate.
CARGO="${CARGO:-cargo}"
CARGO_TOML="${CARGO_TOML:-Cargo.toml}"
API_DIR="${API_DIR:-api}"
RELEASE_NOTES_DIR="${RELEASE_NOTES_DIR:-ReleaseNotes}"
# Private cargo registry and its sparse index: provided by the organisation overlay (org.mk), empty otherwise.
REGISTRY="${REGISTRY:-}"
REGISTRY_INDEX="${REGISTRY_INDEX:-}"
info() { printf '\033[1;34m%s\033[0m\n' "$*" >&2; }
warn() { printf '\033[1;33m%s\033[0m\n' "$*" >&2; }
ok() { printf '\033[0;32m%s\033[0m\n' "$*" >&2; }
err() { printf '\033[0;31m%s\033[0m\n' "$*" >&2; }
# API call: `forge_call <operation> <curl args…>`. Returns the response body on standard output;
# on an HTTP response ≥ 400 (or a transport failure), states the operation, the code and the body on standard
# error and returns 1. Replaces `curl -sf`, which fails silently (code 22).
forge_call() {
local operation="$1" body code
shift
body=$(mktemp)
code=$(curl -s -o "$body" -w '%{http_code}' "$@") || code="000"
if [ "$code" -ge 400 ] || [ "$code" = "000" ]; then
err "✗ $operation : HTTP $code : $(head -c 500 "$body")"
rm -f "$body"
return 1
fi
cat "$body"
rm -f "$body"
}
# Directory of the forge tokens of a workstation: `secrets/` of the cluster, i.e. next to the repositories
# (the parent of the current repository), outside every repository. FORGE_SECRETS_DIR overrides it.
forge_secrets_dir() {
if [ -n "${FORGE_SECRETS_DIR:-}" ]; then
printf '%s' "$FORGE_SECRETS_DIR"
return 0
fi
local root
root=$(jj root 2>/dev/null) || root=$(pwd)
printf '%s/secrets' "$(dirname "$root")"
}
# "host owner repo" of a git or registry URL: ssh://git@host[:port]/owner/repo.git, git@host:owner/repo.git,
# https://host/owner/repo, sparse+https://host/api/packages/owner/cargo/ (owner of the registry, no repo).
# Fails if the URL has no known form. Fields are empty when absent.
forge_parse_url() {
local u="${1#sparse+}" host path owner repo
case "$u" in
*://*) u="${u#*://}"; u="${u#*@}"; host="${u%%/*}"; path="${u#*/}" ;;
*@*:*) u="${u#*@}"; host="${u%%:*}"; path="${u#*:}" ;;
*) return 1 ;;
esac
[ "$path" = "$u" ] && path=""
host="${host%%:*}"
path="${path%/}"; path="${path%.git}"
case "$path" in
api/packages/*) owner="${path#api/packages/}"; owner="${owner%%/*}"; repo="" ;;
*) owner="${path%%/*}"; repo="${path#*/}"; [ "$repo" = "$path" ] && repo="" ;;
esac
[ -n "$host" ] || return 1
printf '%s %s %s\n' "$host" "$owner" "$repo"
}
# Forge token. `forge_token [url]`: the forge is that of the URL (registry index, repository), by default that of
# the `origin` remote. Order, the first that exists wins:
# 1. $FORGETOKEN: the CI, where each forge provides its own secret to its own jobs;
# 2. the token files of the cluster, most specific first (one line, mode 0600; see forge_secrets_dir):
# <secrets>/<host>/<owner>/<repo>.token, <secrets>/<host>/<owner>.token, <secrets>/<host>.token;
# 3. the file $FORGE_TOKEN_FILE (former single-token layout).
# Nothing on standard output if there is none; the caller then says where to put it. Never displayed.
forge_token() {
if [ -n "${FORGETOKEN:-}" ]; then
printf '%s' "$FORGETOKEN"
return 0
fi
local url="${1:-}" host owner repo dir f
[ -n "$url" ] || url=$(jj git remote list 2>/dev/null | awk '$1=="origin"{print $2; exit}')
if [ -n "$url" ] && read -r host owner repo < <(forge_parse_url "$url"); then
dir=$(forge_secrets_dir)
for f in ${repo:+"$dir/$host/$owner/$repo.token"} ${owner:+"$dir/$host/$owner.token"} "$dir/$host.token"; do
if [ -f "$f" ]; then
head -n 1 "$f" | tr -d '[:space:]'
return 0
fi
done
fi
if [ -n "${FORGE_TOKEN_FILE:-}" ] && [ -f "$FORGE_TOKEN_FILE" ]; then
head -n 1 "$FORGE_TOKEN_FILE" | tr -d '[:space:]'
fi
return 0
}
# cargo authentication against the private registry: CARGO_REGISTRIES_<REGISTRY>_TOKEN ("Bearer <token>"),
# built from the forge token if not already defined. Needed by any cargo call that
# resolves registry dependencies (publish, wiki doc). For crates.io (REGISTRY = crates-io) nothing
# is built: the crates.io token is CARGO_REGISTRY_TOKEN, supplied by the user.
if [ -n "$REGISTRY" ] && [ "$REGISTRY" != crates-io ]; then
reg_var="CARGO_REGISTRIES_$(printf '%s' "$REGISTRY" | tr 'a-z-' 'A-Z_')_TOKEN"
if [ -z "${!reg_var:-}" ] && [ -n "$(forge_token "$REGISTRY_INDEX")" ]; then
export "$reg_var=Bearer $(forge_token "$REGISTRY_INDEX")"
fi
fi
# Version: content of $VERSION_FILE if set (repositories that are not crates, like
# crate-kit itself), otherwise first occurrence in the crate's Cargo.toml.
current_version() {
# Source of the version: VERSION_FILE (exported by the Makefiles of the kits), else the Cargo.toml of a crate.
# Without either (script run by hand at the root of a kit, not through make): kit/VERSION (crate-kit) or
# overlay/kit/VERSION (extension kit), if present.
local file="${VERSION_FILE:-}" candidate
if [ -z "$file" ] && [ ! -f "$CARGO_TOML" ]; then
for candidate in kit/VERSION overlay/kit/VERSION; do
[ -f "$candidate" ] && { file="$candidate"; break; }
done
fi
if [ -n "$file" ]; then
head -n 1 "$file"
elif [ -f "$CARGO_TOML" ]; then
sed -n 's/^version = "\(.*\)"/\1/p' "$CARGO_TOML" | head -n 1
else
err "✗ no source for the version: no VERSION_FILE, no $CARGO_TOML, no kit/VERSION nor overlay/kit/VERSION here"
return 1
fi
}
# Package name: first occurrence in the crate's Cargo.toml.
# Abandons the empty commits without a description between trunk() and @ (excluding @ itself): jj refuses to
# push a commit without a description, and these carry nothing (leftovers of `jj new`). Descendants
# are rebased automatically; neither work nor an already pushed (immutable) commit is touched.
abandon_blank_commits() {
jj abandon 'trunk()..@ & mutable() & empty() & description(exact:"") ~ @' >/dev/null 2>&1 || true
}
# The commit to publish: @, unless it is empty and without a description (the working commit that `jj new`
# leaves after a release or a push); we then go up to the first ancestor that carries work.
# Such a commit is not pushed (jj refuses a commit without a description) and deserves neither tag nor main.
release_rev() {
local rev='@' blank
while :; do
blank=$(jj log -r "$rev" --no-graph -T 'if(empty && description == "", "1", "0")')
[ "$blank" = 1 ] || break
rev="$rev-"
done
echo "$rev"
}
crate_name() { sed -n 's/^name = "\(.*\)"/\1/p' "$CARGO_TOML" | head -n 1; }
# Last version having an API snapshot (sorted by version number), empty if there is none.
latest_snapshot() {
ls "$API_DIR"/*.json.gz 2>/dev/null | sed 's|.*/||; s|\.json\.gz$||' | sort -V | tail -n 1 || true
}
# Fingerprint of the tools that produce a snapshot. The rustdoc JSON (format number) and the text
# rendering of cargo public-api change with rustc and cargo-public-api: a snapshot written with other
# tools than today's is no longer comparable (cargo-semver-checks crashes, or the text diff
# announces a break where only the rendering changed).
toolchain_stamp() {
printf '%s | %s\n' "$(rustc -V)" "$("$CARGO" public-api --version)"
}
# Writes the snapshot of version <version> of the code in the current directory (root of a
# crate), into <api_dir>: <version>.txt, <version>.json.gz and <version>.stamp (toolchain_stamp).
# Parameters: version, snapshot directory (absolute if the current directory is not the crate).
emit_snapshot() {
local version="$1" api_dir="$2" name target_dir
name=$(crate_name)
mkdir -p "$api_dir"
# -s: without the blanket implementations (`impl<T> Into<U> for Type`…), added by rustc to
# every public type and unrelated to its API (they made up half of the file).
"$CARGO" public-api -s >"$api_dir/$version.txt"
# The rustdoc JSON is unstable; RUSTC_BOOTSTRAP makes it possible to produce it with the stable toolchain,
# the same one cargo-semver-checks uses to build the current state.
# --document-private-items: cargo-semver-checks builds the current state with private items
# (private fields included); a reference without them makes a struct with a private field look like
# it "gains a private field" and gives a break wrongly.
RUSTC_BOOTSTRAP=1 "$CARGO" rustdoc --lib -q -- -Zunstable-options --output-format json --document-private-items
target_dir=$("$CARGO" metadata --format-version 1 --no-deps |
sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p')
# Compressed (gzip -n: reproducible output): the JSON exceeds 1 MB, jj's limit for a new file.
gzip -9 -n -c "$target_dir/doc/${name//-/_}.json" >"$api_dir/$version.json.gz"
toolchain_stamp >"$api_dir/$version.stamp"
}
# Regenerates the snapshot of the published version <version> with the current tools, from the code of
# its tag `version-<version>` (read-only: `jj file list/show`, no modification of the repository).
# The tag is exported into a sibling folder of the crate (`<crate>.baseline.tmp`): the relative paths
# of `.cargo/config.toml` (`[patch.<registry>]` towards the neighbours) remain valid there. Only `.cargo/` (ignored
# by the repository, generated by `make`) is copied in addition.
regenerate_snapshot() {
local version="$1" api_dir root tmp rev="version-$1" f
api_dir="$(pwd)/$API_DIR"
root="$(pwd)"
tmp="$root.baseline.tmp"
if ! jj file list -r "$rev" >/dev/null 2>&1; then
err "✗ tag $rev not found: cannot regenerate the snapshot of $version"
return 1
fi
rm -rf "$tmp"
mkdir -p "$tmp"
while IFS= read -r f; do
mkdir -p "$tmp/$(dirname "$f")"
jj file show -r "$rev" "$f" >"$tmp/$f"
done < <(jj file list -r "$rev")
[ -d "$root/.cargo" ] && cp -R "$root/.cargo" "$tmp/.cargo"
(
cd "$tmp"
CARGO_TARGET_DIR="$tmp/target" emit_snapshot "$version" "$api_dir"
) || { rm -rf "$tmp"; return 1; }
rm -rf "$tmp"
}
# Fails with an installation message if a cargo tool is missing.
require_cargo_tool() {
local sub="$1" crate="$2"
if ! command -v "cargo-$sub" >/dev/null 2>&1; then
err "✗ cargo-$sub is required: cargo install $crate --locked"
exit 1
fi
}
# Lines that are not the crate's API and that the text diff must not see:
# - `impl core::marker::Freeze`: unstable auto trait, invisible on stable; it appears or
# disappears as soon as a field goes under `Mutex`/`Atomic*`, with no effect for a caller;
# - the blanket implementations (`impl<T> other_crate::Trait for Type`) of traits of OTHER crates
# and their associated items: rustdoc lists them for every trait of the dependency graph, so
# they appear or disappear when a dependency changes (e.g. `crossbeam_epoch::Pointable`,
# `either::IntoEither`), without the crate's API having moved. Those of `core`,
# `alloc`, `std` and of the crate itself are kept.
filter_unstable() {
grep -v '^impl core::marker::Freeze for ' "$1" | awk -v crate="$(crate_name)" '
/^impl</ {
skip = 0
rest = $0
sub(/^impl<[^>]*> /, "", rest)
split(rest, parts, " ")
trait = parts[1]
if (trait !~ /^(core|alloc|std)::/ && index(trait, crate "::") != 1 && match($0, / for [^ ]+/)) {
self = substr($0, RSTART + 5, RLENGTH - 5)
skip = 1
next
}
print
next
}
skip && (index($0, "pub fn " self "::") == 1 || index($0, "pub unsafe fn " self "::") == 1 ||
index($0, "pub type " self "::") == 1 || index($0, "pub const " self "::") == 1) { next }
{ skip = 0; print }
' || true
}
# API text for the release notes: `filter_unstable`, then without the auto traits
# (`Send`, `Sync`, `Unpin`, `UnwindSafe`, `RefUnwindSafe`, `Freeze`, `Forget`, `Move`, `UnsafeUnpin`,
# `StructuralPartialEq`) that cargo public-api lists for every type: a new type adds nine
# lines that drown the API. They remain in the snapshot, hence in the verdict of `make api-level`
# (losing `Send` is a break); only the readable notes omit them.
filter_notes() {
filter_unstable "$1" | grep -v -E '^impl core::(marker::(Forget|Freeze|Move|Send|Sync|Unpin|UnsafeUnpin|StructuralPartialEq)|panic::unwind_safe::(RefUnwindSafe|UnwindSafe)) for ' || true
}
-191
View File
@@ -1,191 +0,0 @@
#!/usr/bin/env bash
# Freshness of the EXTERNAL dependencies (crates.io) declared by the project. `cargo outdated` compares the
# Cargo.lock version to the latest published one, but not the requirement written in Cargo.toml: a
# requirement `os_info = "3.8"` with a lock up to date at 3.15 goes unnoticed, and a consumer of the
# crate may end up with a version seven minor versions old.
#
# For each direct dependency `name = "x.y"` or `name = { version = "x.y", … }` (excluding `path`, `git`,
# `registry`, `workspace`), in [dependencies], [dev-dependencies], [build-dependencies], their
# `target.*` variants and [workspace.dependencies], it checks:
# 1. the requirement accepts the latest published version (for a 0.x, `0.5` does not accept 0.6);
# 2. for a version ≥ 1, the required minor version is not behind the latest
# (`tokio = "1.35"` while 1.52 exists). A 0.x is not checked at this level: its
# patch number does not count;
# 3. Cargo.lock is on the latest version that the requirement accepts.
# Requirements that are not written `x`, `x.y` or `x.y.z` (`=1.2.3`, `~1.2`, `>=1`, ranges) are
# explicit choices: ignored.
#
# deps-check-external.sh check (read-only, except for the network)
# deps-check-external.sh bump raises the outdated requirements then `cargo update -p`
#
# Variables: DEPS_CHECK_EXTERNAL=0 disables the check (workspace too large to be kept up
# to date all at once); DEPS_CHECK_EXTERNAL_IGNORE="crate1 crate2" sets crates aside (to be justified in
# the Makefile: for example a public dependency that must move up with the neighbouring crates); CRATES_IO_INDEX (default https://index.crates.io); DEPS_CHECK_OFFLINE=1 ignores
# the absence of network (warning).
# shellcheck disable=SC2154 # manifests comes from deps-lib.sh
set -euo pipefail
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/deps-lib.sh"
mode="${1:-check}"
case "$mode" in check | bump) ;; *)
err "usage: deps-check-external.sh [check|bump]"
exit 2
;;
esac
if [ "${DEPS_CHECK_EXTERNAL:-1}" = 0 ]; then
info " (external dependencies: check disabled by DEPS_CHECK_EXTERNAL=0)"
exit 0
fi
[ -f "$CARGO_TOML" ] || exit 0
crates_index="${CRATES_IO_INDEX:-https://index.crates.io}"
crates_index="${crates_index%/}"
fail=0
bad() {
err " ✗ $*"
fail=1
}
# External declarations of a manifest: "key<TAB>crate<TAB>requirement" (the crate differs from the key
# when the dependency is renamed by `package = "…"`).
declarations() {
awk '
/^\[/ { dep = ($0 ~ /^\[(workspace\.|target\..*\.)?(dev-|build-)?dependencies\]$/); next }
!dep { next }
/^[ \t]*#/ { next }
{
if (match($0, /^[A-Za-z0-9_-]+[ \t]*=/) == 0) next
key = $0; sub(/[ \t]*=.*/, "", key)
rest = $0; sub(/^[A-Za-z0-9_-]+[ \t]*=[ \t]*/, "", rest)
crate = key
if (rest ~ /^"/) {
req = rest; sub(/^"/, "", req); sub(/".*/, "", req)
} else if (rest ~ /^\{/) {
if (rest ~ /(path|git|registry|workspace)[ \t]*=/) next
if (match(rest, /version[ \t]*=[ \t]*"[^"]*"/) == 0) next
req = substr(rest, RSTART, RLENGTH)
sub(/^version[ \t]*=[ \t]*"/, "", req); sub(/"$/, "", req)
if (match(rest, /package[ \t]*=[ \t]*"[^"]*"/)) {
crate = substr(rest, RSTART, RLENGTH)
sub(/^package[ \t]*=[ \t]*"/, "", crate); sub(/"$/, "", crate)
}
} else next
print key "\t" crate "\t" req
}
' "$1"
}
# Replaces the requirement of the dependency `key` (in a dependencies section) of manifest $1 with $3.
rewrite_req() {
awk -v n="$2" -v r="$3" '
/^\[/ { dep = ($0 ~ /dependencies\]$/) }
dep && $0 ~ "^" n "[ \t]*=" {
if ($0 ~ /\{/) sub(/version[ \t]*=[ \t]*"[^"]*"/, "version = \"" r "\"")
else sub(/"[^"]*"/, "\"" r "\"")
}
{ print }
' "$1" >"$1.tmp" && mv "$1.tmp" "$1"
}
# Requirement to write for version $1: x.y (≥ 1) or 0.y.
floor_for() { echo "$1" | cut -d. -f1,2; }
tmp=$(mktemp -d)
trap 'rm -r "$tmp"' EXIT
info "→ Freshness of the external dependencies (crates.io)..."
count=0
offline=0
updates=""
for manifest in "${manifests[@]}"; do
while IFS=$'\t' read -r key crate req; do
[ -n "$crate" ] || continue
# Dependency deliberately set aside (DEPS_CHECK_EXTERNAL_IGNORE, with its reason in the Makefile).
case " ${DEPS_CHECK_EXTERNAL_IGNORE:-} " in *" $crate "*) continue ;; esac
# Explicit requirement (=, ~, >=, range): a choice, not checked (and no network request).
case "${req#^}" in '' | *[!0-9.]*) continue ;; esac
count=$((count + 1))
if [ ! -f "$tmp/$crate" ]; then
rc=0
found=$(latest_published "$crate" "$crates_index") || rc=$?
printf '%s %s\n' "$rc" "$found" >"$tmp/$crate"
fi
read -r rc latest <"$tmp/$crate"
if [ "$rc" -eq 2 ]; then
offline=1
continue
fi
if [ "$rc" -eq 1 ] || [ -z "$latest" ]; then
warn " ⚠ $crate ($manifest): not found on crates.io, not checked"
continue
fi
acc=0
req_accepts "$req" "$latest" || acc=$?
if [ "$acc" -eq 1 ]; then
# Newer than the latest published (pre-release, yank): nothing to raise.
[ "$(printf '%s\n%s\n' "$req" "$latest" | sort -V | tail -n 1)" = "$latest" ] || continue
if [ "$mode" = bump ]; then
new=$(floor_for "$latest")
rewrite_req "$manifest" "$key" "$new"
info " $crate ($manifest): \"$req\" → \"$new\" (latest version: $latest)"
updates+="$crate@$latest "
else
bad "$crate ($manifest): the requirement \"$req\" does not accept the latest version $latest → \"$(floor_for "$latest")\" (make deps-bump)"
fi
continue
fi
# The requirement accepts the latest version: is the required minor (≥ 1.0) behind?
IFS=. read -r rmaj rmin _ <<<"${req#^}"
IFS=. read -r _ lmin _ <<<"$latest"
if [ "$rmaj" != 0 ] && [ -n "$rmin" ] && [ "$rmin" -lt "$lmin" ]; then
if [ "$mode" = bump ]; then
new=$(floor_for "$latest")
rewrite_req "$manifest" "$key" "$new"
info " $crate ($manifest): \"$req\" → \"$new\" (latest version: $latest)"
updates+="$crate@$latest "
else
bad "$crate ($manifest): the requirement \"$req\" is behind the latest version $latest → \"$(floor_for "$latest")\" (make deps-bump)"
fi
fi
# Cargo.lock: on the latest version that the requirement accepts.
if [ -f "$LOCKFILE" ]; then
locked=$(lock_entries | awk -v n="$crate" '$1 == n && index($3, "crates.io-index") { print $2 }' | sort -V | tail -n 1)
if [ -n "$locked" ] && [ "$locked" != "$latest" ] &&
[ "$(printf '%s\n%s\n' "$locked" "$latest" | sort -V | tail -n 1)" = "$latest" ]; then
if [ "$mode" = bump ]; then
updates+="$crate@$latest "
else
bad "$crate: $LOCKFILE is on $locked, the latest version is $latest → cargo update $(lock_update_args "$crate" "$latest" crates.io-index) (make deps-bump)"
fi
fi
fi
done < <(declarations "$manifest")
done
if [ "$offline" -eq 1 ]; then
if [ "${DEPS_CHECK_OFFLINE:-}" = 1 ]; then
warn " ⚠ crates.io unreachable: freshness of the external dependencies not verified (DEPS_CHECK_OFFLINE=1)"
else
bad "crates.io unreachable ($crates_index): freshness cannot be verified (DEPS_CHECK_OFFLINE=1 to ignore)"
fi
fi
if [ "$mode" = bump ] && [ -n "$updates" ]; then
# shellcheck disable=SC2086 # list of words
lock_update crates.io-index $updates
fi
if [ "$fail" -ne 0 ]; then
err "✗ External dependencies out of date (see above)"
exit 1
fi
ok "✓ External dependencies up to date ($count checked)"
-164
View File
@@ -1,164 +0,0 @@
#!/usr/bin/env bash
# Freshness of the dependencies between crates of the private registry: we must never keep running with an
# old version of a registry crate when a new one is published. Fails (code 1) at the slightest discrepancy.
#
# For each dependency `name = { version = "x.y", registry = "<registry>" }` declared by the project
# (same reading as dev-patch.sh), it checks:
# 1. the requirement accepts the latest version published on the registry (for a 0.x, `0.1` never
# accepts 0.2: Cargo says nothing);
# 2. Cargo.lock is on that latest version (if it points to the registry);
# 3. the neighbouring folder ../<name>, which replaces the dependency in joint development, is not
# behind the registry (otherwise we build against stale code);
# 4. Cargo.lock contains no [[patch.unused]] (ignored local patch: requirement too low);
# 5. no registry crate appears in several versions in Cargo.lock (two copies in the build).
# A neighbour newer than the registry (pending publication) is reported without failing.
#
# deps-check.sh check (read-only, except for the network)
# deps-check.sh bump fixes the outdated requirements (rewrites the Cargo.toml) then `cargo update -p`
#
# Network: the sparse index of the registry ($REGISTRY_INDEX), public. Without network, the check
# fails; DEPS_CHECK_OFFLINE=1 explicitly ignores it (warning).
# shellcheck disable=SC2154 # index_url and manifests come from deps-lib.sh
set -euo pipefail
. "$(dirname "$0")/common.sh"
[ -n "$REGISTRY" ] || { err "✗ no registry: declare the kit extension (KIT_OVERLAY in the Makefile, org.mk) or set REGISTRY = crates-io"; exit 1; }
[ "$REGISTRY" != crates-io ] || { info " (crates.io registry: dependencies checked by deps-check-external)"; exit 0; }
mode="${1:-check}"
case "$mode" in check | bump) ;; *)
err "usage: deps-check.sh [check|bump]"
exit 2
;;
esac
[ -f "$CARGO_TOML" ] || exit 0
fail=0
bad() {
err " ✗ $*"
fail=1
}
. "$(dirname "$0")/deps-lib.sh"
decl=""
for m in "${manifests[@]}"; do
lines=$(grep -E "^[A-Za-z0-9_-]+[[:space:]]*=[[:space:]]*\{[^}]*registry[[:space:]]*=[[:space:]]*\"$REGISTRY\"" "$m" || true)
[ -n "$lines" ] && decl+="$(printf '%s\n' "$lines" | sed "s|^|$m |")"$'\n'
done
if [ -z "$decl" ]; then
ok "✓ No dependency on registry $REGISTRY to check"
exit 0
fi
info "→ Freshness of the registry dependencies (registry $REGISTRY)..."
count=0
updates=""
offline=0
while IFS=$'\t' read -r manifest line; do
[ -n "$manifest" ] || continue
name=${line%%[[:space:]=]*}
req=$(printf '%s' "$line" | sed -nE 's/.*version[[:space:]]*=[[:space:]]*"([^"]*)".*/\1/p')
count=$((count + 1))
if [ -z "$req" ]; then
bad "$name ($manifest): no \"version\" in the declaration"
continue
fi
rc=0
latest=$(latest_published "$name") || rc=$?
if [ "$rc" -eq 2 ]; then
offline=1
continue
fi
if [ "$rc" -eq 1 ] || [ -z "$latest" ]; then
bad "$name ($manifest): no version published on registry $REGISTRY"
continue
fi
acc=0
req_accepts "$req" "$latest" || acc=$?
case "$acc" in
2) bad "$name ($manifest): requirement \"$req\" cannot be parsed (write x.y, or x for a version ≥ 1)" ;;
1)
if [ "$(printf '%s\n%s\n' "$req" "$latest" | sort -V | tail -n 1)" = "$latest" ]; then
if [ "$mode" = bump ]; then
new=$(req_for "$latest")
sed -E "/^${name}[[:space:]]*=.*registry[[:space:]]*=[[:space:]]*\"$REGISTRY\"/ s/(version[[:space:]]*=[[:space:]]*\")[^\"]*/\1$new/" "$manifest" >"$manifest.tmp" &&
mv "$manifest.tmp" "$manifest"
info " $name ($manifest): \"$req\" → \"$new\" (latest published version: $latest)"
updates+="$name@$latest "
else
bad "$name ($manifest): the requirement \"$req\" does not accept the latest published version $latest → $name = { version = \"$(req_for "$latest")\", registry = \"$REGISTRY\" } (make deps-bump)"
fi
else
bad "$name ($manifest): the requirement \"$req\" is newer than the latest published version $latest (publication pending?)"
fi
;;
esac
# Cargo.lock: on the latest version if the dependency comes from the registry.
if [ -f "$LOCKFILE" ]; then
locked=$(lock_entries | awk -v n="$name" -v r="/api/packages/$REGISTRY/" '$1 == n && index($3, r) { print $2 }' | sort -V | tail -n 1)
if [ -n "$locked" ] && [ "$locked" != "$latest" ] && [ "$acc" -eq 0 ]; then
if [ "$mode" = bump ]; then
updates+="$name@$latest "
else
bad "$name: $LOCKFILE is on $locked, the latest published version is $latest → cargo update $(lock_update_args "$name" "$latest" "/api/packages/$REGISTRY/") (make deps-bump)"
fi
fi
fi
# Neighbouring folder: replaces the dependency in joint development.
if [ -f "../$name/Cargo.toml" ]; then
neighbor=$(sed -n 's/^version = "\(.*\)"/\1/p' "../$name/Cargo.toml" | head -n 1)
if [ -n "$neighbor" ] && [ "$neighbor" != "$latest" ]; then
if [ "$(printf '%s\n%s\n' "$neighbor" "$latest" | sort -V | tail -n 1)" = "$latest" ]; then
bad "$name: the neighbouring folder ../$name is at $neighbor, the registry at $latest → update the neighbour (jj git fetch)"
else
warn " ⚠ $name: the neighbouring folder ../$name ($neighbor) is newer than the published version ($latest): publication pending"
fi
fi
fi
done <<<"$decl"
if [ "$offline" -eq 1 ]; then
if [ "${DEPS_CHECK_OFFLINE:-}" = 1 ]; then
warn " ⚠ registry unreachable: freshness of the dependencies not verified (DEPS_CHECK_OFFLINE=1)"
else
bad "registry $REGISTRY unreachable ($index_url): freshness cannot be verified (DEPS_CHECK_OFFLINE=1 to ignore)"
fi
fi
# Cargo.lock: ignored patch and duplicates.
if [ -f "$LOCKFILE" ]; then
unused=$(awk '
/^\[\[patch.unused\]\]/ { u = 1; next }
/^\[/ { u = 0 }
u && /^name = / { gsub(/"/, "", $3); print $3 }
' "$LOCKFILE" | sort -u | paste -sd' ' -)
if [ -n "$unused" ] && [ "$mode" = check ]; then
bad "$LOCKFILE: local patch ignored for $unused — the project's requirement does not accept the version of the neighbouring folder"
fi
dups=$(lock_entries | awk -v r="/api/packages/$REGISTRY/" '
{ c[$1]++; vs[$1] = vs[$1] " " $2; if ($3 == "-" || index($3, r)) p[$1] = 1 }
END { for (n in c) if (c[n] > 1 && p[n]) print n ":" vs[n] }
')
if [ -n "$dups" ]; then
while IFS= read -r d; do
bad "$LOCKFILE: several versions of ${d%%:*} in the build (${d#*: }) — align the requirements of the crates that depend on it"
done <<<"$dups"
fi
fi
if [ "$mode" = bump ] && [ -n "$updates" ]; then
# shellcheck disable=SC2086 # list of words
lock_update "/api/packages/$REGISTRY/" $updates
fi
if [ "$fail" -ne 0 ]; then
err "✗ Registry dependencies stale or inconsistent (see above)"
exit 1
fi
ok "✓ Registry dependencies up to date ($count checked)"
-123
View File
@@ -1,123 +0,0 @@
#!/usr/bin/env bash
# Functions shared by the dependency checks (deps-check.sh, deps-check-external.sh).
# To be sourced after common.sh. Only lock_update writes a file (Cargo.lock, through cargo).
index_url="${REGISTRY_INDEX#sparse+}"
index_url="${index_url%/}"
# Path of a crate in a sparse index (1, 2, 3 characters, then two pairs).
index_path() {
local n
n=$(printf '%s' "$1" | tr 'A-Z' 'a-z')
case ${#n} in
1) echo "1/$n" ;;
2) echo "2/$n" ;;
3) echo "3/${n:0:1}/$n" ;;
*) echo "${n:0:2}/${n:2:2}/$n" ;;
esac
}
# Latest published version (not yanked, excluding pre-releases) of $1 in the sparse index $2 (default:
# the private registry); empty if not found.
# Code: 0 found, 1 absent from the index, 2 index unreachable.
latest_published() {
local body rc=0 base="${2:-$index_url}"
body=$(curl -sS -f -m 20 "$base/$(index_path "$1")" 2>/dev/null) || rc=$?
if [ "$rc" -ne 0 ]; then
case "$rc" in 22 | 37) return 1 ;; *) return 2 ;; esac
fi
printf '%s\n' "$body" |
sed -n 's/.*"vers":"\([^"]*\)".*"yanked":false.*/\1/p' |
grep -v -- '-' | sort -V | tail -n 1
}
# Does the requirement $1 (x, x.y or x.y.z, with optional ^) accept version $2?
# Code: 0 yes, 1 no, 2 unsupported form.
req_accepts() {
local r="${1#^}" v="$2" rmaj rmin rest vmaj vmin
case "$r" in '' | *[!0-9.]*) return 2 ;; esac
IFS=. read -r rmaj rmin rest <<<"$r"
IFS=. read -r vmaj vmin rest <<<"$v"
[ "$rmaj" = "$vmaj" ] || return 1
if [ "$rmaj" = 0 ] && [ -n "$rmin" ]; then
[ "$rmin" = "$vmin" ] || return 1
fi
return 0
}
# Minimal requirement that accepts version $1: x.y for a 0.x, x otherwise.
req_for() {
case "$1" in
0.*) echo "$1" | cut -d. -f1,2 ;;
*) echo "$1" | cut -d. -f1 ;;
esac
}
# Cargo.lock of the project and the cargo option that designates its workspace. The workspace is the
# root, unless MEMBERS_DIR holds it (a Cargo.toml with a [workspace] table).
LOCKFILE=Cargo.lock
workspace_args=""
if [ -n "${MEMBERS_DIR:-}" ] && grep -q '^\[workspace[].]' "$MEMBERS_DIR/Cargo.toml" 2>/dev/null; then
LOCKFILE="$MEMBERS_DIR/Cargo.lock"
workspace_args="--manifest-path $MEMBERS_DIR/Cargo.toml "
fi
# Packages of Cargo.lock, one per line: "name version source" ("-" without source). The
# [[patch.unused]] blocks are excluded.
lock_entries() {
awk '
function flush() { if (n != "") print n, v, (s == "" ? "-" : s); n = v = s = "" }
/^\[\[package\]\]/ { flush(); inpkg = 1; next }
/^\[/ { flush(); inpkg = 0; next }
inpkg && /^name = / { gsub(/"/, "", $3); n = $3 }
inpkg && /^version = / { gsub(/"/, "", $3); v = $3 }
inpkg && /^source = / { gsub(/"/, "", $3); s = $3 }
END { flush() }
' "$LOCKFILE"
}
# Semver-compatible series of version $1: x (≥ 1), 0.y, or 0.0.z itself.
series() {
case "$1" in
0.0.*) echo "$1" ;;
0.*) echo "$1" | cut -d. -f1,2 ;;
*) echo "$1" | cut -d. -f1 ;;
esac
}
# Arguments of `cargo update` that move crate $1, taken from the sources containing $3, to its latest
# version $2. When Cargo.lock holds several versions of the crate, the bare name is ambiguous: the one
# of the series of $2 is named. If there is none (the requirement has just been raised to a new
# series), `--workspace` makes cargo resolve the new requirement.
lock_update_args() {
local count=0 v old=""
[ -f "$LOCKFILE" ] && count=$(lock_entries | awk -v n="$1" '$1 == n' | wc -l)
if [ "$count" -le 1 ]; then
echo "$workspace_args-p $1"
return
fi
for v in $(lock_entries | awk -v n="$1" -v s="$3" '$1 == n && index($3, s) { print $2 }'); do
[ "$(series "$v")" = "$(series "$2")" ] && old="$v"
done
if [ -n "$old" ]; then echo "$workspace_args-p $1@$old"; else echo "$workspace_args--workspace"; fi
}
# Runs the `cargo update` of each "crate@latest" of $2…, taken from the sources containing $1.
lock_update() {
local source="$1" u args
shift
for u in $(printf '%s\n' "$@" | sort -u); do
args=$(lock_update_args "${u%@*}" "${u#*@}" "$source")
info " cargo update $args"
# shellcheck disable=SC2086 # list of words, without spaces inside
"$CARGO" update $args >/dev/null
done
}
manifests=("$CARGO_TOML")
# Root of a workspace whose member CARGO_TOML designates (workspace): shared dependencies.
[ "$CARGO_TOML" != Cargo.toml ] && [ -f Cargo.toml ] && manifests+=(Cargo.toml)
# MEMBERS_DIR: folder holding the workspace (root Cargo.toml and members) when it is not the project root.
for m in */Cargo.toml ${MEMBERS_DIR:+"$MEMBERS_DIR/Cargo.toml" "$MEMBERS_DIR"/*/Cargo.toml}; do
if [ -f "$m" ] && [ "$m" != "$CARGO_TOML" ]; then manifests+=("$m"); fi
done
-75
View File
@@ -1,75 +0,0 @@
#!/usr/bin/env bash
# Generates .cargo/config.toml (local, ignored by jj) for joint development:
# - the definition of the private registry;
# - a [patch.<registry>] for each registry dependency that has a neighbouring folder
# (../<name>/Cargo.toml), so that the project builds against the neighbouring code without publishing.
# Only the dependencies actually declared by this project are patched: no unused patch
# (Cargo complains about it), whatever the number of crates coming out of a workspace.
#
# Run by crate.mk on every make invocation. The file is rewritten only if it changes.
# Reads the root Cargo.toml and those of the direct subfolders (workspace members), and, if MEMBERS_DIR is set,
# those of that folder (its Cargo.toml and its direct subfolders);
# only the dependencies on one line `name = { …, registry = "<registry>" }` are seen.
# A .cargo/config.toml that was not generated by this script is never overwritten (warning).
set -euo pipefail
. "$(dirname "$0")/common.sh"
[ -f "$CARGO_TOML" ] || exit 0
# Nothing to generate without a registry (no extension) nor for crates.io (cargo's default index and token).
[ -n "$REGISTRY" ] && [ "$REGISTRY" != crates-io ] || exit 0
marker="# Generated by .crate-kit/scripts/dev-patch.sh"
config=".cargo/config.toml"
if [ -f "$config" ] && ! grep -q "^$marker" "$config"; then
warn "⚠ $config was not generated by the kit: left as is. If it is tracked by the repository,"
warn " delete it and add /.cargo/config.toml to .gitignore (the CI uses an environment variable)."
exit 0
fi
self=$(crate_name)
manifests=("$CARGO_TOML")
# Root of a workspace whose member CARGO_TOML designates (workspace): this is where the shared
# dependencies ([workspace.dependencies]) are declared.
[ "$CARGO_TOML" != Cargo.toml ] && [ -f Cargo.toml ] && manifests+=(Cargo.toml)
# MEMBERS_DIR: folder holding the workspace (root Cargo.toml and members), when it is not the project root
# (application workspace with its crates under src/: MEMBERS_DIR := src).
for m in */Cargo.toml ${MEMBERS_DIR:+"$MEMBERS_DIR/Cargo.toml" "$MEMBERS_DIR"/*/Cargo.toml}; do
[ -f "$m" ] && [ "$m" != "$CARGO_TOML" ] && manifests+=("$m")
done
registry_deps() {
sed -nE "s/^([A-Za-z0-9_-]+)[[:space:]]*=[[:space:]]*\{[^}]*registry[[:space:]]*=[[:space:]]*\"$REGISTRY\".*/\1/p" "$@"
}
names=$(registry_deps "${manifests[@]}" | sort -u)
# Transitive closure through the neighbours: a dependency of a patched neighbour (a -> a-macros)
# must be patched too, otherwise the project builds the neighbour against the published version of its own
# dependency and not against the neighbouring code.
while :; do
more=$(for n in $names; do [ -f "../$n/Cargo.toml" ] && registry_deps "../$n/Cargo.toml"; done | sort -u)
merged=$(printf '%s\n%s\n' "$names" "$more" | sed '/^$/d' | sort -u)
[ "$merged" = "$names" ] && break
names=$merged
done
patches=""
for n in $names; do
[ "$n" = "$self" ] && continue
[ -f "../$n/Cargo.toml" ] && patches+="$n = { path = \"../$n\" }"$'\n'
done
new="$marker on every \`make\`: do not edit, do not commit (ignored by the repository).
# Private registry and, for joint development, dependencies resolved to the neighbouring folders.
[registries.$REGISTRY]
index = \"$REGISTRY_INDEX\"
"
[ -n "$patches" ] && new+="
[patch.$REGISTRY]
$patches"
if [ ! -f "$config" ] || [ "$(cat "$config")" != "${new%$'\n'}" ]; then
mkdir -p .cargo
printf '%s' "$new" >"$config"
list=$(printf '%s' "$patches" | sed 's/ = .*//' | paste -sd' ' -)
info " $config updated (local patches: ${list:-none})"
fi
-56
View File
@@ -1,56 +0,0 @@
#!/usr/bin/env bash
# Creates the Forgejo release associated with the tag version-x.y.z. Description: the message of the tag if it is
# annotated, otherwise (lightweight tag created by tag.sh) the file $RELEASE_NOTES_DIR/version-x.y.z.md of the
# working directory, which must be the checkout of the tag. Meant for the CI; idempotent: an already existing release is
# reused, and an attached file that is already present is not sent again.
#
# Variables (provided by the workflow):
# FORGETOKEN Forgejo API token (write access to releases)
# TAG tag to publish (e.g. version-0.1.4)
# SERVER Forgejo server URL (e.g. https://forge.example.org)
# REPO owner/repository (e.g. org/crate)
# ASSET optional: file to attach to the release (e.g. dist/crate-kit-0.1.4.tar.gz)
set -euo pipefail
. "$(dirname "$0")/common.sh"
: "${FORGETOKEN:?FORGETOKEN required}" "${TAG:?TAG required}" "${SERVER:?SERVER required}" "${REPO:?REPO required}"
command -v jq >/dev/null || { err "✗ jq is required"; exit 1; }
api="$SERVER/api/v1/repos/$REPO"
auth="Authorization: token $FORGETOKEN"
if release_json=$(curl -sf -H "$auth" "$api/releases/tags/$TAG"); then
warn " The release $TAG already exists: reused"
else
# Message of the annotated tag (object of type "tag"); empty for a lightweight tag.
ref_json=$(forge_call "reading tag $TAG" -H "$auth" "$api/git/refs/tags/$TAG") || exit 1
obj_sha=$(echo "$ref_json" | jq -r '.[0]?.object.sha // empty')
obj_type=$(echo "$ref_json" | jq -r '.[0]?.object.type // empty')
body=""
if [ "$obj_type" = "tag" ]; then
tag_json=$(forge_call "reading the message of tag $TAG" -H "$auth" "$api/git/tags/$obj_sha") || exit 1
body=$(echo "$tag_json" | jq -r '.message // empty')
fi
# Lightweight tag (tag.sh, jj only): the notes are the file committed in the tagged revision, read in the
# working directory (the workflow runs in the checkout of the tag).
if [ -z "$body" ] && [ -f "$RELEASE_NOTES_DIR/$TAG.md" ]; then
body=$(cat "$RELEASE_NOTES_DIR/$TAG.md")
fi
release_json=$(forge_call "creating release $TAG" -X POST "$api/releases" -H "$auth" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg tag "$TAG" --arg body "$body" '{tag_name: $tag, name: $tag, body: $body}')") || exit 1
ok "✓ Release $TAG created"
fi
if [ -n "${ASSET:-}" ]; then
[ -f "$ASSET" ] || { err "✗ file to attach not found: $ASSET"; exit 1; }
release_id=$(echo "$release_json" | jq -r '.id')
name=$(basename "$ASSET")
if echo "$release_json" | jq -e --arg n "$name" '.assets[]? | select(.name == $n)' >/dev/null; then
warn " $name is already attached to the release: nothing to do"
else
forge_call "uploading $name to release $TAG" -X POST "$api/releases/$release_id/assets?name=$name" \
-H "$auth" -F "attachment=@$ASSET" >/dev/null || exit 1
ok "✓ $name attached to release $TAG"
fi
fi
-74
View File
@@ -1,74 +0,0 @@
#!/usr/bin/env bash
# Fetches the latest commits from origin WITHOUT losing local work: the mutable revisions
# sitting on the old main are rebased on top of the fetched main@origin.
#
# - local work (mutable revisions between main@origin and @, including an empty working
# copy): rebased onto main@origin;
# - work sitting on a pushed revision not yet merged into main@origin (pending
# PR): left in place, with a warning (rebasing it would cut it off from that revision);
# - working copy already contained in main@origin: we start again from a new revision on top of it.
#
# JJ_BASE (default main@origin): the base to join.
set -euo pipefail
. "$(dirname "$0")/common.sh"
base="${JJ_BASE:-main@origin}"
info "→ Fetching the latest commits..."
jj git fetch
jj log -r "$base" --no-graph -T 'change_id' >/dev/null 2>&1 || {
err "✗ $base not found after the fetch"
exit 1
}
# Local work = mutable revisions between the base and @ that are NOT already published (reachable
# from a remote bookmark): we do not rewrite what origin knows. We only keep the roots
# whose parent is already in the base's history.
work="(mutable() & ($base..@)) ~ ::remote_bookmarks()"
# A local revision rewritten AFTER its push (describe, rebase…) then merged on the server side in its
# pushed version has a twin in $base: same change id, other commit, hence a divergent
# change. We never designate a revision by its change id (jj refuses a divergent
# identifier), and we do not rebase what is already merged:
# - same content as the merged twin: the local revision is abandoned (nothing is lost);
# - different content: we stop before rewriting anything, with the course of action to follow.
for c in $(jj log --no-graph -r "($work) & divergent()" -T 'commit_id ++ "\n"'); do
cid=$(jj log --no-graph -r "$c" -T 'change_id')
twin=$(jj log --no-graph -r "change_id($cid) & ::$base" -T 'commit_id ++ "\n"' | head -n 1)
[ -n "$twin" ] || continue
short=$(jj log --no-graph -r "$c" -T 'commit_id.short(12)')
if [ -z "$(jj interdiff --from "$twin" --to "$c" --summary)" ]; then
jj abandon "$c"
ok "✓ Revision $short already merged into $base (same content): abandoned"
else
err "✗ The local revision $short has already been merged into $base in another version"
err " (same change id, different content): nothing was rewritten."
err " See the difference: jj interdiff --from $twin --to $c"
err " Keep the merged version: jj abandon $c"
err " Keep the local version: jj metaedit --update-change-id $c, then rerun"
exit 1
fi
done
roots=$(jj log --no-graph -r "roots($work) & children(::$base)" -T 'commit_id ++ "\n"')
if [ -n "$roots" ]; then
args=()
for r in $roots; do args+=(-s "$r"); done
jj rebase "${args[@]}" -d "$base"
ok "✓ Local work rebased onto $base"
elif [ -n "$(jj log --no-graph -r "@ & ::$base" -T 'change_id')" ]; then
# The working copy is already part of the base: nothing to keep.
jj new "$base"
ok "✓ New revision on $base"
elif [ -n "$(jj log --no-graph -r "($base..@) & (::remote_bookmarks() | immutable())" -T 'change_id')" ]; then
warn "⚠ The work rests on pushed revisions not merged into $base (pending PR):"
warn " left in place. Merge the PR then rerun, if needed."
else
ok "✓ Already up to date on $base"
fi
if [ -n "$(jj log --no-graph -r 'conflicts() & ::@ & mutable()' -T 'change_id' 2>/dev/null)" ]; then
warn "⚠ Conflicts after the rebase: jj st, then jj resolve."
fi
-68
View File
@@ -1,68 +0,0 @@
#!/usr/bin/env bash
# Checks that the crate is adopted: the CI release workflow is installed and up to date with the template of
# its kind (comments and step names ignored; opt out with a `# kit-workflow: custom` line), and the kit copy
# (.crate-kit/) is identical to the reference kit (crate-kit + overlay, assembled by $KIT_SRC/tools/kit-assemble.sh; default ../crate-kit). Read-only.
#
# Compares the CONTENT, not VERSION: a fix to the kit does not always change its number.
# `--fix`: instead of failing on an out-of-date workflow, replace it with the template of its kind.
# Without a crate-kit repository alongside (clone of the crate alone, CI), there is nothing to compare: success.
set -euo pipefail
. "$(dirname "$0")/common.sh"
fix=0
[ "${1:-}" = "--fix" ] && fix=1
kit_dir="$(cd "$(dirname "$0")/.." && pwd)"
crate_dir="$(dirname "$kit_dir")"
# Without this workflow, a version-* tag publishes nothing: the crate was not adopted all the way.
workflow=".gitea/workflows/release.yaml"
if [ ! -f "$crate_dir/$workflow" ]; then
err "✗ $workflow is missing in $crate_dir: the release CI will not trigger"
info " Complete the adoption: crate-kit/adopt.sh [--kind <kind>] $crate_dir"
exit 1
fi
kit_src="${KIT_SRC:-../crate-kit}"
# Workflow up to date with the template of the crate's kind (the same one adopt.sh lays down). Only the
# logic counts: comment lines and `- name:` labels are ignored, so a rewording is not a difference.
if [ -x "$kit_src/tools/kit-assemble.sh" ] && ! grep -q '^# kit-workflow: custom' "$crate_dir/$workflow"; then
kind="${CRATE_KIND:-}"
if [ -z "$kind" ] && [ -f "$crate_dir/Makefile" ]; then
kind=$(sed -n 's/^CRATE_KIND *[:?]*= *\([a-z]*\).*/\1/p' "$crate_dir/Makefile" | head -n 1)
fi
template="$("$kit_src/tools/kit-assemble.sh" --root)/template"
overlay=$("$kit_src/tools/kit-assemble.sh" --overlay 2>/dev/null || true)
[ -n "$kind" ] && [ -n "$overlay" ] && [ -d "$overlay/templates/$kind" ] && template="$overlay/templates/$kind"
norm() { grep -v '^ *#' "$1" | grep -v '^ *- name:' | sed 's/[[:space:]]*$//'; }
if [ -f "$template/$workflow" ] && ! diff <(norm "$crate_dir/$workflow") <(norm "$template/$workflow") >/dev/null; then
if [ "$fix" = 1 ]; then
cp "$template/$workflow" "$crate_dir/$workflow"
ok "→ $workflow replaced with the template of its kind"
else
err "✗ $workflow differs from the template of its kind: the release CI is out of date"
diff <(norm "$crate_dir/$workflow") <(norm "$template/$workflow") >&2 || true
info " Replace it: cp $template/$workflow $crate_dir/$workflow"
info " (keep a deliberate customization by adding the line \"# kit-workflow: custom\" to the workflow)"
exit 1
fi
fi
fi
if [ ! -x "$kit_src/tools/kit-assemble.sh" ]; then
info " (reference kit not found: $kit_src, check skipped)"
exit 0
fi
ref="$(mktemp -d "${TMPDIR:-/tmp}/kit-check.XXXXXX")"
trap 'rm -r "$ref"' EXIT
"$kit_src/tools/kit-assemble.sh" "$ref"
if diff -rq "$ref" "$kit_dir" >/dev/null 2>&1; then
ok "✓ Kit up to date (crate-kit $(cat "$ref/VERSION"))"
exit 0
fi
err "✗ This crate's kit is not the one from $kit_src:"
diff -rq "$ref" "$kit_dir" >&2 || true
info " Update: make kit-update"
exit 1
-28
View File
@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Checks the `rust-version` declared in Cargo.toml. It is a guarantee ("this crate builds with that toolchain"),
# so it must name a toolchain that is INSTALLED here and on which the crate really passes `cargo check`:
# a version nobody tested is a promise nobody can keep.
# - no rust-version: nothing to check (exit 0);
# - rust-version but no matching installed toolchain: refused, with the command to install it;
# - otherwise `cargo +<toolchain> check --all-targets` must pass.
# The toolchain is matched on the version as written: "1.100" matches 1.100.x, "1.100.0" matches only 1.100.0.
set -euo pipefail
. "$(dirname "$0")/common.sh"
[ -f "$CARGO_TOML" ] || exit 0
ver=$(sed -nE 's/^rust-version[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' "$CARGO_TOML" | head -n 1)
[ -n "$ver" ] || exit 0
if ! command -v rustup >/dev/null; then
err "✗ rust-version = \"$ver\" but rustup is absent: the claim cannot be tested here"
exit 1
fi
pat="^$(printf '%s' "$ver" | sed 's/\./\\./g')(\\.[0-9]+)?-"
tc=$(rustup toolchain list | awk '{print $1}' | grep -E "$pat" | head -n 1 || true)
if [ -z "$tc" ]; then
err "✗ rust-version = \"$ver\": no such toolchain installed, so it cannot be tested."
err " Install it (rustup toolchain install $ver) and re-run, or declare a version that is installed."
exit 1
fi
info "→ Checking the code with toolchain $tc (rust-version = \"$ver\")..."
"$CARGO" "+$tc" check --all-targets
-77
View File
@@ -1,77 +0,0 @@
#!/usr/bin/env bash
# Is there, in the crate's jj working copy (current directory), a change that justifies a
# commit, that is, something other than what the kit itself produces or modifies? Read-only.
#
# Do not count:
# - .crate-kit/ (kit copy) and .cargo/ (generated local configuration);
# - a template file (.gitea/workflows/release.yaml, LICENSE, .gitignore, Makefile…) identical to
# that of the kind's template (<extension>/templates/<kind>, otherwise crate-kit/template): adopt.sh laid it down as is;
# - Cargo.lock when only the `version` line of the crate itself changed (version bump);
# - the Makefile when only its kit bootstrap lines changed (KIT_SRC, copy or sync of
# .crate-kit/, comments that talk about the kit): the rest (description, PLUGIN_ID…) belongs to the crate.
# Without a crate-kit repository alongside ($KIT_SRC), the second filter cannot apply: these files
# then count as changes.
#
# Output: one file per line on standard output. Code 0 if there are any, 1 otherwise (nothing to commit).
set -euo pipefail
. "$(dirname "$0")/common.sh"
kit_src="${KIT_SRC:-../crate-kit}"
kind="${CRATE_KIND:-}"
if [ -z "$kind" ] && [ -f Makefile ]; then
kind=$(sed -n 's/^CRATE_KIND *[:?]*= *\([a-z]*\).*/\1/p' Makefile | head -n 1)
fi
template="$("$kit_src/tools/kit-assemble.sh" --root)/template"
overlay=$("$kit_src/tools/kit-assemble.sh" --overlay 2>/dev/null || true)
[ -n "$kind" ] && [ -n "$overlay" ] && [ -d "$overlay/templates/$kind" ] && template="$overlay/templates/$kind"
# Cargo.lock: did only the `version` line of the crate's package change?
lock_is_version_bump() {
local name
name=$(crate_name)
jj diff --git --context 1 Cargo.lock 2>/dev/null | awk -v name="$name" '
/^(\+\+\+|---)/ { next }
/^@@/ { prev = ""; next }
/^[-+]/ {
changed++
if ($0 !~ /^[-+]version = / || prev != " name = \"" name "\"") bad = 1
next
}
/^ / { prev = $0 }
END { exit (changed > 0 && !bad) ? 0 : 1 }'
}
# Makefile: did only the kit bootstrap lines change? Those that name KIT_SRC or
# `crate-kit` (variable, sync, copy of .crate-kit/) and the comments that talk about the kit; a
# modification of any other line (description, PLUGIN_ID, targets) is a real change of the crate.
makefile_is_kit_bootstrap() {
jj diff --git --context 1 Makefile 2>/dev/null | awk '
/^(\+\+\+|---)/ { next }
/^[-+]/ {
changed++
if ($0 !~ /KIT_SRC|crate-kit|kit-copy|^[-+]# .*[Kk]it/) bad = 1
}
END { exit (changed > 0 && !bad) ? 0 : 1 }'
}
found=0
while IFS= read -r line; do
# Format of `jj diff --summary`: "M path"; a rename "R {a => b}" remains a change.
path="${line#? }"
case "$path" in
.crate-kit/* | .cargo/*) continue ;;
Cargo.lock)
if lock_is_version_bump; then continue; fi
;;
Makefile)
if makefile_is_kit_bootstrap; then continue; fi
;;
esac
if [ "${line%% *}" = M ] && [ -f "$template/$path" ] && cmp -s "$template/$path" "$path"; then
continue
fi
echo "$path"
found=1
done < <(jj diff --summary)
[ "$found" -eq 1 ] || { info " nothing to commit outside the kit" ; exit 1; }
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Starts a new working commit (`jj new`), unless @ already is a blank one (empty, without a description).
# After a push of main, @ is usually already blank: when the pushed commit was @, it became immutable and jj
# itself created an empty working commit on top of it (operation "push bookmark main"). An unconditional
# `jj new` would then stack a second, useless empty commit.
set -euo pipefail
. "$(dirname "$0")/common.sh"
blank=$(jj log -r @ --no-graph -T 'if(empty && description == "", "1", "0")')
if [ "$blank" = 1 ]; then
info " (@ is already an empty working commit: no new commit)"
exit 0
fi
jj new
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Safeguards before a publication:
# 1. a crate published on a private registry declares `publish = ["<registry>"]` in its Cargo.toml, so that
# cargo itself refuses any publication elsewhere (crates.io for example);
# 2. the published archive does not carry the kit's own files (.crate-kit/, .gitea/, api/, Makefile):
# development tooling, useless to the users of the crate. `exclude` in [package] keeps them out.
# Not applicable: kind without publication (PUBLISH=no), registry absent or crates-io.
set -euo pipefail
. "$(dirname "$0")/common.sh"
[ "${PUBLISH:-yes}" = no ] && exit 0
{ [ -n "$REGISTRY" ] && [ "$REGISTRY" != crates-io ]; } || exit 0
[ -f "$CARGO_TOML" ] || exit 0
if ! grep -qE "^publish[[:space:]]*=[[:space:]]*\[[[:space:]]*\"$REGISTRY\"[[:space:]]*\]" "$CARGO_TOML"; then
err "✗ $CARGO_TOML : publish = [\"$REGISTRY\"] missing in [package] (without it, cargo publish would accept crates.io)"
exit 1
fi
# What cargo would really put in the archive (not a reading of Cargo.toml).
if ! listing=$("$CARGO" package --allow-dirty --list --manifest-path "$CARGO_TOML" 2>&1); then
err "✗ cannot list the files of the package, so its content cannot be checked:"
printf '%s\n' "$listing" >&2
exit 1
fi
internal=$(printf '%s\n' "$listing" | grep -E '^(\.crate-kit/|\.gitea/|api/|Makefile$)' || true)
if [ -n "$internal" ]; then
err "✗ the published archive would contain the kit's internal files:"
printf '%s\n' "$internal" | head -n 5 | sed 's/^/ /' >&2
err " add to [package] of $CARGO_TOML: exclude = [\".crate-kit/\", \".gitea/\", \"api/\", \"Makefile\"]"
exit 1
fi
-40
View File
@@ -1,40 +0,0 @@
#!/usr/bin/env bash
# Publishes the current version on the $REGISTRY registry (private, or crates-io with CARGO_REGISTRY_TOKEN).
# DRY_RUN non-empty: assembles and builds the package without sending it.
#
# Idempotent: if the version is already published, it is a success (allows replaying the release
# workflow after a later failure). Authentication: variable CARGO_REGISTRIES_<REGISTRY>_TOKEN
# ("Bearer <token>"), otherwise built from the forge token (forge_token: FORGETOKEN in CI).
#
# --allow-dirty: in a colocated jj repository, git always sees the working copy as
# modified relative to its HEAD, even when the jj commit is already pushed.
set -euo pipefail
. "$(dirname "$0")/common.sh"
if [ "${PUBLISH:-yes}" = no ]; then
info " (kind ${CRATE_KIND:-crate}: nothing to publish on the registry)"
exit 0
fi
[ -n "$REGISTRY" ] || { err "✗ no registry: declare the kit extension (KIT_OVERLAY in the Makefile, org.mk) or set REGISTRY = crates-io"; exit 1; }
# Same safeguards as `make check` (publish = [...] and no internal file in the archive): the CI runs this script.
"$(dirname "$0")/publish-guard.sh"
version=$(current_version)
name=$(crate_name)
if [ -n "${DRY_RUN:-}" ]; then
warn "→ Checking the publication of $name $version (without sending)..."
"$CARGO" publish --registry "$REGISTRY" --allow-dirty --dry-run
exit 0
fi
warn "→ Publishing $name $version on registry $REGISTRY..."
log=$(mktemp)
trap 'rm -f -- "$log"' EXIT
if "$CARGO" publish --registry "$REGISTRY" --allow-dirty 2>&1 | tee "$log" >&2; then
ok "✓ $name $version published"
elif grep -qiE 'already (exists|uploaded)|crate version .* is already' "$log"; then
warn " $name $version is already published on $REGISTRY: nothing to do"
else
err "✗ Publication of $name $version failed"
exit 1
fi
-16
View File
@@ -1,16 +0,0 @@
#!/usr/bin/env bash
# Advances the main bookmark to the current commit (@, or its first non-empty ancestor if @ is an
# empty working commit without a description: release_rev) and pushes it: no PR branch, main receives
# the commit directly. Moving main must be a fast-forward (jj refuses otherwise): if
# main@origin has advanced, `make jjfetch` first rebases the local work onto it.
set -euo pipefail
. "$(dirname "$0")/common.sh"
abandon_blank_commits
rev=$(release_rev)
if ! jj bookmark set main -r "$rev" 2>/dev/null; then
err "✗ main cannot advance to $rev (main has diverged or $rev does not descend from it)"
info " Run make jjfetch to rebase the work onto main@origin, then start again."
exit 1
fi
jj git push --bookmark main
-24
View File
@@ -1,24 +0,0 @@
#!/usr/bin/env bash
# Generates $RELEASE_NOTES_DIR/version-<version>.md: notes produced by `jj release-notes`
# (fallback to one line if they fail, e.g. before the first tag), then adds a
# "Public API" section with the snapshot diff since the previous version.
set -euo pipefail
. "$(dirname "$0")/common.sh"
version=$(current_version)
notes="$RELEASE_NOTES_DIR/version-$version.md"
info "→ Generating the release notes ($notes)..."
mkdir -p "$RELEASE_NOTES_DIR"
PMOJJ_RELEASE_LANG="${KIT_LANG:-en}" PMOJJ_RELEASE_PROJECT="${RELEASE_PROJECT_DESC:-$(crate_name)}" jj release-notes --release "$version" >"$notes" ||
echo "Release version-$version" >"$notes"
prev=$(ls "$API_DIR"/*.txt 2>/dev/null | sed 's|.*/||; s|\.txt$||' | sort -V |
grep -v -x "$version" | tail -n 1 || true)
if [ -n "$prev" ] && [ -f "$API_DIR/$version.txt" ]; then
api_diff=$(diff <(filter_notes "$API_DIR/$prev.txt") <(filter_notes "$API_DIR/$version.txt") | grep '^[<>]' || true)
if [ -n "$api_diff" ]; then
printf '\n## Public API (changes since %s)\n\n```diff\n%s\n```\n' \
"$prev" "$api_diff" >>"$notes"
fi
fi
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Does the release tag `version-<version>` already exist (locally or on origin)? jj only, no git command.
# Usage: tag-exists.sh <version>
# Exit: 0 = the tag exists, 1 = it does not, 2 = not checked (no jj repository, origin unreachable).
# jj has no equivalent of `ls-remote`: the tag alone is fetched (`jj git fetch --tag`), which imports it as a
# tracked remote tag if it exists on origin and changes nothing else, then `jj tag list` tells.
set -uo pipefail
version="${1:?usage: tag-exists.sh <version>}"
tag="version-$version"
jj root >/dev/null 2>&1 || exit 2
jj git fetch --tag "exact:$tag" >/dev/null 2>&1 || exit 2
if [ -n "$(jj tag list "exact:$tag" -T 'name ++ "\n"' 2>/dev/null)" ]; then
exit 0
fi
exit 1
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Creates and pushes the tag version-<version> on the published commit (release_rev: @, or its first
# non-empty ancestor), with jj only. The tag is lightweight (jj creates no annotated tag): the release notes
# are not its message but the file $RELEASE_NOTES_DIR/version-<version>.md committed in the tagged revision,
# which forgejo-release.sh reads in the CI as the body of the release.
set -euo pipefail
. "$(dirname "$0")/common.sh"
version=$(current_version)
tag="version-$version"
notes="$RELEASE_NOTES_DIR/$tag.md"
[ -f "$notes" ] || { err "✗ release notes missing: $notes (make release-notes)"; exit 1; }
if [ -n "$(jj tag list "exact:$tag" 2>/dev/null)" ]; then
err "✗ tag $tag already exists"
exit 1
fi
rev=$(release_rev)
jj tag set "$tag" -r "$rev"
jj git push --tag "exact:$tag"
ok "✓ Release $tag published"
-141
View File
@@ -1,141 +0,0 @@
#!/usr/bin/env bash
# Publishes the API documentation (rustdoc -> JSON -> Markdown) to the crate's Forgejo wiki.
#
# The Forgejo wiki is a second repository (<repository>.wiki.git). It is never kept: the script
# clones it into a temporary directory (git), replaces the generated pages, commits and pushes, then
# removes the clone. Works identically locally and in the CI (release workflow).
#
# Pages produced: Home.md (module index), _Sidebar.md, one page per module.
# The wiki content is ENTIRELY replaced: any page written by hand on the Forgejo side
# disappears at the next run.
#
# Variables:
# WIKI_URL wiki repository URL (default: `origin` URL with .git replaced by .wiki.git)
# WIKI_TOKEN access token (CI, https URL): sent in the header "Authorization: token …"
# GIT_USER_NAME / GIT_USER_EMAIL commit identity if git has none configured
# DRY_RUN non-empty: generates and commits in the temporary clone, shows the diff, does not push
#
# Prerequisites: cargo-doc-md (cargo install cargo-doc-md --locked); the wiki must exist on the
# Forgejo side (create a first page by hand once per crate, otherwise the repository is not found).
set -euo pipefail
. "$(dirname "$0")/common.sh"
if [ "${WIKI:-yes}" = no ]; then
info " (kind ${CRATE_KIND:-crate}: no API documentation for the wiki)"
exit 0
fi
require_cargo_tool doc-md cargo-doc-md
name=$(crate_name)
version=$(current_version)
# Wiki URL: that of origin, with .git replaced by .wiki.git.
if [ -z "${WIKI_URL:-}" ]; then
origin=$(git remote get-url origin 2>/dev/null || true)
[ -n "$origin" ] || { err "✗ remote origin not found: set WIKI_URL=..."; exit 1; }
WIKI_URL="${origin%.git}.wiki.git"
fi
# Common git options: token in a header (CI) and fallback identity.
git_opts=()
if [ -n "${WIKI_TOKEN:-}" ]; then
git_opts+=(-c "http.extraHeader=Authorization: token $WIKI_TOKEN")
fi
if [ -z "$(git config user.name 2>/dev/null || true)" ]; then
git_opts+=(-c "user.name=${GIT_USER_NAME:-crate-kit}")
fi
if [ -z "$(git config user.email 2>/dev/null || true)" ]; then
git_opts+=(-c "user.email=${GIT_USER_EMAIL:-crate-kit@localhost}")
fi
wgit() { git "${git_opts[@]}" "$@"; }
work=$(mktemp -d "${TMPDIR:-/tmp}/crate-kit-wiki.XXXXXX")
[ -n "$work" ] && [ -d "$work" ] || { err "✗ temporary directory not created"; exit 1; }
trap 'rm -rf -- "$work"' EXIT
# 1. Rustdoc -> Markdown (one file per module, in $work/md/<crate>/).
info "→ Generating the Markdown ($name $version)..."
"$CARGO" doc-md --no-deps -o "$work/md" >&2
src="$work/md/$name"
[ -f "$src/index.md" ] || {
# The folder name follows the library name (hyphens -> underscores).
src="$work/md/${name//-/_}"
[ -f "$src/index.md" ] || { err "✗ index.md not found in $work/md"; exit 1; }
}
# 2. Wiki pages: flat, links between pages without the .md extension (Forgejo wiki convention).
pages="$work/pages"
mkdir -p "$pages"
for f in "$src"/*.md; do
base=$(basename "$f")
[ "$base" = index.md ] && continue
cp "$f" "$pages/$base"
done
# Home = crate index as produced by cargo-doc-md (title, crate doc, modules);
# the version appears in the sidebar.
sed -E 's/\]\(([^)#]+)\.md\)/](\1)/g' "$src/index.md" >"$pages/Home.md"
{
printf '**[%s](Home)** %s\n\n' "$name" "$version"
sed -nE 's/^### \[`([^`]+)`\]\(([^)]+)\.md\).*/- [\1](\2)/p' "$src/index.md"
} >"$pages/_Sidebar.md"
# Rustdoc intra-doc links (``[`item`]``, ``[`module::item`]``): cargo-doc-md does not resolve them
# and leaves them in literal brackets. We resolve them here to the wiki page that defines
# the item (table built from the "Contents" of each module page); a module
# points to its own page. Names not found (std, other crates) lose their
# brackets and remain as code.
map="$work/map"
: >"$map"
for f in "$pages"/*.md; do
p=$(basename "$f" .md)
case "$p" in Home | _Sidebar) continue ;; esac
echo "$p $p" >>"$map"
done
for f in "$pages"/*.md; do
p=$(basename "$f" .md)
case "$p" in Home | _Sidebar) continue ;; esac
sed -nE 's/^- \[`([A-Za-z0-9_]+)`\]\(#.*/\1 '"$p"'/p' "$f" >>"$map"
done
resolve="$work/resolve.sed"
: >"$resolve"
while read -r item page; do
# First wins: the module pages (lines at the start) take precedence; an item already
# turned into a link is no longer a candidate (it is followed by "(").
printf 's/\\[`((([A-Za-z0-9_]+::)*)%s)`\\]([^(:[]|$)/[`\\1`](%s)\\4/g\n' "$item" "$page" >>"$resolve"
done <"$map"
for f in "$pages"/*.md; do
sed -E -f "$resolve" "$f" | sed -E 's/\[(`[^`]+`)\]([^(:[]|$)/\1\2/g' >"$f.tmp"
mv "$f.tmp" "$f"
done
# 3. Clone the wiki, replace the pages, commit, push.
info "→ Cloning the wiki ${WIKI_URL}..."
clone="$work/clone"
wgit clone --quiet "$WIKI_URL" "$clone" >&2 || {
err "✗ cannot clone: does the wiki exist? (create a first page on Forgejo)"
exit 1
}
cd "$clone"
# Default branch of the wiki (master or main depending on the instance): the one the clone checked out.
branch=$(git symbolic-ref --short HEAD)
# The generated files replace all the .md; the rest (images…) is kept.
find . -maxdepth 1 -name '*.md' -type f -delete
cp "$pages"/*.md .
git add -A
if [ -z "$(git status --porcelain)" ]; then
ok "✓ Wiki already up to date"
exit 0
fi
git diff --cached --stat >&2
wgit commit --quiet -m "API documentation: $name $version"
if [ -n "${DRY_RUN:-}" ]; then
warn "→ DRY_RUN: local commit in the temporary clone, nothing is pushed"
exit 0
fi
wgit push --quiet origin "$branch" >&2
ok "✓ Wiki of $name updated ($version)"
+5 -12
View File
@@ -5,11 +5,6 @@ on:
tags: tags:
- "v*" - "v*"
# Private cargo registry `obi` (public read access): the index normally comes from `make` (obi-kit, org.mk),
# which these jobs do not use, and `.cargo/config.toml` is not versioned.
env:
CARGO_REGISTRIES_OBI_INDEX: sparse+https://forge.metabarcoding.org/api/packages/obi/cargo/
jobs: jobs:
create-release: create-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -81,12 +76,12 @@ jobs:
RELEASE_ID: ${{ needs.create-release.outputs.release_id }} RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
run: | run: |
mkdir -p /tmp/dist mkdir -p /tmp/dist
cp target/x86_64-unknown-linux-musl/release/obiskim /tmp/dist/obiskim-linux-x86_64 cp target/x86_64-unknown-linux-musl/release/obikmer /tmp/dist/obikmer-linux-x86_64
strip /tmp/dist/obiskim-linux-x86_64 strip /tmp/dist/obikmer-linux-x86_64
curl -s -X POST \ curl -s -X POST \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" \ "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" \
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@/tmp/dist/obiskim-linux-x86_64" -F "attachment=@/tmp/dist/obikmer-linux-x86_64"
build-macos-arm64: build-macos-arm64:
needs: create-release needs: create-release
@@ -109,9 +104,7 @@ jobs:
- name: Build macOS binary - name: Build macOS binary
run: | run: |
# The build runs in a container: the registry index of the workflow env must be passed explicitly.
CID=$(docker create \ CID=$(docker create \
-e CARGO_REGISTRIES_OBI_INDEX \
-w /src/src \ -w /src/src \
registry.metabarcoding.org/cibuilder/rustcrossosx:latest \ registry.metabarcoding.org/cibuilder/rustcrossosx:latest \
cargo build --release --target aarch64-apple-darwin --no-default-features) cargo build --release --target aarch64-apple-darwin --no-default-features)
@@ -119,7 +112,7 @@ jobs:
docker start -a "$CID" docker start -a "$CID"
STATUS=$(docker wait "$CID") STATUS=$(docker wait "$CID")
mkdir -p /tmp/dist mkdir -p /tmp/dist
docker cp "$CID:/src/src/target/aarch64-apple-darwin/release/obiskim" /tmp/dist/obiskim-macos-arm64 docker cp "$CID:/src/src/target/aarch64-apple-darwin/release/obikmer" /tmp/dist/obikmer-macos-arm64
docker rm "$CID" > /dev/null docker rm "$CID" > /dev/null
[ "$STATUS" -eq 0 ] [ "$STATUS" -eq 0 ]
@@ -131,4 +124,4 @@ jobs:
curl -s -X POST \ curl -s -X POST \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" \ "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets" \
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
-F "attachment=@/tmp/dist/obiskim-macos-arm64" -F "attachment=@/tmp/dist/obikmer-macos-arm64"
-4
View File
@@ -44,7 +44,3 @@ biblio
*.parstree *.parstree
*.ckp.gz *.ckp.gz
*.model *.model
scripts/__pycache__/mk_wiki.cpython-314.pyc
# Generated by .crate-kit/dev-patch.mk at every make
/.cargo/config.toml
+87
View File
@@ -0,0 +1,87 @@
# Plan d'amélioration technique - obiskio
## 1. Contexte et objectifs
- **Objectif** : Renforcer la robustesse, la maintenabilité et les performances de la crate `obiskio`.
- **Priorités** :
1. Gestion des erreurs
2. Optimisation de la mémoire du pool
3. Robustesse concurrente
4. Couverture de tests
5. Documentation
---
## 2. Axes d'amélioration détaillés
### 2.1 Gestion des erreurs
- **Problème** : `SKError` ne couvre pas tous les cas (format invalide, taille maximale, CRC)
- **Actions** :
- Ajouter variante `ParseError(String)` dans `src/error.rs`
- Valider les tailles de SuperKmer avant parsing
- Remplacer `expect()` par `unwrap_or_else` avec messages explicites
- Documenter chaque variante d’erreur dans le README
### 2.2 Optimisation du pool de fichiers
- **Problème** : `SKFilePool` utilise un `Vec<WriteEntry>` non contraint et n’effectue pas de nettoyage en cas d’erreur
- **Actions** :
- Implémenter un `LimitedVec` avec limite stricte à `MAX_POOL_SIZE`
- Créer `clear_memory()` qui supprime les entrées orphelines
- Ajouter `evict_lru_threshold()` pour éviction proactive
- Introduire un `RwLock` pour les opérations de lecture massives
### 2.3 Robustesse concurrente
- **Problème** : Risque de deadlocks dans `SKFileWriter::write_batch()` et `SKFileReader::reopen_and_seek()`
- **Actions** :
- Remplacer `Mutex` par `RwLock` pour les accès en lecture
- Ajouter un compteur de blocage et logs de timeout
- Utiliser `std::thread::park_timeout` pour débloquer
- Insérer `debug_assert!` sur les états invariants
### 2.4 Couverture de tests
- **Problème** : Absence de benchmarks, de tests de migration, de résilience de fichiers corrompus
- **Actions** :
- Benchmarks I/O sur 10k+ SuperKmer avec `criterion`
- Tests de migration de version de fichier `.meta` → `.v2.meta`
- Tests de corruption volontaire (truncature, inversion de bits)
- Tests de stress sur pool saturation (100 threads)
### 2.5 Documentation & exemples
- **Actions** :
- Ajouter des examples dans chaque module (`# Examples`)
- Documenter la logique LRU avec diagrammes Mermaid
- Créer un guide « How to recover from eviction »
- Mettre à jour le `README.md` avec tableau des variantes d’erreur
---
## 3. Plan d'exécution (Roadmap)
| Sprint | Durée | Livrables clés |
|--------|-------|----------------|
| **S1** | 2 jours | Refactorisation `SKError`, ajout de tests unitaires |
| **S2** | 3 jours | Implémentation `clear_memory()` + `LimitedVec` |
| **S3** | 2 jours | Passage à `RwLock`, ajout de compteurs de blocage |
| **S4** | 2 jours | Benchmarks + tests de migration |
| **S5** | 1 jour | Documentation finale & mise à jour du README |
---
## 4. Dépendances externes
- Mettre à jour `niffler` vers la version 2.0 (performance compression)
- Évaluer `bincode` vs `serde_json` pour les métas (I/O)
- Ajouter dépendance `criterion` (dev‑dependencies)
---
## 5. KPI de suivi
- **Couverture de tests** : ≥85 % des chemins critiques
- **Latence moyenne d’écriture** : ↓15 % après optimisation du pool
- **Taux d’erreurs résolues** : 100 % des nouvelles variantes couvertes
- **Temps de build CI** : ≤5 min pour l’ensemble des benchmarks
---
## 6. Validation finale
- Revue de code avec `cargo clippy -- -D warnings`
- Analyse de toxicité avec `cargo deny open-source-licenses`
- Vérification de la conformité aux standards de naming du projet
+2
View File
@@ -0,0 +1,2 @@
/cache
/project.local.yml
+169
View File
@@ -0,0 +1,169 @@
# the name by which the project can be referenced within Serena/when chatting with the LLM.
project_name: "obikmer"
# the encoding used by text files in the project
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
encoding: "utf-8"
# line ending convention to use when writing source files.
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
line_ending:
# The language backend to use for this project.
# If not set, the global setting from serena_config.yml is used.
# Valid values: LSP, JetBrains
# Note: the backend is fixed at startup. If a project with a different backend
# is activated post-init, an error will be returned.
language_backend:
# whether to use project's .gitignore files to ignore files
ignore_all_files_in_gitignore: true
# advanced configuration option allowing to configure language server-specific options.
# Maps the language key to the options.
# The settings are considered only if the project is trusted (see global configuration to define trusted projects).
# See https://oraios.github.io/serena/02-usage/050_configuration.html#language-server-specific-settings
ls_specific_settings: {}
# list of additional paths to ignore in this project.
# Same syntax as gitignore, so you can use * and **.
# Important: quote patterns that start with `*`, otherwise YAML treats them as aliases.
# Example:
# ignored_paths:
# - "examples/**"
# - ".worktrees/**"
# - "**/bin/**"
# - "**/obj/**"
# Note: global ignored_paths from serena_config.yml are also applied additively.
ignored_paths: []
# whether the project is in read-only mode
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
# Added on 2025-04-18
read_only: false
# list of tool names to exclude.
# This extends the existing exclusions (e.g. from the global configuration)
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
excluded_tools: []
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
# This extends the existing inclusions (e.g. from the global configuration).
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
included_optional_tools: []
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
fixed_tools: []
# list of mode names that are to be activated by default, overriding the setting in the global configuration.
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply
# for this project.
# This setting can, in turn, be overridden by CLI parameters (--mode).
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
default_modes:
# list of mode names to be activated additionally for this project, e.g. ["query-projects"]
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
added_modes:
# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ""
# time budget (seconds) per tool call for the retrieval of additional symbol information
# such as docstrings or parameter information.
# This overrides the corresponding setting in the global configuration; see the documentation there.
# If null or missing, use the setting from the global configuration.
symbol_info_budget:
# list of regex patterns which, when matched, mark a memory entry as read‑only.
# Extends the list from the global configuration, merging the two lists.
read_only_memory_patterns: []
# list of regex patterns for memories to completely ignore.
# Matching memories will not appear in list_memories or activate_project output
# and cannot be accessed via read_memory or write_memory.
# To access ignored memory files, use the read_file tool on the raw file path.
# Extends the list from the global configuration, merging the two lists.
# Example: ["_archive/.*", "_episodes/.*"]
ignored_memory_patterns: []
# list of additional workspace folder paths for cross-package reference support.
# Paths can be absolute or relative to the project root.
# Each folder is registered as an LSP workspace folder, enabling language servers to discover
# symbols and references across package boundaries, but these folders are not indexed by Serena,
# i.e. the respective symbols will not be found using Serena's symbol search tools.
# Example:
# additional_workspace_folders:
# - ../sibling-package
# - ../shared-lib
ls_additional_workspace_folders: []
# list of language servers to start when using the LSP backend; choose from:
# ada al angular ansible bash
# bsl clojure cpp cpp_ccls crystal
# csharp csharp_omnisharp cue dart deno
# elixir elm erlang fortran fsharp
# gdscript gleam go groovy haskell
# haxe hlsl html java json
# julia kotlin latex lean4 lua
# luau markdown matlab msl nextflow
# nix ocaml pascal perl php
# php_phpactor php_phpantom powershell python python_basedpyright
# python_jedi python_pyrefly python_ty qml r
# rego ruby ruby_solargraph rust scala
# scss solidity svelte swift systemverilog
# terraform toml typescript typescript_vts vue
# wolfram yaml zig
# (This list may be outdated; generated with scripts/print_language_list.py;
# For the current list, see values of the LanguageServerId enum here:
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py)
# For some languages, there are several alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
# Note:
# - For C, use cpp
# - For JavaScript, use typescript
# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root)
# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm)
# - For Deno projects, use deno (serves the same .ts/.js files as typescript; requires the deno CLI on PATH)
# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three)
# - For Free Pascal/Lazarus, use pascal
# Special requirements:
# Some language servers require additional setup/installations.
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
# When using multiple language servers, the first language server that supports a given file will be used for that file.
# The first language server is the default language and the respective language server will be used as a fallback.
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
language_servers:
- rust
# list of workspace folder paths (LSP backend only).
# These folders will be used to build up Serena's symbol index.
# Paths must be within the project root and should thus be relative to the project root.
# Furthermore, the paths should not be filtered by ignore settings.
# Default setting: The entire project root folder (".") is considered.
# In (large) monorepos, this can be used to index only subfolders of the project root, e.g.
# ls_workspace_folders:
# - "./subproject1"
# - "./subproject2"
ls_workspace_folders:
- .
# optional shell command to run before the language backend (LSP or JetBrains) is initialised.
# the command runs in the project root directory and is only executed if the project is trusted
# (see trusted_project_path_patterns in the global configuration).
# serena waits for the command to exit: a non-zero exit code is logged as an error but does not
# abort activation. a per-project timeout (activation_command_timeout, default 180s) is the safety
# backstop for non-terminating commands; on expiry the process is killed and activation continues.
# example: activation_command: "npx nx run-many -t build"
activation_command:
# maximum time in seconds to wait for activation_command to complete before killing it (default 180s).
# must be a positive number.
activation_command_timeout: 180.0
+59
View File
@@ -0,0 +1,59 @@
// Project tasks configuration. See https://zed.dev/docs/tasks for documentation.
//
// Example:
[
{
"label": "Example task",
"command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done",
//"args": [],
// Env overrides for the command, will be appended to the terminal's environment from the settings.
"env": { "foo": "bar" },
// Current working directory to spawn the command into, defaults to current project root.
//"cwd": "/path/to/working/directory",
// Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`.
"use_new_terminal": false,
// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`.
"allow_concurrent_runs": false,
// What to do with the terminal pane and tab, after the command was started:
// * `always` — always show the task's pane, and focus the corresponding tab in it (default)
// * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it
// * `never` — do not alter focus, but still add/reuse the task's tab in its pane
"reveal": "always",
// Where to place the task's terminal item after starting the task:
// * `dock` — in the terminal dock, "regular" terminal items' place (default)
// * `center` — in the central pane group, "main" editor area
"reveal_target": "dock",
// What to do with the terminal pane and tab, after the command had finished:
// * `never` — Do nothing when the command finishes (default)
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always`
"hide": "never",
// Which shell to use when running a task inside the terminal.
// May take 3 values:
// 1. (default) Use the system's default terminal configuration in /etc/passwd
// "shell": "system"
// 2. A program:
// "shell": {
// "program": "sh"
// }
// 3. A program with arguments:
// "shell": {
// "with_arguments": {
// "program": "/bin/bash",
// "args": ["--login"]
// }
// }
"shell": "system",
// Whether to show the task line in the output of the spawned task, defaults to `true`.
"show_summary": true,
// Whether to show the command line in the output of the spawned task, defaults to `true`.
"show_command": true,
// Which edited buffers to save before running the task:
// * `all` — save all edited buffers
// * `current` — save currently active buffer only
// * `none` — don't save any buffers
"save": "none",
// Represents the tags for inline runnable indicators, or spawning multiple tasks at once.
// "tags": []
},
]
Generated
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "obikseq"
version = "0.1.0"
+6 -202
View File
@@ -19,7 +19,7 @@
<title>obiskim</title> <title>obikmer</title>
@@ -71,7 +71,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="/." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="/." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -85,7 +85,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -129,13 +129,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="/." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="/." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -387,34 +387,6 @@
<li class="md-nav__item">
<a href="/theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/theory/evolutionary_distances/" class="md-nav__link"> <a href="/theory/evolutionary_distances/" class="md-nav__link">
@@ -437,62 +409,6 @@
<li class="md-nav__item">
<a href="/theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="/theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -749,34 +665,6 @@
<li class="md-nav__item">
<a href="/implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/implementation/unitig_evidence/" class="md-nav__link"> <a href="/implementation/unitig_evidence/" class="md-nav__link">
@@ -973,62 +861,6 @@
<li class="md-nav__item">
<a href="/implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="/implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="/implementation/filtering/" class="md-nav__link"> <a href="/implementation/filtering/" class="md-nav__link">
@@ -1287,35 +1119,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="/architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
File diff suppressed because it is too large. Load diff
@@ -19,7 +19,7 @@
<title>Index architecture.refs - obiskim</title> <title>Index architecture.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -23,7 +23,7 @@
<title>Kmer index - obiskim</title> <title>Kmer index - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -758,34 +674,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -982,62 +870,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1538,35 +1370,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -21,7 +21,7 @@
<title>NUMA-aware partition runner - obiskim</title> <title>NUMA-aware partition runner - obikmer</title>
@@ -78,7 +78,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -92,7 +92,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -136,13 +136,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -394,34 +394,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -444,62 +416,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -756,34 +672,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -980,62 +868,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1296,35 +1128,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -9,7 +9,7 @@
<link rel="prev" href="../hot_resume_memoization/"> <link rel="prev" href="../siblings/">
<link rel="next" href="../numa_partition_runner/"> <link rel="next" href="../numa_partition_runner/">
@@ -23,7 +23,7 @@
<title>NUMA-aware worker pools - obiskim</title> <title>NUMA-aware worker pools - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -758,34 +674,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -982,62 +870,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1298,35 +1130,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -19,7 +19,7 @@
<title>Query.refs - obiskim</title> <title>Query.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1466,7 +1270,7 @@
<h1 id="coverage-architecturequerymd">Coverage: architecture/query.md</h1> <h1 id="coverage-architecturequerymd">Coverage: architecture/query.md</h1>
<h2 id="code-couvert">Code couvert</h2> <h2 id="code-couvert">Code couvert</h2>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code> — commande query, format de sortie</li> <li><code>obikmer/src/cmd/query.rs</code> — commande query, format de sortie</li>
<li><code>obikindex/src/partition/query_layer.rs</code> — routage de la requête à travers les partitions</li> <li><code>obikindex/src/partition/query_layer.rs</code> — routage de la requête à travers les partitions</li>
<li><code>obiread/src/lib.rs</code> — lecture des séquences d'entrée pour la requête</li> <li><code>obiread/src/lib.rs</code> — lecture des séquences d'entrée pour la requête</li>
</ul> </ul>
+21 -351
View File
@@ -19,7 +19,7 @@
<title>Query system - obiskim</title> <title>Query system - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1720,45 +1524,6 @@
</ul> </ul>
</nav> </nav>
</li>
<li class="md-nav__item">
<a href="#query-memory-partitionkmers-replaces-the-per-partition-hashmap-2026-10-15" class="md-nav__link">
<span class="md-ellipsis">
Query memory: PartitionKmers replaces the per-partition HashMap (2026-10-15)
</span>
</a>
<nav class="md-nav" aria-label="Query memory: PartitionKmers replaces the per-partition HashMap (2026-10-15)">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#chunk-size-sweep-on-a-small-input-2026-10-15" class="md-nav__link">
<span class="md-ellipsis">
Chunk size sweep on a small input (2026-10-15)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#automatic-chunk-size-now-follows-the-input-size-2026-10-15" class="md-nav__link">
<span class="md-ellipsis">
Automatic chunk size now follows the input size (2026-10-15)
</span>
</a>
</li>
</ul>
</nav>
</li> </li>
</ul> </ul>
@@ -1796,7 +1561,7 @@
decompose all sequences into superkmers (SuperKmerIter) — construction only, decompose all sequences into superkmers (SuperKmerIter) — construction only,
not the dedup key not the dedup key
deduplicate at k-mer granularity, split by partition in the same pass: deduplicate at k-mer granularity, split by partition in the same pass:
by_partition: Vec&lt;PartitionKmers&gt; ← sorted unique k-mers + flat KmerDesc = (seq_idx, pos) slices (2026-10-15, was a HashMap — see &quot;Query memory&quot; below) by_partition: Vec&lt;HashMap&lt;CanonicalKmer, Vec&lt;KmerDesc&gt;&gt;&gt; ← KmerDesc = (seq_idx, pos)
allocate SmerIndex (SmerIndex::new): in_index: Vec&lt;bool&gt;, sized total_smers — allocate SmerIndex (SmerIndex::new): in_index: Vec&lt;bool&gt;, sized total_smers —
NOT multiplied by n_genomes NOT multiplied by n_genomes
allocate by_genome: Vec&lt;Vec&lt;(seq_idx, pos, value)&gt;&gt;, one empty Vec per genome — allocate by_genome: Vec&lt;Vec&lt;(seq_idx, pos, value)&gt;&gt;, one empty Vec per genome —
@@ -1968,7 +1733,7 @@ ATCGATCG...
<p><code>kmer_count + kmer_missing</code> ≤ total k_user-mers in the sequence. The gap corresponds to k_user-mers whose z-window was not fully confirmed (at least one s-mer absent or zero for all genomes) but whose first s-mer was present in the index.</p> <p><code>kmer_count + kmer_missing</code> ≤ total k_user-mers in the sequence. The gap corresponds to k_user-mers whose z-window was not fully confirmed (at least one s-mer absent or zero for all genomes) but whose first s-mer was present in the index.</p>
<hr /> <hr />
<h2 id="cli">CLI</h2> <h2 id="cli">CLI</h2>
<div class="highlight"><pre><span></span><code>obiskim query &lt;index&gt; [--detail] [--mismatch] [--count-missing] <div class="highlight"><pre><span></span><code>obikmer query &lt;index&gt; [--detail] [--mismatch] [--count-missing]
[--force-presence] [--presence-threshold &lt;n&gt;] [--force-presence] [--presence-threshold &lt;n&gt;]
[-z &lt;z&gt;] [-T &lt;threads&gt;] [--chunk-size &lt;MiB&gt;] [-z &lt;z&gt;] [-T &lt;threads&gt;] [--chunk-size &lt;MiB&gt;]
&lt;query.fa&gt; [&lt;query2.fa&gt; ...] &lt;query.fa&gt; [&lt;query2.fa&gt; ...]
@@ -2048,7 +1813,7 @@ replacing the <code>CanonicalKmer</code> key by the resolved <code>slot</code> (
<p><strong>7. Partition-level parallelism is currently absent — and a NUMA-aware mechanism for exactly this already exists, unused, in <code>obikindex</code>.</strong> <p><strong>7. Partition-level parallelism is currently absent — and a NUMA-aware mechanism for exactly this already exists, unused, in <code>obikindex</code>.</strong>
<code>process_chunk</code>'s partition loop (<code>query.rs:250-278</code>, <code>for (part_idx, part_sks) in by_part.iter().enumerate()</code>) processes every partition of a chunk sequentially on the single worker thread that owns that chunk. This is a parallelism axis on its own, independent of the column question below. <code>process_chunk</code>'s partition loop (<code>query.rs:250-278</code>, <code>for (part_idx, part_sks) in by_part.iter().enumerate()</code>) processes every partition of a chunk sequentially on the single worker thread that owns that chunk. This is a parallelism axis on its own, independent of the column question below.
More importantly: <code>docmd/architecture/numa_partition_runner.md</code> and <code>numa_worker_pools.md</code> document <code>PartitionRunner</code> (<code>obikindex/src/numa.rs</code>), <strong>already implemented</strong> and already used by <code>merge.rs</code>, <code>index.rs</code> (<code>build_layers</code>), <code>select.rs</code>, <code>reindex.rs</code>, <code>rebuild.rs</code> — one controller thread per NUMA node, a Rayon pool pinned to that node's CPUs (<code>hwlocality</code>, <code>numa</code> feature, default-on in <code>obikindex/Cargo.toml</code>), adaptive worker activation driven by <em>both</em> a CPU-efficiency signal and an I/O-throughput signal (<code>CpuSample</code>/<code>IoSample</code>, <code>/proc/self/io</code> on Linux). It exists precisely because a naive <code>into_par_iter()</code> on the global Rayon pool measurably degrades ×60 on this codebase's own 192-core/8-NUMA reference machine (<code>numa_worker_pools.md</code>, § Problem) once workers contend for cross-socket memory bandwidth on shared mmap'd/hashed structures — exactly the shape of the matrix-column scan in point 8 below. More importantly: <code>docmd/architecture/numa_partition_runner.md</code> and <code>numa_worker_pools.md</code> document <code>PartitionRunner</code> (<code>obikindex/src/numa.rs</code>), <strong>already implemented</strong> and already used by <code>merge.rs</code>, <code>index.rs</code> (<code>build_layers</code>), <code>select.rs</code>, <code>reindex.rs</code>, <code>rebuild.rs</code> — one controller thread per NUMA node, a Rayon pool pinned to that node's CPUs (<code>hwlocality</code>, <code>numa</code> feature, default-on in <code>obikindex/Cargo.toml</code>), adaptive worker activation driven by <em>both</em> a CPU-efficiency signal and an I/O-throughput signal (<code>CpuSample</code>/<code>IoSample</code>, <code>/proc/self/io</code> on Linux). It exists precisely because a naive <code>into_par_iter()</code> on the global Rayon pool measurably degrades ×60 on this codebase's own 192-core/8-NUMA reference machine (<code>numa_worker_pools.md</code>, § Problem) once workers contend for cross-socket memory bandwidth on shared mmap'd/hashed structures — exactly the shape of the matrix-column scan in point 8 below.
<code>obiskim</code> already depends on <code>obikindex</code> (<code>obiskim/Cargo.toml</code>, for <code>KmerIndex</code>), so <code>PartitionRunner</code> is directly reachable from <code>cmd/query.rs</code> — no new dependency. Both the partition-level loop and (see point 8) the genome-column scan should be driven through it rather than through ad-hoc <code>rayon::into_par_iter()</code>, to avoid reproducing the already-measured-and-fixed contention problem. Also relevant: the "CPU-only signal stalls on I/O-bound stages" issue documented for <code>pack_matrices</code> (mmap-heavy, page-fault-bound) applies just as much to a column-major mmap scan over persistent matrices — reuse the existing dual CPU/IO activation signal rather than re-deriving one.</p> <code>obikmer</code> already depends on <code>obikindex</code> (<code>obikmer/Cargo.toml</code>, for <code>KmerIndex</code>), so <code>PartitionRunner</code> is directly reachable from <code>cmd/query.rs</code> — no new dependency. Both the partition-level loop and (see point 8) the genome-column scan should be driven through it rather than through ad-hoc <code>rayon::into_par_iter()</code>, to avoid reproducing the already-measured-and-fixed contention problem. Also relevant: the "CPU-only signal stalls on I/O-bound stages" issue documented for <code>pack_matrices</code> (mmap-heavy, page-fault-bound) applies just as much to a column-major mmap scan over persistent matrices — reuse the existing dual CPU/IO activation signal rather than re-deriving one.</p>
<blockquote> <blockquote>
<p><strong>Correction from implementation (Phase 4 below)</strong>: this turned out not to be viable as described. <code>PartitionRunner::run()</code>'s actual body spawns roughly one OS thread per worker slot across every NUMA node <strong>on every call</strong> (confirmed by reading <code>numa.rs</code>, not just its doc comments) — fine for the one-call-per-command-invocation batch usage in <code>merge</code>/<code>build_layers</code>, but <code>query_partition_with</code> runs once per <code>(chunk, partition)</code>, far too frequently to absorb that spawn cost. Partition-level parallelism via <code>PartitionRunner</code> is deferred, not implemented. See Phase 4's "What did not ship, and why" for the detail.</p> <p><strong>Correction from implementation (Phase 4 below)</strong>: this turned out not to be viable as described. <code>PartitionRunner::run()</code>'s actual body spawns roughly one OS thread per worker slot across every NUMA node <strong>on every call</strong> (confirmed by reading <code>numa.rs</code>, not just its doc comments) — fine for the one-call-per-command-invocation batch usage in <code>merge</code>/<code>build_layers</code>, but <code>query_partition_with</code> runs once per <code>(chunk, partition)</code>, far too frequently to absorb that spawn cost. Partition-level parallelism via <code>PartitionRunner</code> is deferred, not implemented. See Phase 4's "What did not ship, and why" for the detail.</p>
</blockquote> </blockquote>
@@ -2069,19 +1834,19 @@ Stage 2's output should be <code>HashMap&lt;genome_idx, Vec&lt;(seq_idx, positio
<p>None of this is implemented yet — parked here as a coherent roadmap while the design is discussed further. Suggested dependency order: (1) I/O parallelism → (3) genome-aware chunk sizing → (4)–(9) staged/k-mer-deduped/NUMA-aware-partition-and-column-major/sparse query engine (larger refactor, biggest structural payoff — reuses <code>PartitionRunner</code> rather than inventing a new parallelism mechanism) → (2) parallel gzip (separate, orthogonal, tracked in chunkreader.md) → secondary diagnostics patterns.</p> <p>None of this is implemented yet — parked here as a coherent roadmap while the design is discussed further. Suggested dependency order: (1) I/O parallelism → (3) genome-aware chunk sizing → (4)–(9) staged/k-mer-deduped/NUMA-aware-partition-and-column-major/sparse query engine (larger refactor, biggest structural payoff — reuses <code>PartitionRunner</code> rather than inventing a new parallelism mechanism) → (2) parallel gzip (separate, orthogonal, tracked in chunkreader.md) → secondary diagnostics patterns.</p>
<hr /> <hr />
<h2 id="implementation-plan">Implementation plan</h2> <h2 id="implementation-plan">Implementation plan</h2>
<p>Concrete, phased translation of the roadmap above. Phases 0–2 are small, independent, low-risk, and each individually testable against current <code>query</code> output — land them first, in order, and measure on the reference 192-core/8-NUMA machine before deciding whether phases 3–5 (the staged/sparse engine, the larger structural payoff) are still worth their cost. Phases 3–5 are one coordinated change spanning <code>obiskim</code>, <code>obikindex::partition</code>, and <code>obicompactvec</code> — they should not be split across releases mid-way, because the intermediate state (e.g. k-mer-level dedup feeding the old dense <code>KmerResults</code>) has no correctness or performance benefit on its own. Phase 6 is unrelated to phases 0–5 and can happen any time, independently, if <code>rapidgzip-rs</code> is validated (see <a href="../../implementation/chunkreader/#future-work--parallel-gzip-decompression-in-xopen">chunkreader.md</a>).</p> <p>Concrete, phased translation of the roadmap above. Phases 0–2 are small, independent, low-risk, and each individually testable against current <code>query</code> output — land them first, in order, and measure on the reference 192-core/8-NUMA machine before deciding whether phases 3–5 (the staged/sparse engine, the larger structural payoff) are still worth their cost. Phases 3–5 are one coordinated change spanning <code>obikmer</code>, <code>obikindex::partition</code>, and <code>obicompactvec</code> — they should not be split across releases mid-way, because the intermediate state (e.g. k-mer-level dedup feeding the old dense <code>KmerResults</code>) has no correctness or performance benefit on its own. Phase 6 is unrelated to phases 0–5 and can happen any time, independently, if <code>rapidgzip-rs</code> is validated (see <a href="../../implementation/chunkreader/#future-work--parallel-gzip-decompression-in-xopen">chunkreader.md</a>).</p>
<p>Instrumentation is deliberately sequenced <em>before</em> the I/O fix (reordering the roadmap's own listed order), because every later phase's justification rests on a measurement ("to be measured, not assumed" appears throughout the roadmap above) — without it, phases 3–5 would be undertaken on faith.</p> <p>Instrumentation is deliberately sequenced <em>before</em> the I/O fix (reordering the roadmap's own listed order), because every later phase's justification rests on a measurement ("to be measured, not assumed" appears throughout the roadmap above) — without it, phases 3–5 would be undertaken on faith.</p>
<p>Performance measurement on the reference 192-core/8-NUMA machine is done by the project owner, not from this development environment (macOS, 16 cores — <code>PartitionRunner</code>'s NUMA pinning is Linux-only, so even phase 4's mechanism can't be functionally exercised for its actual purpose here). Each phase below is therefore written to be <em>self-measuring</em>: the debug-level logging it adds must be enough, on its own, to judge whether that phase's algorithmic choice paid off from a cluster run's logs, without needing to attach a profiler.</p> <p>Performance measurement on the reference 192-core/8-NUMA machine is done by the project owner, not from this development environment (macOS, 16 cores — <code>PartitionRunner</code>'s NUMA pinning is Linux-only, so even phase 4's mechanism can't be functionally exercised for its actual purpose here). Each phase below is therefore written to be <em>self-measuring</em>: the debug-level logging it adds must be enough, on its own, to judge whether that phase's algorithmic choice paid off from a cluster run's logs, without needing to attach a profiler.</p>
<h3 id="conventions-applied-to-every-phase-below">Conventions applied to every phase below</h3> <h3 id="conventions-applied-to-every-phase-below">Conventions applied to every phase below</h3>
<p><strong>Debug logging.</strong> Every phase that changes an algorithmic choice (not phase 0, which <em>is</em> the logging) adds <code>tracing::debug!</code>/<code>trace!</code> at points that let a cluster run's logs answer "did this help": counts, ratios, and timings that quantify the specific claim that phase makes — e.g. phase 3 must log how many MPHF <code>find</code> calls were saved by k-mer-level dedup (the whole justification for that phase), phase 4 must log per-column scan timings, phase 5 must log actual retained-memory / sparsity ratios achieved. Prefer one structured <code>debug!</code> per chunk (fields, not prose) over free-text — the cluster logs will be the only evidence available for judging these choices, so they need to be grep/awk-able, not just readable.</p> <p><strong>Debug logging.</strong> Every phase that changes an algorithmic choice (not phase 0, which <em>is</em> the logging) adds <code>tracing::debug!</code>/<code>trace!</code> at points that let a cluster run's logs answer "did this help": counts, ratios, and timings that quantify the specific claim that phase makes — e.g. phase 3 must log how many MPHF <code>find</code> calls were saved by k-mer-level dedup (the whole justification for that phase), phase 4 must log per-column scan timings, phase 5 must log actual retained-memory / sparsity ratios achieved. Prefer one structured <code>debug!</code> per chunk (fields, not prose) over free-text — the cluster logs will be the only evidence available for judging these choices, so they need to be grep/awk-able, not just readable.</p>
<p><strong>Unit tests.</strong> This project's convention (<code>obiread</code>, <code>obikseq</code>, <code>obidebruinj</code>, <code>obicompactvec</code>, <code>obikindex::layer</code>, <code>obiskio</code>, <code>obifastwrite</code>) is <code>#[cfg(test)] #[path = "tests/&lt;name&gt;.rs"] mod tests;</code> at the bottom of the source file, with the actual test code in a sibling <code>src/tests/&lt;name&gt;.rs</code>. Neither <code>obiskim</code> nor <code>obikindex::partition</code> (the two crates phases 3 and 5 touch most) currently have a <code>src/tests/</code> directory at all — this needs creating, following the existing pattern exactly, not inventing a new one.</p> <p><strong>Unit tests.</strong> This project's convention (<code>obiread</code>, <code>obikseq</code>, <code>obidebruinj</code>, <code>obicompactvec</code>, <code>obikindex::layer</code>, <code>obiskio</code>, <code>obifastwrite</code>) is <code>#[cfg(test)] #[path = "tests/&lt;name&gt;.rs"] mod tests;</code> at the bottom of the source file, with the actual test code in a sibling <code>src/tests/&lt;name&gt;.rs</code>. Neither <code>obikmer</code> nor <code>obikindex::partition</code> (the two crates phases 3 and 5 touch most) currently have a <code>src/tests/</code> directory at all — this needs creating, following the existing pattern exactly, not inventing a new one.</p>
<p><strong>Workflow (<code>jj</code>).</strong> Work happens in a fresh <code>jj</code> commit, easy to abandon. <code>jj new</code> between phases is reasonable where it helps isolate a phase for review, but only when the working copy compiles at that point (project convention) — phase 3's internal sub-steps (batch dedup change, then <code>query_layer.rs</code> split, then the new return shape) will likely not each compile independently since they're one coupled change, so treat "commit boundary" and "plan phase boundary" as related but not forced to match 1:1; use judgement per phase rather than mechanically splitting on every bullet.</p> <p><strong>Workflow (<code>jj</code>).</strong> Work happens in a fresh <code>jj</code> commit, easy to abandon. <code>jj new</code> between phases is reasonable where it helps isolate a phase for review, but only when the working copy compiles at that point (project convention) — phase 3's internal sub-steps (batch dedup change, then <code>query_layer.rs</code> split, then the new return shape) will likely not each compile independently since they're one coupled change, so treat "commit boundary" and "plan phase boundary" as related but not forced to match 1:1; use judgement per phase rather than mechanically splitting on every bullet.</p>
<h3 id="phase-0-instrumentation-prerequisite-for-measuring-every-later-phase">Phase 0 — Instrumentation (prerequisite for measuring every later phase)</h3> <h3 id="phase-0-instrumentation-prerequisite-for-measuring-every-later-phase">Phase 0 — Instrumentation (prerequisite for measuring every later phase)</h3>
<p><strong>Goal</strong>: make core utilization, throughput, and per-stage timing visible on a real run, so phases 1–5 can be justified with numbers instead of assumption.</p> <p><strong>Goal</strong>: make core utilization, throughput, and per-stage timing visible on a real run, so phases 1–5 can be justified with numbers instead of assumption.</p>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code>: wrap <code>run()</code>'s main loop with <code>obisys::Reporter</code>/<code>Stage::start("query")</code>/<code>.stop()</code>, printed at the end via <code>rep.print()</code> — same pattern as <code>index.rs</code>/<code>filter.rs</code>.</li> <li><code>obikmer/src/cmd/query.rs</code>: wrap <code>run()</code>'s main loop with <code>obisys::Reporter</code>/<code>Stage::start("query")</code>/<code>.stop()</code>, printed at the end via <code>rep.print()</code> — same pattern as <code>index.rs</code>/<code>filter.rs</code>.</li>
<li>Add an <code>obisys::spinner("query")</code> progress bar around the <code>pipe.apply(...)</code> loop, with an EMA throughput readout (bases/s or k-mers/s, mirroring <code>steps::scatter</code>'s <code>ema_rate</code> computation, <code>scatter.rs:88-118</code>) and live gauges for "chunks in flight" / "workers busy" — reuse the <code>AtomicU32</code> counter pattern from <code>scatter.rs</code> (<code>flat_active</code>, <code>transform_active</code>) rather than inventing a new one.</li> <li>Add an <code>obisys::spinner("query")</code> progress bar around the <code>pipe.apply(...)</code> loop, with an EMA throughput readout (bases/s or k-mers/s, mirroring <code>steps::scatter</code>'s <code>ema_rate</code> computation, <code>scatter.rs:88-118</code>) and live gauges for "chunks in flight" / "workers busy" — reuse the <code>AtomicU32</code> counter pattern from <code>scatter.rs</code> (<code>flat_active</code>, <code>transform_active</code>) rather than inventing a new one.</li>
<li>Add <code>max_open_files: Option&lt;usize&gt;</code> to <code>QueryArgs</code> and a <code>effective_max_open()</code> method mirroring <code>CommonArgs::effective_max_open()</code> (<code>obiskim/src/cli.rs:90-94</code>) — needed by phase 1's <code>throttle()</code> call. (<code>QueryArgs</code> can't just embed <code>CommonArgs</code> — it doesn't take <code>kmer_size</code>/<code>minimizer_size</code>/<code>partitions</code>/<code>level_max</code>/<code>theta</code> from the CLI, those come from the index metadata — so this is a small standalone addition, not a flatten.)</li> <li>Add <code>max_open_files: Option&lt;usize&gt;</code> to <code>QueryArgs</code> and a <code>effective_max_open()</code> method mirroring <code>CommonArgs::effective_max_open()</code> (<code>obikmer/src/cli.rs:90-94</code>) — needed by phase 1's <code>throttle()</code> call. (<code>QueryArgs</code> can't just embed <code>CommonArgs</code> — it doesn't take <code>kmer_size</code>/<code>minimizer_size</code>/<code>partitions</code>/<code>level_max</code>/<code>theta</code> from the CLI, those come from the index metadata — so this is a small standalone addition, not a flatten.)</li>
<li>Add one structured <code>debug!</code> per <code>process_chunk</code> call: chunk byte size, sequence count, s-mer count, wall time, and (once later phases exist) the fields they add — this single log line is the baseline every later phase's own logging gets compared against.</li> <li>Add one structured <code>debug!</code> per <code>process_chunk</code> call: chunk byte size, sequence count, s-mer count, wall time, and (once later phases exist) the fields they add — this single log line is the baseline every later phase's own logging gets compared against.</li>
<li><strong>Validation</strong>: none needed beyond "the numbers appear and look sane" — this phase changes no query logic or output.</li> <li><strong>Validation</strong>: none needed beyond "the numbers appear and look sane" — this phase changes no query logic or output.</li>
<li><strong>Deliverable used by every phase below</strong>: a before/after throughput and core-utilization measurement on the reference machine.</li> <li><strong>Deliverable used by every phase below</strong>: a before/after throughput and core-utilization measurement on the reference machine.</li>
@@ -2089,7 +1854,7 @@ Stage 2's output should be <code>HashMap&lt;genome_idx, Vec&lt;(seq_idx, positio
<h3 id="phase-1-parallel-per-file-io-fixes-root-cause-of-low-core-utilization">Phase 1 — Parallel per-file I/O (fixes root cause of low core utilization)</h3> <h3 id="phase-1-parallel-per-file-io-fixes-root-cause-of-low-core-utilization">Phase 1 — Parallel per-file I/O (fixes root cause of low core utilization)</h3>
<p><strong>Goal</strong>: file opening, decompression, and chunk-boundary parsing run across the <code>n_workers</code> pool instead of serially in the pipe's dedicated source thread.</p> <p><strong>Goal</strong>: file opening, decompression, and chunk-boundary parsing run across the <code>n_workers</code> pool instead of serially in the pipe's dedicated source thread.</p>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code>:</li> <li><code>obikmer/src/cmd/query.rs</code>:</li>
<li>Replace the <code>paths.into_iter().flat_map(read_sequence_chunks_sized(...))</code> construction (current <code>run()</code>, building <code>all_chunks</code>) with <code>obipipeline::throttle(paths.into_iter(), args.effective_max_open())</code>, passed as the pipe's <code>input</code>.</li> <li>Replace the <code>paths.into_iter().flat_map(read_sequence_chunks_sized(...))</code> construction (current <code>run()</code>, building <code>all_chunks</code>) with <code>obipipeline::throttle(paths.into_iter(), args.effective_max_open())</code>, passed as the pipe's <code>input</code>.</li>
<li>Add a new <code>QueryData::Path(PathBuf)</code> variant (alongside <code>Chunk</code>/<code>Output</code>) to carry the throttled path through the pipe's type-erasure mechanism.</li> <li>Add a new <code>QueryData::Path(PathBuf)</code> variant (alongside <code>Chunk</code>/<code>Output</code>) to carry the throttled path through the pipe's type-erasure mechanism.</li>
<li>Add a new <strong>first</strong> pipe stage, <code>Flat</code>/fallible (<code>||?</code>), modeled on <code>scatter.rs:60-86</code> and <code>superkmer.rs:54-65</code>: given a <code>Throttled&lt;PathBuf&gt;</code>, call <code>read_sequence_chunks_sized(path, chunk_bytes)</code> and yield each <code>Rope</code> chunk, keeping <code>pw.guard</code> alive until the file's iterator is exhausted (reuse or adapt <code>scatter.rs</code>'s <code>GuardedIter</code> wrapper — same lifetime problem, same fix).</li> <li>Add a new <strong>first</strong> pipe stage, <code>Flat</code>/fallible (<code>||?</code>), modeled on <code>scatter.rs:60-86</code> and <code>superkmer.rs:54-65</code>: given a <code>Throttled&lt;PathBuf&gt;</code>, call <code>read_sequence_chunks_sized(path, chunk_bytes)</code> and yield each <code>Rope</code> chunk, keeping <code>pw.guard</code> alive until the file's iterator is exhausted (reuse or adapt <code>scatter.rs</code>'s <code>GuardedIter</code> wrapper — same lifetime problem, same fix).</li>
@@ -2102,7 +1867,7 @@ Stage 2's output should be <code>HashMap&lt;genome_idx, Vec&lt;(seq_idx, positio
<h3 id="phase-2-genome-aware-chunk-size-formula-fixes-oom">Phase 2 — Genome-aware chunk-size formula (fixes OOM)</h3> <h3 id="phase-2-genome-aware-chunk-size-formula-fixes-oom">Phase 2 — Genome-aware chunk-size formula (fixes OOM)</h3>
<p><strong>Goal</strong>: <code>chunk_bytes</code> reflects actual per-chunk memory (<code>O(n_genomes)</code>), not a fixed multiplier.</p> <p><strong>Goal</strong>: <code>chunk_bytes</code> reflects actual per-chunk memory (<code>O(n_genomes)</code>), not a fixed multiplier.</p>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code>, <code>run()</code>: <code>n_genomes</code> and <code>args.detail</code> are already computed above the <code>chunk_bytes</code> calculation (<code>n_genomes</code> at the top of <code>run()</code>, before line 407 in the current file) — reorder if needed, then replace: <li><code>obikmer/src/cmd/query.rs</code>, <code>run()</code>: <code>n_genomes</code> and <code>args.detail</code> are already computed above the <code>chunk_bytes</code> calculation (<code>n_genomes</code> at the top of <code>run()</code>, before line 407 in the current file) — reorder if needed, then replace:
<div class="highlight"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">computed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">avail</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">n_workers</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">u64</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">16</span><span class="p">);</span> <div class="highlight"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">computed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">avail</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="p">(</span><span class="n">n_workers</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">u64</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="mi">16</span><span class="p">);</span>
</code></pre></div> </code></pre></div>
with a formula that scales the divisor by <code>n_genomes</code> (and roughly doubles it when <code>--detail</code> is set, since <code>cov</code> duplicates the per-genome accumulation): e.g. <code>per_chunk_multiplier = base_overhead + n_genomes as u64 * BYTES_PER_KMER_PER_GENOME * if detail { 2 } else { 1 }</code>, replacing the flat <code>16</code>. <code>BYTES_PER_KMER_PER_GENOME</code> should be derived from <code>KmerResults</code>'s actual layout (<code>4</code> bytes per <code>u32</code> entry in <code>data</code>, plus the <code>bool</code> in <code>in_index</code>, plus <code>win_min</code>'s equal-sized buffer) rather than guessed.</li> with a formula that scales the divisor by <code>n_genomes</code> (and roughly doubles it when <code>--detail</code> is set, since <code>cov</code> duplicates the per-genome accumulation): e.g. <code>per_chunk_multiplier = base_overhead + n_genomes as u64 * BYTES_PER_KMER_PER_GENOME * if detail { 2 } else { 1 }</code>, replacing the flat <code>16</code>. <code>BYTES_PER_KMER_PER_GENOME</code> should be derived from <code>KmerResults</code>'s actual layout (<code>4</code> bytes per <code>u32</code> entry in <code>data</code>, plus the <code>bool</code> in <code>in_index</code>, plus <code>win_min</code>'s equal-sized buffer) rather than guessed.</li>
@@ -2114,7 +1879,7 @@ Stage 2's output should be <code>HashMap&lt;genome_idx, Vec&lt;(seq_idx, positio
<h3 id="phase-3-k-mer-level-dereplication-staged-mphfmatrix-lookup">Phase 3 — K-mer-level dereplication, staged MPHF/matrix lookup</h3> <h3 id="phase-3-k-mer-level-dereplication-staged-mphfmatrix-lookup">Phase 3 — K-mer-level dereplication, staged MPHF/matrix lookup</h3>
<p><strong>Goal</strong>: replace superkmer-level dedup with k-mer-level dedup (roadmap point 5), and split the fused MPHF-find/matrix-fetch (point 4) so stage 1's output is bucketed by layer and MPHF slot (point 6).</p> <p><strong>Goal</strong>: replace superkmer-level dedup with k-mer-level dedup (roadmap point 5), and split the fused MPHF-find/matrix-fetch (point 4) so stage 1's output is bucketed by layer and MPHF slot (point 6).</p>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code>:</li> <li><code>obikmer/src/cmd/query.rs</code>:</li>
<li>Replace <code>QueryBatch::from_records</code>'s dedup map (<code>HashMap&lt;RoutableSuperKmer, Vec&lt;SKDesc&gt;&gt;</code>, current <code>query.rs:112</code>) with a per-partition <code>HashMap&lt;CanonicalKmer, Vec&lt;(seq_idx: u32, pos: u32)&gt;&gt;</code>, built in the same <code>SuperKmerIter</code> pass: superkmer construction and partition routing (<code>part_idx</code> from the superkmer's minimizer hash) are unchanged, only the granularity of what gets deduplicated changes — each <code>CanonicalKmer</code> within a superkmer is inserted individually instead of the whole superkmer being the dedup key.</li> <li>Replace <code>QueryBatch::from_records</code>'s dedup map (<code>HashMap&lt;RoutableSuperKmer, Vec&lt;SKDesc&gt;&gt;</code>, current <code>query.rs:112</code>) with a per-partition <code>HashMap&lt;CanonicalKmer, Vec&lt;(seq_idx: u32, pos: u32)&gt;&gt;</code>, built in the same <code>SuperKmerIter</code> pass: superkmer construction and partition routing (<code>part_idx</code> from the superkmer's minimizer hash) are unchanged, only the granularity of what gets deduplicated changes — each <code>CanonicalKmer</code> within a superkmer is inserted individually instead of the whole superkmer being the dedup key.</li>
<li><strong>Verified</strong>: <code>CanonicalKmer</code> (<code>obikseq/src/kmer.rs:390</code>, <code>pub type CanonicalKmer = CanonicalKmerOf&lt;KLen&gt;</code>) — the underlying <code>CanonicalKmerOf&lt;L&gt;</code> derives <code>Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash</code> (<code>kmer.rs:269</code>). Usable as a <code>HashMap</code>/<code>HashSet</code> key as-is, no change needed.</li> <li><strong>Verified</strong>: <code>CanonicalKmer</code> (<code>obikseq/src/kmer.rs:390</code>, <code>pub type CanonicalKmer = CanonicalKmerOf&lt;KLen&gt;</code>) — the underlying <code>CanonicalKmerOf&lt;L&gt;</code> derives <code>Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash</code> (<code>kmer.rs:269</code>). Usable as a <code>HashMap</code>/<code>HashSet</code> key as-is, no change needed.</li>
<li><code>obikindex/src/partition/query_layer.rs</code>:</li> <li><code>obikindex/src/partition/query_layer.rs</code>:</li>
@@ -2123,14 +1888,14 @@ Stage 2's output should be <code>HashMap&lt;genome_idx, Vec&lt;(seq_idx, positio
<li>New return shape for the partition-level query, replacing today's <code>on_hit(sk_idx, kmer_idx, row)</code> callback: <code>HashMap&lt;layer_idx, HashMap&lt;slot, Vec&lt;(seq_idx, pos)&gt;&gt;&gt;</code> (roadmap point 6) — built directly from the k-mer dedup map's <code>Vec&lt;(seq_idx,pos)&gt;</code> values, keyed by the resolved slot instead of the k-mer.</li> <li>New return shape for the partition-level query, replacing today's <code>on_hit(sk_idx, kmer_idx, row)</code> callback: <code>HashMap&lt;layer_idx, HashMap&lt;slot, Vec&lt;(seq_idx, pos)&gt;&gt;&gt;</code> (roadmap point 6) — built directly from the k-mer dedup map's <code>Vec&lt;(seq_idx,pos)&gt;</code> values, keyed by the resolved slot instead of the k-mer.</li>
<li><strong>This phase alone has no throughput benefit yet</strong> (matrix fetch still happens, just deferred) beyond the k-mer-level dedup itself (fewer MPHF calls when queries have overlapping/repeated k-mers) — its purpose is to produce the input phase 4 needs. Land phase 3+4 together, not phase 3 alone, per the "don't split 3–5 across releases" note above.</li> <li><strong>This phase alone has no throughput benefit yet</strong> (matrix fetch still happens, just deferred) beyond the k-mer-level dedup itself (fewer MPHF calls when queries have overlapping/repeated k-mers) — its purpose is to produce the input phase 4 needs. Land phase 3+4 together, not phase 3 alone, per the "don't split 3–5 across releases" note above.</li>
<li>Log, per chunk: total k-mer occurrences vs. unique <code>CanonicalKmer</code> count (the dedup ratio — the entire justification for this phase) and the resulting MPHF <code>find</code> call count. If the dedup ratio is close to <code>1.0</code> on real query data (little redundancy), that's the cluster run telling us this phase wasn't worth it — the logging needs to be able to say that, not just confirm the happy path.</li> <li>Log, per chunk: total k-mer occurrences vs. unique <code>CanonicalKmer</code> count (the dedup ratio — the entire justification for this phase) and the resulting MPHF <code>find</code> call count. If the dedup ratio is close to <code>1.0</code> on real query data (little redundancy), that's the cluster run telling us this phase wasn't worth it — the logging needs to be able to say that, not just confirm the happy path.</li>
<li><strong>Unit tests</strong>: create <code>obiskim/src/cmd/tests/query.rs</code> (new <code>src/tests/</code> dir for this crate, following the project's <code>#[cfg(test)] #[path = "tests/query.rs"] mod tests;</code> convention) and <code>obikindex/src/partition/tests/query_layer.rs</code> (likewise new for this crate). Cover: the k-mer-level dedup map construction on synthetic sequences with known repeated/overlapping k-mers (assert unique-kmer count and occurrence lists); the <code>find_slot</code>/bucket-by-layer-and-slot construction against a small hand-built <code>QueryLayer</code> fixture, asserting the <code>(layer_idx, slot, seq_idx, pos)</code> tuples match what the old per-occurrence loop would have produced.</li> <li><strong>Unit tests</strong>: create <code>obikmer/src/cmd/tests/query.rs</code> (new <code>src/tests/</code> dir for this crate, following the project's <code>#[cfg(test)] #[path = "tests/query.rs"] mod tests;</code> convention) and <code>obikindex/src/partition/tests/query_layer.rs</code> (likewise new for this crate). Cover: the k-mer-level dedup map construction on synthetic sequences with known repeated/overlapping k-mers (assert unique-kmer count and occurrence lists); the <code>find_slot</code>/bucket-by-layer-and-slot construction against a small hand-built <code>QueryLayer</code> fixture, asserting the <code>(layer_idx, slot, seq_idx, pos)</code> tuples match what the old per-occurrence loop would have produced.</li>
</ul> </ul>
<h3 id="phase-4-column-major-matrix-fetch-roadmap-points-78-implemented-numa-parallelism-deferred">Phase 4 — Column-major matrix fetch (roadmap points 7–8) — implemented, NUMA parallelism deferred</h3> <h3 id="phase-4-column-major-matrix-fetch-roadmap-points-78-implemented-numa-parallelism-deferred">Phase 4 — Column-major matrix fetch (roadmap points 7–8) — implemented, NUMA parallelism deferred</h3>
<p><strong>Goal (revised during implementation)</strong>: replace <code>fill_row</code>-per-hit (row-major, worst-case mmap locality) with a column-major scan. <code>PartitionRunner</code> turned out to be the wrong mechanism for this at this call granularity — see below; the column-major fetch itself is implemented and validated, without it.</p> <p><strong>Goal (revised during implementation)</strong>: replace <code>fill_row</code>-per-hit (row-major, worst-case mmap locality) with a column-major scan. <code>PartitionRunner</code> turned out to be the wrong mechanism for this at this call granularity — see below; the column-major fetch itself is implemented and validated, without it.</p>
<p><strong>What shipped:</strong> <p><strong>What shipped:</strong>
- <code>obicompactvec</code>: the per-column accessors this phase needed <strong>already existed</strong> — <code>PersistentCompactIntMatrix::col_view(c)</code> and <code>PersistentBitMatrix::col_view(c)</code> are public, and <code>IntSliceView::get(slot)</code>/<code>BitSliceView::get(slot)</code> are public — the original plan underestimated how much of this plumbing the pairwise-distance code (<code>dump</code>/<code>select</code>/<code>stats</code>) had already required. The one real gap: <code>PersistentBitMatrix::col_view()</code> panics on the <code>Implicit</code> variant (the documented mono-genome fast path, <code>bitmatrix.rs</code>). Added <code>PersistentBitMatrix::get(c, slot) -&gt; u32</code> (<code>bitmatrix.rs</code>), a non-panicking column-major point lookup that returns <code>1</code> for <code>Implicit</code> regardless of <code>c</code> — the smallest surface needed, not a new <code>col_get</code> API from scratch. - <code>obicompactvec</code>: the per-column accessors this phase needed <strong>already existed</strong> — <code>PersistentCompactIntMatrix::col_view(c)</code> and <code>PersistentBitMatrix::col_view(c)</code> are public, and <code>IntSliceView::get(slot)</code>/<code>BitSliceView::get(slot)</code> are public — the original plan underestimated how much of this plumbing the pairwise-distance code (<code>dump</code>/<code>select</code>/<code>stats</code>) had already required. The one real gap: <code>PersistentBitMatrix::col_view()</code> panics on the <code>Implicit</code> variant (the documented mono-genome fast path, <code>bitmatrix.rs</code>). Added <code>PersistentBitMatrix::get(c, slot) -&gt; u32</code> (<code>bitmatrix.rs</code>), a non-panicking column-major point lookup that returns <code>1</code> for <code>Implicit</code> regardless of <code>c</code> — the smallest surface needed, not a new <code>col_get</code> API from scratch.
- <code>obikindex/src/partition/query_layer.rs</code>: <code>query_partition_with</code> is now two explicit stages, matching roadmap points 6–8: <strong>stage 1</strong> (MPHF-only, per unique k-mer, bucket hits by <code>(layer_idx, slot)</code>, emits <code>QueryHit::Found</code>) then <strong>stage 2</strong> (per layer with ≥1 hit, column-major: for each genome column <code>g</code> in <code>0..layer.n_cols().min(n_genomes)</code>, scan that layer's bucketed slots and call <code>col_value(g, slot)</code>, emitting <code>QueryHit::Value(descs, g, value)</code> on nonzero). <code>QueryHit</code> is a single enum delivered through one <code>FnMut(QueryHit)</code> callback — an earlier two-closure design (<code>on_found</code> + <code>on_value</code>) didn't borrow-check, since the caller's single mutable accumulator (<code>KmerResults</code>) can't be captured by two separate <code>FnMut</code> closures passed to the same call. - <code>obikindex/src/partition/query_layer.rs</code>: <code>query_partition_with</code> is now two explicit stages, matching roadmap points 6–8: <strong>stage 1</strong> (MPHF-only, per unique k-mer, bucket hits by <code>(layer_idx, slot)</code>, emits <code>QueryHit::Found</code>) then <strong>stage 2</strong> (per layer with ≥1 hit, column-major: for each genome column <code>g</code> in <code>0..layer.n_cols().min(n_genomes)</code>, scan that layer's bucketed slots and call <code>col_value(g, slot)</code>, emitting <code>QueryHit::Value(descs, g, value)</code> on nonzero). <code>QueryHit</code> is a single enum delivered through one <code>FnMut(QueryHit)</code> callback — an earlier two-closure design (<code>on_found</code> + <code>on_value</code>) didn't borrow-check, since the caller's single mutable accumulator (<code>KmerResults</code>) can't be captured by two separate <code>FnMut</code> closures passed to the same call.
- <code>obiskim/src/cmd/query.rs</code>: <code>KmerResults::set</code> (row-major, whole-row-at-once) replaced by <code>mark_found</code> (stage 1: flag a position as indexed, independent of any genome's value) and <code>set_one</code> (stage 2: write one genome's value at one position). <code>QueryStats</code> extended with <code>n_columns_scanned</code>/<code>n_col_get_calls</code>, logged per chunk. - <code>obikmer/src/cmd/query.rs</code>: <code>KmerResults::set</code> (row-major, whole-row-at-once) replaced by <code>mark_found</code> (stage 1: flag a position as indexed, independent of any genome's value) and <code>set_one</code> (stage 2: write one genome's value at one position). <code>QueryStats</code> extended with <code>n_columns_scanned</code>/<code>n_col_get_calls</code>, logged per chunk.
- Total <code>get()</code>-equivalent calls are unchanged from the row-major version (<code>n_hits × n_cols</code> in the worst case, confirmed by <code>n_col_get_calls</code> in the debug log) — the win is locality (sequential access within one layer's column at a time, across <code>mmap</code>'d regions, instead of jumping across all columns per hit), exactly as predicted.</p> - Total <code>get()</code>-equivalent calls are unchanged from the row-major version (<code>n_hits × n_cols</code> in the worst case, confirmed by <code>n_col_get_calls</code> in the debug log) — the win is locality (sequential access within one layer's column at a time, across <code>mmap</code>'d regions, instead of jumping across all columns per hit), exactly as predicted.</p>
<p><strong>What did not ship, and why — <code>PartitionRunner</code> is architecturally the wrong tool here:</strong> <p><strong>What did not ship, and why — <code>PartitionRunner</code> is architecturally the wrong tool here:</strong>
Reading <code>obikindex/src/numa.rs</code>'s actual <code>run()</code> body (not just its doc comments) shows every call spawns a timer thread <strong>plus one OS thread per worker slot on every NUMA node</strong> (<code>std::thread::scope</code> + one <code>s.spawn()</code> per node per <code>max_workers</code>) — on the 192-core/8-NUMA reference machine, that's on the order of 190+ fresh OS threads spawned <strong>per call</strong>. This is fine for its actual, established usage in this codebase (<code>merge.rs</code>, <code>index.rs</code>'s <code>build_layers</code>): one <code>PartitionRunner::new()</code> + one <code>run()</code> call per command invocation, amortised over a batch of ~256 long-running partitions. It is not fine for <code>query</code>'s call pattern: <code>query_partition_with</code> runs once per <code>(chunk, partition)</code>, potentially thousands of times per second — spawning ~190 OS threads that often to scan a handful of genome columns would very likely cost far more than the row-major approach it's meant to replace. This is exactly the "resolve empirically, don't assume" composition risk the roadmap flagged, just resolved by reading the mechanism's actual cost before wiring it in, rather than by measuring a regression on the cluster after the fact. Reading <code>obikindex/src/numa.rs</code>'s actual <code>run()</code> body (not just its doc comments) shows every call spawns a timer thread <strong>plus one OS thread per worker slot on every NUMA node</strong> (<code>std::thread::scope</code> + one <code>s.spawn()</code> per node per <code>max_workers</code>) — on the 192-core/8-NUMA reference machine, that's on the order of 190+ fresh OS threads spawned <strong>per call</strong>. This is fine for its actual, established usage in this codebase (<code>merge.rs</code>, <code>index.rs</code>'s <code>build_layers</code>): one <code>PartitionRunner::new()</code> + one <code>run()</code> call per command invocation, amortised over a batch of ~256 long-running partitions. It is not fine for <code>query</code>'s call pattern: <code>query_partition_with</code> runs once per <code>(chunk, partition)</code>, potentially thousands of times per second — spawning ~190 OS threads that often to scan a handful of genome columns would very likely cost far more than the row-major approach it's meant to replace. This is exactly the "resolve empirically, don't assume" composition risk the roadmap flagged, just resolved by reading the mechanism's actual cost before wiring it in, rather than by measuring a regression on the cluster after the fact.
@@ -2142,14 +1907,14 @@ The column-major loop in stage 2 is therefore a <strong>plain sequential loop</s
<h3 id="phase-5-sparse-findere-rework-roadmap-point-9">Phase 5 — Sparse Findere rework (roadmap point 9)</h3> <h3 id="phase-5-sparse-findere-rework-roadmap-point-9">Phase 5 — Sparse Findere rework (roadmap point 9)</h3>
<p><strong>Goal</strong>: replace the dense <code>KmerResults</code>/<code>win_min</code> sliding-window scan with one operating on phase 4's sparse per-genome output.</p> <p><strong>Goal</strong>: replace the dense <code>KmerResults</code>/<code>win_min</code> sliding-window scan with one operating on phase 4's sparse per-genome output.</p>
<ul> <ul>
<li><code>obiskim/src/cmd/query.rs</code>, <code>process_chunk</code>:</li> <li><code>obikmer/src/cmd/query.rs</code>, <code>process_chunk</code>:</li>
<li>Remove <code>KmerResults</code> (<code>query.rs:157-202</code>) and the dense <code>win_min</code> allocation (<code>query.rs:290-291</code>, sized <code>max_n_kmers × n_genomes</code>).</li> <li>Remove <code>KmerResults</code> (<code>query.rs:157-202</code>) and the dense <code>win_min</code> allocation (<code>query.rs:290-291</code>, sized <code>max_n_kmers × n_genomes</code>).</li>
<li>Keep a lightweight dense <code>in_index: Vec&lt;bool&gt;</code> per chunk (sized <code>total_kmers</code>, independent of <code>n_genomes</code>) from phase 3's stage 1 — still needed for <code>kmer_missing</code> bookkeeping (leftmost-s-mer-of-window membership test), which phase 4's sparse structure doesn't carry (a k-mer with no genome hit has no entry there at all).</li> <li>Keep a lightweight dense <code>in_index: Vec&lt;bool&gt;</code> per chunk (sized <code>total_kmers</code>, independent of <code>n_genomes</code>) from phase 3's stage 1 — still needed for <code>kmer_missing</code> bookkeeping (leftmost-s-mer-of-window membership test), which phase 4's sparse structure doesn't carry (a k-mer with no genome hit has no entry there at all).</li>
<li>New per-<code>(seq_idx, genome)</code> scan: for each genome's <code>Vec&lt;(seq_idx, pos, count)&gt;</code> (sorted, per phase 4), group by <code>seq_idx</code> (contiguous after sort), then within each sequence's positions detect runs of <code>pos, pos+1, pos+2, ...</code> of length ≥ <code>z</code>; within each run, the existing monotone-deque window-minimum logic (<code>query.rs</code>'s current <code>dq</code> loop, conceptually unchanged) applies — but the deque now only scans real entries in the run, never zero-filled gaps.</li> <li>New per-<code>(seq_idx, genome)</code> scan: for each genome's <code>Vec&lt;(seq_idx, pos, count)&gt;</code> (sorted, per phase 4), group by <code>seq_idx</code> (contiguous after sort), then within each sequence's positions detect runs of <code>pos, pos+1, pos+2, ...</code> of length ≥ <code>z</code>; within each run, the existing monotone-deque window-minimum logic (<code>query.rs</code>'s current <code>dq</code> loop, conceptually unchanged) applies — but the deque now only scans real entries in the run, never zero-filled gaps.</li>
<li>Update <code>SeqAcc</code> accumulation and <code>emit_batch</code> to consume this per-genome sparse iteration instead of <code>results.val</code>/<code>results.is_in_index</code>.</li> <li>Update <code>SeqAcc</code> accumulation and <code>emit_batch</code> to consume this per-genome sparse iteration instead of <code>results.val</code>/<code>results.is_in_index</code>.</li>
<li><code>--detail</code>/<code>cov</code>: build sparsely during the same scan (only positions with a confirmed contribution get an entry), densify into the <code>[u32]</code> JSON array only in <code>emit_batch</code>, only for genomes/sequences actually being serialized (per roadmap point 9's note, <code>query.rs:304-308</code>'s current dense allocation goes away).</li> <li><code>--detail</code>/<code>cov</code>: build sparsely during the same scan (only positions with a confirmed contribution get an entry), densify into the <code>[u32]</code> JSON array only in <code>emit_batch</code>, only for genomes/sequences actually being serialized (per roadmap point 9's note, <code>query.rs:304-308</code>'s current dense allocation goes away).</li>
<li>Log, per chunk: total sparse entries retained vs. what the old dense <code>KmerResults</code> would have allocated (<code>total_smers × n_genomes</code>) — the sparsity ratio is this phase's entire reason for existing, so it must be directly visible in the logs, not inferred from process RSS. Also log the run-detection stats (number of runs found, average run length) — a low average run length relative to <code>z</code> would mean most positions still fail to form a full window, worth knowing.</li> <li>Log, per chunk: total sparse entries retained vs. what the old dense <code>KmerResults</code> would have allocated (<code>total_smers × n_genomes</code>) — the sparsity ratio is this phase's entire reason for existing, so it must be directly visible in the logs, not inferred from process RSS. Also log the run-detection stats (number of runs found, average run length) — a low average run length relative to <code>z</code> would mean most positions still fail to form a full window, worth knowing.</li>
<li><strong>Unit tests</strong>: <code>obiskim/src/cmd/tests/query.rs</code> (extended from phase 3) — the property test described below is the primary deliverable here, not an afterthought; write it as an actual <code>#[test]</code> (or a small internal fuzz/property-style loop over randomized fixtures if a property-testing crate isn't already a dependency — check before adding one, per this project's dependency-approval rule) rather than a one-off manual comparison.</li> <li><strong>Unit tests</strong>: <code>obikmer/src/cmd/tests/query.rs</code> (extended from phase 3) — the property test described below is the primary deliverable here, not an afterthought; write it as an actual <code>#[test]</code> (or a small internal fuzz/property-style loop over randomized fixtures if a property-testing crate isn't already a dependency — check before adding one, per this project's dependency-approval rule) rather than a one-off manual comparison.</li>
<li><strong>Validation — this is the correctness-critical phase</strong>: property-test comparing old (dense, pre-phase-3) and new (sparse) implementations on the same randomized input/index fixtures, asserting identical <code>kmer_count</code>, <code>kmer_missing</code>, <code>kmer_strict_matches</code>, and (with <code>--detail</code>) <code>coverage</code> for every sequence. Keep both implementations compiled side by side (behind a debug-only flag or a temporary parallel code path) only for the duration of this validation; delete the dense path once parity is confirmed — per this project's own convention, superseded code is not kept "just in case."</li> <li><strong>Validation — this is the correctness-critical phase</strong>: property-test comparing old (dense, pre-phase-3) and new (sparse) implementations on the same randomized input/index fixtures, asserting identical <code>kmer_count</code>, <code>kmer_missing</code>, <code>kmer_strict_matches</code>, and (with <code>--detail</code>) <code>coverage</code> for every sequence. Keep both implementations compiled side by side (behind a debug-only flag or a temporary parallel code path) only for the duration of this validation; delete the dense path once parity is confirmed — per this project's own convention, superseded code is not kept "just in case."</li>
<li><strong>Update <code>docmd/architecture/query.md</code> itself</strong>: once this phase lands, the "Findere z-window filter" section (which currently — correctly — describes the dense deque-over-<code>0..n_smers</code> scan) needs another pass to describe the sparse run-detection algorithm instead, as already flagged when this phase was discussed.</li> <li><strong>Update <code>docmd/architecture/query.md</code> itself</strong>: once this phase lands, the "Findere z-window filter" section (which currently — correctly — describes the dense deque-over-<code>0..n_smers</code> scan) needs another pass to describe the sparse run-detection algorithm instead, as already flagged when this phase was discussed.</li>
</ul> </ul>
@@ -2158,7 +1923,7 @@ The column-major loop in stage 2 is therefore a <strong>plain sequential loop</s
- New <code>sparse_findere_for_genome(hits, z, presence, threshold) -&gt; (Vec&lt;ConfirmedHit&gt;, n_runs, total_run_len)</code> (<code>query.rs</code>): sorts one genome's raw hits by <code>(seq_idx, pos)</code>, detects maximal runs of consecutive <code>pos</code> within one sequence, runs the same monotone-deque window-minimum as before but scoped to each run (run-relative indices for eviction, absolute <code>pos</code> for computing <code>pos_out</code>). Presence/count adjustment (<code>u32::from(win_min &gt;= threshold)</code> vs. raw) is applied inside this function, once per confirmed hit, rather than later during accumulation. - New <code>sparse_findere_for_genome(hits, z, presence, threshold) -&gt; (Vec&lt;ConfirmedHit&gt;, n_runs, total_run_len)</code> (<code>query.rs</code>): sorts one genome's raw hits by <code>(seq_idx, pos)</code>, detects maximal runs of consecutive <code>pos</code> within one sequence, runs the same monotone-deque window-minimum as before but scoped to each run (run-relative indices for eviction, absolute <code>pos</code> for computing <code>pos_out</code>). Presence/count adjustment (<code>u32::from(win_min &gt;= threshold)</code> vs. raw) is applied inside this function, once per confirmed hit, rather than later during accumulation.
- <code>process_chunk</code> restructured into three passes after the partition loop: (1) run <code>sparse_findere_for_genome</code> per genome, collecting <code>confirmed_by_genome</code> and run-detection stats; (2) accumulate <code>genome_totals</code> directly from <code>confirmed_by_genome</code> and mark a <code>confirmed_any: Vec&lt;bool&gt;</code> (sized <code>total_kmers_out</code>, not <code>× n_genomes</code>); (3) a position-only pass (<code>O(total_kmers_out)</code>, no genome factor) computing <code>kmer_count</code>/<code>kmer_missing</code> from <code>confirmed_any</code> + <code>SmerIndex</code>. <code>cov</code> (<code>--detail</code>) is populated by re-scanning <code>confirmed_by_genome</code> — only when <code>--detail</code> is actually set, otherwise skipped entirely. - <code>process_chunk</code> restructured into three passes after the partition loop: (1) run <code>sparse_findere_for_genome</code> per genome, collecting <code>confirmed_by_genome</code> and run-detection stats; (2) accumulate <code>genome_totals</code> directly from <code>confirmed_by_genome</code> and mark a <code>confirmed_any: Vec&lt;bool&gt;</code> (sized <code>total_kmers_out</code>, not <code>× n_genomes</code>); (3) a position-only pass (<code>O(total_kmers_out)</code>, no genome factor) computing <code>kmer_count</code>/<code>kmer_missing</code> from <code>confirmed_any</code> + <code>SmerIndex</code>. <code>cov</code> (<code>--detail</code>) is populated by re-scanning <code>confirmed_by_genome</code> — only when <code>--detail</code> is actually set, otherwise skipped entirely.
- Debug log added (<code>"sparse Findere"</code>): <code>n_dense_would_be</code> (<code>n_occurrences × n_genomes</code> — what the deleted dense path would have allocated), <code>n_sparse_entries</code> (what's actually retained), <code>n_runs</code>/<code>avg_run_len</code> (per the plan's ask, to see whether hits mostly fail to form complete windows). - Debug log added (<code>"sparse Findere"</code>): <code>n_dense_would_be</code> (<code>n_occurrences × n_genomes</code> — what the deleted dense path would have allocated), <code>n_sparse_entries</code> (what's actually retained), <code>n_runs</code>/<code>avg_run_len</code> (per the plan's ask, to see whether hits mostly fail to form complete windows).
- <strong>Unit tests</strong>: <code>sparse_findere_matches_dense_reference_on_random_inputs</code> (<code>obiskim/src/cmd/tests/query.rs</code>) — 200 randomized cases (sequence count/length, <code>z</code>, presence/count mode, threshold, hit density from sparse to fully-dense) comparing <code>sparse_findere_for_genome</code> against <code>dense_reference_findere</code>, a faithful reimplementation of the deleted dense algorithm kept only as a test-local correctness oracle (no property-testing crate added — checked first, none was a workspace dependency; a small <code>std</code>-only xorshift64 PRNG stands in for one, deterministic and dependency-free). All 200 cases pass. - <strong>Unit tests</strong>: <code>sparse_findere_matches_dense_reference_on_random_inputs</code> (<code>obikmer/src/cmd/tests/query.rs</code>) — 200 randomized cases (sequence count/length, <code>z</code>, presence/count mode, threshold, hit density from sparse to fully-dense) comparing <code>sparse_findere_for_genome</code> against <code>dense_reference_findere</code>, a faithful reimplementation of the deleted dense algorithm kept only as a test-local correctness oracle (no property-testing crate added — checked first, none was a workspace dependency; a small <code>std</code>-only xorshift64 PRNG stands in for one, deterministic and dependency-free). All 200 cases pass.
- <strong>Functional validation performed</strong>: full workspace build + <code>cargo test --workspace</code>, zero failures. End-to-end against real indexes: baseline output (no flags) unchanged from pre-phase-5 recorded values on the same fixtures; <code>--count-missing</code> correct (<code>kmer_missing: 0</code> on a self-match); <code>--detail</code> correct — coverage array length matches <code>kmer_count</code>, and critically, re-ran the two-genome cross-contamination check from phase 4 with <code>--detail --count-missing</code>: <code>genomeA</code> reads show coverage sum <code>106</code> for <code>genomeA</code> and <code>0</code> for <code>genomeB</code> (and vice versa) — confirms the sparse-to-dense <code>cov</code> reconstruction doesn't leak across genomes either, not just the scalar <code>kmer_strict_matches</code> path. - <strong>Functional validation performed</strong>: full workspace build + <code>cargo test --workspace</code>, zero failures. End-to-end against real indexes: baseline output (no flags) unchanged from pre-phase-5 recorded values on the same fixtures; <code>--count-missing</code> correct (<code>kmer_missing: 0</code> on a self-match); <code>--detail</code> correct — coverage array length matches <code>kmer_count</code>, and critically, re-ran the two-genome cross-contamination check from phase 4 with <code>--detail --count-missing</code>: <code>genomeA</code> reads show coverage sum <code>106</code> for <code>genomeA</code> and <code>0</code> for <code>genomeB</code> (and vice versa) — confirms the sparse-to-dense <code>cov</code> reconstruction doesn't leak across genomes either, not just the scalar <code>kmer_strict_matches</code> path.
- This phase's roadmap item ("update the Findere z-window filter section") — done, see above; the "Algorithm" section's pseudocode was also updated, since it still named <code>KmerResults</code>/<code>SKDesc</code> from before phases 3–4.</p> - This phase's roadmap item ("update the Findere z-window filter section") — done, see above; the "Algorithm" section's pseudocode was also updated, since it still named <code>KmerResults</code>/<code>SKDesc</code> from before phases 3–4.</p>
<h3 id="phase-6-parallel-gzip-decompression-independent-optional">Phase 6 — Parallel gzip decompression (independent, optional)</h3> <h3 id="phase-6-parallel-gzip-decompression-independent-optional">Phase 6 — Parallel gzip decompression (independent, optional)</h3>
@@ -2169,101 +1934,6 @@ The column-major loop in stage 2 is therefore a <strong>plain sequential loop</s
<li><strong><code>obicompactvec</code> API surface growth</strong> (phase 4): new public per-column accessors are additive (existing <code>fill_row</code>/<code>row</code> stay for other callers — <code>dump</code>, <code>select</code>, distance computations) — no breaking change expected, but worth checking <code>obicompactvec</code>'s other callers aren't already relying on <code>fill_row</code> being the only/cheapest access path in a way that would make maintaining two access patterns (row-major and column-major) a real maintenance cost rather than a one-off addition.</li> <li><strong><code>obicompactvec</code> API surface growth</strong> (phase 4): new public per-column accessors are additive (existing <code>fill_row</code>/<code>row</code> stay for other callers — <code>dump</code>, <code>select</code>, distance computations) — no breaking change expected, but worth checking <code>obicompactvec</code>'s other callers aren't already relying on <code>fill_row</code> being the only/cheapest access path in a way that would make maintaining two access patterns (row-major and column-major) a real maintenance cost rather than a one-off addition.</li>
<li><strong><code>PersistentBitMatrix::Implicit</code>'s hardcoded <code>n_cols: 1</code> — resolved, not a bug.</strong> <code>LayerMeta</code>'s own doc comment (<code>obicompactvec/src/layer_meta.rs:1-9</code>) states it is written "alongside <code>mphf.bin</code>" and read by <code>PersistentBitMatrix::open</code> "to determine <code>n_rows</code> for <strong>the implicit (mono-genome presence/absence) case</strong>" — i.e. <code>Implicit</code> is a documented single-genome fast path (no presence matrix needed when there is trivially one genome), not a generic "no matrix built yet" fallback. <code>n_cols: 1</code> is correct by design for the case it's meant to handle. Phase 4's column loop is safe as planned — this was worth checking once, doesn't need further action.</li> <li><strong><code>PersistentBitMatrix::Implicit</code>'s hardcoded <code>n_cols: 1</code> — resolved, not a bug.</strong> <code>LayerMeta</code>'s own doc comment (<code>obicompactvec/src/layer_meta.rs:1-9</code>) states it is written "alongside <code>mphf.bin</code>" and read by <code>PersistentBitMatrix::open</code> "to determine <code>n_rows</code> for <strong>the implicit (mono-genome presence/absence) case</strong>" — i.e. <code>Implicit</code> is a documented single-genome fast path (no presence matrix needed when there is trivially one genome), not a generic "no matrix built yet" fallback. <code>n_cols: 1</code> is correct by design for the case it's meant to handle. Phase 4's column loop is safe as planned — this was worth checking once, doesn't need further action.</li>
</ul> </ul>
<h2 id="query-memory-partitionkmers-replaces-the-per-partition-hashmap-2026-10-15">Query memory: <code>PartitionKmers</code> replaces the per-partition <code>HashMap</code> (2026-10-15)</h2>
<p><strong>Problem.</strong> A full-size query (two ~450 MB fastq.gz of a skim against a 354 M-kmer index) reached <strong>74–81 GB RSS</strong> with the default 256 MiB chunk. Cause, read in <code>batch.rs</code>/<code>chunk.rs</code> and measured with the <code>by_partition memory retained</code> debug log: <code>QueryBatch::by_partition</code> was a <code>HashMap&lt;CanonicalKmer, Vec&lt;KmerDesc&gt;&gt;</code> per partition. On genomic reads almost every k-mer is unique (12.5 M unique for 13.5 M occurrences in a 48 MB chunk, a dedup of 8 %), so each k-mer paid a table slot, growth slack and its own heap <code>Vec</code>: <strong>889 MB per 48 MB chunk, ~71 bytes per unique k-mer, 18× the chunk size</strong> — the dominant term of the per-chunk memory, several chunks being in flight at once.</p>
<p><strong>Change.</strong> <code>obikquery::PartitionKmers</code>: occurrences collected as <code>(kmer, KmerDesc)</code> per partition, sorted by <code>(kmer, seq_idx, pos)</code> and stored as three flat arrays (unique k-mers, u32 offsets, descs). <code>query_partition_with</code> takes <code>&amp;PartitionKmers</code>; <code>QueryHit</code> already carried slices. Occurrence order per k-mer is unchanged (query order); no per-k-mer allocation.</p>
<p><strong>Measured</strong> (same inputs, release build, identical sorted output digests before and after):</p>
<table>
<thead>
<tr>
<th></th>
<th><code>by_partition</code> (48 MB chunk)</th>
<th>RSS, 2×48 MB chunks</th>
<th>RSS, full run (≈ 1 GB reads)</th>
<th>wall, full run</th>
</tr>
</thead>
<tbody>
<tr>
<td>before</td>
<td>889 MB</td>
<td>5.6 GB</td>
<td>73.7–80.7 GB</td>
<td>135–172 s (one 312 s outlier)</td>
</tr>
<tr>
<td>after</td>
<td>259 MB</td>
<td>4.1 GB</td>
<td><strong>28.2 GB</strong></td>
<td><strong>103 s</strong></td>
</tr>
</tbody>
</table>
<p>With <code>--chunk-size 4</code> the same small query peaks at 3.6 GB: that floor is the touched pages of the index itself, so after the change the remaining per-chunk anonymous memory is ≈ 6× the chunk size, below the formula's factor 12 (<code>BASE_OVERHEAD + 8·n_genomes</code>, still a conservative bound — left unchanged). The sort replaces hashing in <code>from_records</code> and was not slower (17.3 s vs 21.2 s on the small test).</p>
<p><strong>Side finding.</strong> The 256 MiB cap makes small inputs poorly parallel: the two 48 MB files above are two chunks, so two workers; with <code>--chunk-size 4</code> the same query takes 3.7 s instead of 17 s. Not changed here.</p>
<p><strong>Not verified.</strong> Prod-scale (192 workers × 256 MiB chunks in flight): the factor is now ≈ 6 instead of ≈ 21, but how many chunks are in flight at once on that machine was not observed.</p>
<h3 id="chunk-size-sweep-on-a-small-input-2026-10-15">Chunk size sweep on a small input (2026-10-15)</h3>
<p>Input: 2 × 48 MB decompressed fastq (200 000 reads each) against a 354 M-kmer single-genome index (4 partitions), 16 cores on AC power, 3 runs per size, sorted outputs identical (same md5) for every size:</p>
<table>
<thead>
<tr>
<th><code>--chunk-size</code> (MiB)</th>
<th>chunks</th>
<th>wall (s)</th>
<th>user CPU (s)</th>
<th>RSS (GB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>~50</td>
<td>2.5–2.6</td>
<td>25.0–25.3</td>
<td>3.2</td>
</tr>
<tr>
<td>4</td>
<td>~25</td>
<td>2.5–2.7</td>
<td>24.3–25.5</td>
<td>3.5</td>
</tr>
<tr>
<td>8</td>
<td>~12</td>
<td>2.5–2.7</td>
<td>23.6–26.1</td>
<td>4.1</td>
</tr>
<tr>
<td>16</td>
<td>~6</td>
<td>4.4</td>
<td>23.1–23.7</td>
<td>4.1</td>
</tr>
<tr>
<td>32</td>
<td>4</td>
<td>8.3</td>
<td>22.9–23.0</td>
<td>4.0</td>
</tr>
<tr>
<td>64 and 256 (default)</td>
<td>2</td>
<td>11.6–11.8</td>
<td>22.4–22.9</td>
<td>4.1</td>
</tr>
</tbody>
</table>
<p>Wall time follows the number of chunks (one worker per chunk) until it reaches the core count, then plateaus at ≈ total CPU / cores; total CPU is almost constant (≈ +10 % at 2 MiB, per-chunk fixed cost, here with 1 genome and 4 partitions). With the 256 MiB cap, <strong>any input below ≈ 16 × 256 MiB = 4 GiB decompressed leaves cores idle</strong>. A rule such as <code>chunk ≈ input_bytes / (workers × 2)</code> with a floor of 4–8 MiB would use all cores on small inputs — <strong>implemented, see below</strong>. Unmeasured: the per-chunk cost on an index with many genomes and 256 partitions, which could move the floor up.</p>
<h3 id="automatic-chunk-size-now-follows-the-input-size-2026-10-15">Automatic chunk size now follows the input size (2026-10-15)</h3>
<p><code>cmd/query/mod.rs</code>: when <code>--chunk-size</code> is not given, the memory-derived size (unchanged: <code>available RAM / (workers × overhead × 2)</code>, clamped to 4–256 MiB) is further capped by <code>estimated input bytes / (workers × 2)</code>, never below 4 MiB. The estimate is <code>obiread::estimated_decompressed_len</code>: the file length, ×3 when the magic bytes say gzip (≈ 2.8 measured on FASTQ), ×4 for bzip2/xz/zstd — a deliberately rough figure, detected from the magic bytes, not the extension. For stdin, URLs or unreadable files the size is unknown and the memory-derived size stands. An explicit <code>--chunk-size</code> still wins.</p>
<p>Measured (2 × 48 MB reads, 16 cores, AC power, outputs identical): single-genome index, 354 M kmers — default chunk 256 MiB → 4 MiB: <strong>11.4 s → 2.4 s</strong> (−79 %), CPU 22.3 → 26 s (+17 %), peak footprint 1.44 → 0.75 GB. On the 91-genome index the memory-derived size was already 4 MiB (overhead factor 4 + 8 × 91), so nothing changes there (5.1–5.7 s either way). Not measured: a large input (≈ 1 GB gz, whose estimate gives ≈ 95 MiB chunks instead of 256 MiB: more, smaller chunks, expected lower memory).</p>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Rebuild / filter — column-first design - obiskim</title> <title>Rebuild / filter — column-first design - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -19,7 +19,7 @@
<title>Invariant.refs - obiskim</title> <title>Invariant.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../implementation/filtering/" class="md-nav__link"> <a href="../../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -23,7 +23,7 @@
<title>Sequences - obiskim</title> <title>Sequences - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -758,34 +674,6 @@
<li class="md-nav__item">
<a href="../../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../../implementation/unitig_evidence/" class="md-nav__link">
@@ -982,62 +870,6 @@
<li class="md-nav__item">
<a href="../../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../../implementation/filtering/" class="md-nav__link"> <a href="../../../implementation/filtering/" class="md-nav__link">
@@ -1308,35 +1140,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
File diff suppressed because it is too large. Load diff
@@ -23,7 +23,7 @@
<title>Benchmark: query-path testing - obiskim</title> <title>Benchmark: query-path testing - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -984,62 +872,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1433,35 +1265,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1672,8 +1476,8 @@
<h1 id="benchmark-query-path-testing">Benchmark: query-path testing</h1> <h1 id="benchmark-query-path-testing">Benchmark: query-path testing</h1>
<p><code>benchmark/Makefile</code> exercises indexing, merge, and phylo distance <p><code>benchmark/Makefile</code> exercises indexing, merge, and phylo distance
reconstruction against simulated bacterial genomes. It now also covers reconstruction against simulated bacterial genomes. It now also covers
<code>obiskim query</code> — the read-matching path — and the sparse packed <code>obikmer query</code> — the read-matching path — and the sparse packed
presence-matrix format (<code>obiskim pack --sparse</code>), previously untested by presence-matrix format (<code>obikmer pack --sparse</code>), previously untested by
this pipeline.</p> this pipeline.</p>
<h2 id="motivation">Motivation</h2> <h2 id="motivation">Motivation</h2>
<ul> <ul>
@@ -1681,9 +1485,8 @@ this pipeline.</p>
by <code>verify_presence</code>/<code>verify_merge_presence</code>, which only check index by <code>verify_presence</code>/<code>verify_merge_presence</code>, which only check index
<em>content</em> against the <code>.npz</code> truth, never the query API.</li> <em>content</em> against the <code>.npz</code> truth, never the query API.</li>
<li><code>pack --sparse</code> produces a presence-matrix format documented (see <li><code>pack --sparse</code> produces a presence-matrix format documented (see
<a href="../obicompactvec/">obicompactvec.md</a>, "Sparse matrix formats") as faster <a href="../../architecture/siblings/">siblings.md</a>) as faster for single-row
for single-row access (query) and slower for column-oriented access access (query) and slower for column-oriented access (phylo <code>--metric</code>).
(phylo <code>--metric</code>).
<code>global_index_presence/</code> built by <code>merge_presence.sh</code> is always packed <code>global_index_presence/</code> built by <code>merge_presence.sh</code> is always packed
dense (packing is a stage inside <code>merge</code>, not a separate <code>pack</code> dense (packing is a stage inside <code>merge</code>, not a separate <code>pack</code>
invocation) — there was no dense/sparse regression check.</li> invocation) — there was no dense/sparse regression check.</li>
@@ -1707,7 +1510,7 @@ without duplicating the exhaustive per-specimen coverage
<code>verify_merge_presence</code> already provides across all <code>SPECIMENS</code>.</p> <code>verify_merge_presence</code> already provides across all <code>SPECIMENS</code>.</p>
<h2 id="sparse-global-index">Sparse global index</h2> <h2 id="sparse-global-index">Sparse global index</h2>
<p><code>global_index_presence_sparse/</code> is built by <code>pack_sparse.sh</code>: copy <p><code>global_index_presence_sparse/</code> is built by <code>pack_sparse.sh</code>: copy
<code>global_index_presence/</code> wholesale, then <code>obiskim pack --sparse</code> in place. <code>global_index_presence/</code> wholesale, then <code>obikmer pack --sparse</code> in place.
This works directly because <code>merge</code>'s pack stage (<code>merge.rs:252</code>, This works directly because <code>merge</code>'s pack stage (<code>merge.rs:252</code>,
<code>pack_matrices(false)</code>) keeps the per-genome column files on disk after <code>pack_matrices(false)</code>) keeps the per-genome column files on disk after
dense-packing — <code>pack_sparse_bit_matrix</code> (<code>obicompactvec/src/bitmatrix/sparse.rs:447</code>) dense-packing — <code>pack_sparse_bit_matrix</code> (<code>obicompactvec/src/bitmatrix/sparse.rs:447</code>)
@@ -1715,7 +1518,7 @@ reads those, is idempotent, and removes <code>matrix.pbmx</code> once the sparse
is written, so <code>Persistent::open</code> falls through to the sparse format is written, so <code>Persistent::open</code> falls through to the sparse format
afterward. No separate merge run needed.</p> afterward. No separate merge run needed.</p>
<h2 id="query-runs">Query runs</h2> <h2 id="query-runs">Query runs</h2>
<p><code>query_one.sh dense|sparse SPECIMEN</code> runs <code>obiskim query --count-missing</code> <p><code>query_one.sh dense|sparse SPECIMEN</code> runs <code>obikmer query --count-missing</code>
against <code>global_index_presence</code> or <code>global_index_presence_sparse</code>, output against <code>global_index_presence</code> or <code>global_index_presence_sparse</code>, output
gzipped to <code>query_{dense,sparse}/SPECIMEN.fasta.gz</code>, Reporter wall/RSS gzipped to <code>query_{dense,sparse}/SPECIMEN.fasta.gz</code>, Reporter wall/RSS
captured to <code>stats/query_{dense,sparse}/SPECIMEN.stats</code> (same captured to <code>stats/query_{dense,sparse}/SPECIMEN.stats</code> (same
@@ -19,7 +19,7 @@
<title>Chunkreader.refs - obiskim</title> <title>Chunkreader.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -90
View File
@@ -9,7 +9,7 @@
<link href="../pipeline/" rel="next"/> <link href="../pipeline/" rel="next"/>
<link href="../../assets/images/favicon.png" rel="icon"/> <link href="../../assets/images/favicon.png" rel="icon"/>
<meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/> <meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/>
<title>Chunk reader - obiskim</title> <title>Chunk reader - obikmer</title>
<link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/> <link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/>
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/> <link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback" rel="stylesheet"/>
@@ -29,7 +29,7 @@
</div> </div>
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav aria-label="Header" class="md-header__inner md-grid"> <nav aria-label="Header" class="md-header__inner md-grid">
<a aria-label="obiskim" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obiskim"> <a aria-label="obikmer" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg>
</a> </a>
<label class="md-header__button md-icon" for="__drawer"> <label class="md-header__button md-icon" for="__drawer">
@@ -39,7 +39,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -62,10 +62,10 @@
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0"> <nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a aria-label="obiskim" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obiskim"> <a aria-label="obikmer" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix=""> <ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"> <li class="md-nav__item">
@@ -172,18 +172,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/chance_sharing/">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span> </span>
</a> </a>
</li> </li>
@@ -196,30 +184,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/sibling_partition_unification/">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/pair_coverage_sampling/">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span> </span>
</a> </a>
</li> </li>
@@ -413,18 +377,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../mphf_batch_queries/">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span> </span>
</a> </a>
</li> </li>
@@ -509,30 +461,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../merge_mmap_audit/">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../merge_scaling/">
<span class="md-ellipsis">
Merge scaling (open)
</span> </span>
</a> </a>
</li> </li>
@@ -651,19 +579,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../architecture/hot_resume_memoization/">
<span class="md-ellipsis">
Hot resume and memoization
@@ -19,7 +19,7 @@
<title>Evidence elimination.refs - obiskim</title> <title>Evidence elimination.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1470,9 +1274,9 @@
<li><code>obikindex/src/layer/mphf_layer.rs</code> — build_approx_evidence(dir, b, z), find_approx()</li> <li><code>obikindex/src/layer/mphf_layer.rs</code> — build_approx_evidence(dir, b, z), find_approx()</li>
<li><code>obikindex/src/layer/meta.rs</code> — EvidenceKind::Approx { b, z }, LayerMeta</li> <li><code>obikindex/src/layer/meta.rs</code> — EvidenceKind::Approx { b, z }, LayerMeta</li>
<li><code>obikindex/src/reindex.rs</code> — KmerIndex::reindex(), conversion exact↔approx en place</li> <li><code>obikindex/src/reindex.rs</code> — KmerIndex::reindex(), conversion exact↔approx en place</li>
<li><code>obiskim/src/cmd/reindex.rs</code> — CLI reindex, options --approx, -z, --evidence-bits, --fp, --block-size</li> <li><code>obikmer/src/cmd/reindex.rs</code> — CLI reindex, options --approx, -z, --evidence-bits, --fp, --block-size</li>
<li><code>obiskim/src/cmd/index.rs</code> — resolve_approx_params(), options --approx, -z, --evidence-bits, --fp</li> <li><code>obikmer/src/cmd/index.rs</code> — resolve_approx_params(), options --approx, -z, --evidence-bits, --fp</li>
<li><code>obiskim/src/cmd/estimate.rs</code> — commande estimate (dry-run des paramètres)</li> <li><code>obikmer/src/cmd/estimate.rs</code> — commande estimate (dry-run des paramètres)</li>
</ul> </ul>
<h2 id="notes">Notes</h2> <h2 id="notes">Notes</h2>
<p>Ce document était à l'origine une discussion de design (4 approches). L'implémentation <p>Ce document était à l'origine une discussion de design (4 approches). L'implémentation
@@ -23,7 +23,7 @@
<title>Evidence elimination (discussion) - obiskim</title> <title>Evidence elimination (discussion) - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1119,62 +1007,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1433,35 +1265,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+18 -214
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../merge_scaling/"> <link rel="prev" href="../merge_parallelism/">
<link rel="next" href="../select/"> <link rel="next" href="../select/">
@@ -23,7 +23,7 @@
<title>Kmer filtering - obiskim</title> <title>Kmer filtering - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -984,62 +872,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active"> <li class="md-nav__item md-nav__item--active">
@@ -1556,35 +1388,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -2313,7 +2117,7 @@ mathematically equivalent for integer counts: <code>n / N &lt; F</code> ↔ <cod
<h2 id="examples">Examples</h2> <h2 id="examples">Examples</h2>
<p>Keep k-mers specific to <em>Betula nana</em> — present in at least 2 <em>B. nana</em> genomes <p>Keep k-mers specific to <em>Betula nana</em> — present in at least 2 <em>B. nana</em> genomes
and absent from every other genome in the index:</p> and absent from every other genome in the index:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2321,7 +2125,7 @@ and absent from every other genome in the index:</p>
</code></pre></div> </code></pre></div>
<p>Keep k-mers found in at least 2 <em>Betula nana</em> genomes and absent from all <p>Keep k-mers found in at least 2 <em>Betula nana</em> genomes and absent from all
other <em>Betula</em>:</p> other <em>Betula</em>:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2329,14 +2133,14 @@ other <em>Betula</em>:</p>
</code></pre></div> </code></pre></div>
<p>Use taxonomic paths — keep k-mers present in ≥ 50 % of the <em>Betula</em> clade <p>Use taxonomic paths — keep k-mers present in ≥ 50 % of the <em>Betula</em> clade
and in fewer than 10 % of everything outside <em>Betulaceae</em>:</p> and in fewer than 10 % of everything outside <em>Betulaceae</em>:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;taxon~/Betulaceae/Betula&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;taxon~/Betulaceae/Betula&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;taxon!~/Betulaceae&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;taxon!~/Betulaceae&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-frac<span class="w"> </span><span class="m">0</span>.5<span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-frac<span class="w"> </span><span class="m">0</span>.5<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--max-outgroup-frac<span class="w"> </span><span class="m">0</span>.1 <span class="w"> </span>--max-outgroup-frac<span class="w"> </span><span class="m">0</span>.1
</code></pre></div> </code></pre></div>
<p>Multiple outgroup predicates (OR): exclude k-mers present in <em>Alnus</em> or <em>Carpinus</em>:</p> <p>Multiple outgroup predicates (OR): exclude k-mers present in <em>Alnus</em> or <em>Carpinus</em>:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Alnus&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Alnus&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Carpinus&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;genus=Carpinus&quot;</span><span class="w"> </span><span class="se">\</span>
@@ -2344,21 +2148,21 @@ and in fewer than 10 % of everything outside <em>Betulaceae</em>:</p>
</code></pre></div> </code></pre></div>
<p>Noise-tolerant core — keep k-mers present in <em>all but one</em> ingroup genome <p>Noise-tolerant core — keep k-mers present in <em>all but one</em> ingroup genome
(<code>-1</code> = <code>n−1</code>) and absent from <em>all but one</em> of the outgroup:</p> (<code>-1</code> = <code>n−1</code>) and absent from <em>all but one</em> of the outgroup:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>src<span class="w"> </span>--output<span class="w"> </span>dst<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-count<span class="w"> </span>-1<span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-count<span class="w"> </span>-1<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--max-outgroup-count<span class="w"> </span>-1 <span class="w"> </span>--max-outgroup-count<span class="w"> </span>-1
</code></pre></div> </code></pre></div>
<p>To dump only k-mers specific to <em>Betula nana</em>:</p> <p>To dump only k-mers specific to <em>Betula nana</em>:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-count<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-count<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--max-outgroup-count<span class="w"> </span><span class="m">0</span> <span class="w"> </span>--max-outgroup-count<span class="w"> </span><span class="m">0</span>
</code></pre></div> </code></pre></div>
<p>To enumerate unitigs of the <em>Betula</em>-specific subgraph:</p> <p>To enumerate unitigs of the <em>Betula</em>-specific subgraph:</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>unitig<span class="w"> </span>myindex<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>unitig<span class="w"> </span>myindex<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;genus=Betula&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2369,14 +2173,14 @@ and in fewer than 10 % of everything outside <em>Betulaceae</em>:</p>
<p>Stops output after the first N k-mers that pass all active filters. <p>Stops output after the first N k-mers that pass all active filters.
Iteration terminates immediately — subsequent partitions and layers are not scanned. Iteration terminates immediately — subsequent partitions and layers are not scanned.
Useful for quick inspection of large indexes without loading the entire dataset.</p> Useful for quick inspection of large indexes without loading the entire dataset.</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span>--head<span class="w"> </span><span class="m">100</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span>--head<span class="w"> </span><span class="m">100</span>
obiskim<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span>--head<span class="w"> </span><span class="m">20</span><span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span>--min-count<span class="w"> </span><span class="m">1</span> obikmer<span class="w"> </span>dump<span class="w"> </span>myindex<span class="w"> </span>--head<span class="w"> </span><span class="m">20</span><span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span>--min-count<span class="w"> </span><span class="m">1</span>
</code></pre></div> </code></pre></div>
<h3 id="phylo-presence-threshold-n"><code>phylo --presence-threshold N</code></h3> <h3 id="phylo-presence-threshold-n"><code>phylo --presence-threshold N</code></h3>
<p>When computing Jaccard distance on a <strong>count index</strong>, a k-mer is considered present in a genome if its count is ≥ N (default 1). <p>When computing Jaccard distance on a <strong>count index</strong>, a k-mer is considered present in a genome if its count is ≥ N (default 1).
This option is independent of the <code>--presence-threshold</code> used in filtering.</p> This option is independent of the <code>--presence-threshold</code> used in filtering.</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Jaccard treating kmers with count ≥ 2 as present</span> <div class="highlight"><pre><span></span><code><span class="c1"># Jaccard treating kmers with count ≥ 2 as present</span>
obiskim<span class="w"> </span>phylo<span class="w"> </span>myindex<span class="w"> </span>--metric<span class="w"> </span>jaccard<span class="w"> </span>--presence-threshold<span class="w"> </span><span class="m">2</span> obikmer<span class="w"> </span>phylo<span class="w"> </span>myindex<span class="w"> </span>--metric<span class="w"> </span>jaccard<span class="w"> </span>--presence-threshold<span class="w"> </span><span class="m">2</span>
</code></pre></div> </code></pre></div>
<p>This parameter has no effect on presence/absence indexes (where values are already 0/1) or on metrics other than Jaccard.</p> <p>This parameter has no effect on presence/absence indexes (where values are already 0/1) or on metrics other than Jaccard.</p>
<h2 id="implementation">Implementation</h2> <h2 id="implementation">Implementation</h2>
@@ -2389,7 +2193,7 @@ obiskim<span class="w"> </span>phylo<span class="w"> </span>myindex<span class="
lookup and counter.</p> lookup and counter.</p>
</li> </li>
<li> <li>
<p><strong><code>obiskim::cmd::predicate::FilterArgs</code></strong> — shared <code>clap</code> argument group <p><strong><code>obikmer::cmd::predicate::FilterArgs</code></strong> — shared <code>clap</code> argument group
embedded via <code>#[command(flatten)]</code> in <code>FilterArgs</code>, <code>DumpArgs</code>, and embedded via <code>#[command(flatten)]</code> in <code>FilterArgs</code>, <code>DumpArgs</code>, and
<code>UnitigArgs</code>. <code>FilterArgs::build_filters()</code> returns a ready-to-use filter <code>UnitigArgs</code>. <code>FilterArgs::build_filters()</code> returns a ready-to-use filter
list.</p> list.</p>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Kmer.refs - obiskim</title> <title>Kmer.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -23,7 +23,7 @@
<title>Kmer - obiskim</title> <title>Kmer - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -895,34 +811,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1119,62 +1007,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1433,35 +1265,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -19,7 +19,7 @@
<title>Layer tier.refs - obiskim</title> <title>Layer tier.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -23,7 +23,7 @@
<title>obikindex layer tier - obiskim</title> <title>obikindex layer tier - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1358,62 +1246,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1672,35 +1504,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -2404,7 +2208,7 @@
<span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">sub_matrix</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">slots</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="p">[</span><span class="kt">usize</span><span class="p">])</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;&gt;</span> <span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">sub_matrix</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">slots</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="p">[</span><span class="kt">usize</span><span class="p">])</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;&gt;</span>
<span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">fill_sub_matrix</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">slots</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="p">[</span><span class="kt">usize</span><span class="p">],</span><span class="w"> </span><span class="n">out</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;</span><span class="p">])</span> <span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">fill_sub_matrix</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">slots</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="p">[</span><span class="kt">usize</span><span class="p">],</span><span class="w"> </span><span class="n">out</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="p">[</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;</span><span class="p">])</span>
</code></pre></div> </code></pre></div>
<p>Column-first to match the on-disk column-major layout. <code>fill_sub_matrix</code> sorts <code>slots</code> once, then calls each column's <code>fill_batch</code> in turn — no redundant per-column sort. On <code>PersistentSparseBitMatrix</code> (k-mer-major, no column method) this goes through <code>nonzero_iter</code> instead, decoding one row at a time; see <a href="../obicompactvec/">obicompactvec.md</a>, "Sparse matrix formats".</p> <p>Column-first to match the on-disk column-major layout. <code>fill_sub_matrix</code> sorts <code>slots</code> once, then calls each column's <code>fill_batch</code> in turn — no redundant per-column sort. On <code>PersistentSparseBitMatrix</code> (k-mer-major, no column method) this degrades to a row-by-row decode; see <a href="../../architecture/siblings/">siblings.md</a>.</p>
<hr /> <hr />
<h2 id="layeredstores-and-aggregation-traits">LayeredStore\&lt;S&gt; and aggregation traits</h2> <h2 id="layeredstores-and-aggregation-traits">LayeredStore\&lt;S&gt; and aggregation traits</h2>
<p><code>LayeredStore&lt;S&gt;</code> is a generic aggregation wrapper over <code>Vec&lt;S&gt;</code>. It propagates three traits from <code>obicompactvec::traits</code> up the hierarchy via blanket impls:</p> <p><code>LayeredStore&lt;S&gt;</code> is a generic aggregation wrapper over <code>Vec&lt;S&gt;</code>. It propagates three traits from <code>obicompactvec::traits</code> up the hierarchy via blanket impls:</p>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Merge.refs - obiskim</title> <title>Merge.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+41 -228
View File
@@ -23,7 +23,7 @@
<title>Merge command - obiskim</title> <title>Merge command - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1067,10 +955,10 @@
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#2-bootstrap-output-from-the-base-source" class="md-nav__link"> <a href="#2-bootstrap-output-from-first-source" class="md-nav__link">
<span class="md-ellipsis"> <span class="md-ellipsis">
2. Bootstrap output from the base source 2. Bootstrap output from first source
</span> </span>
</a> </a>
@@ -1202,62 +1090,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1516,35 +1348,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1726,10 +1530,10 @@
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#2-bootstrap-output-from-the-base-source" class="md-nav__link"> <a href="#2-bootstrap-output-from-first-source" class="md-nav__link">
<span class="md-ellipsis"> <span class="md-ellipsis">
2. Bootstrap output from the base source 2. Bootstrap output from first source
</span> </span>
</a> </a>
@@ -1837,7 +1641,7 @@
<h1 id="merge-command">Merge command</h1> <h1 id="merge-command">Merge command</h1>
<h2 id="purpose">Purpose</h2> <h2 id="purpose">Purpose</h2>
<p><code>obiskim merge</code> combines multiple existing kmer indexes into a single index. The result contains all kmers from all sources, with per-genome presence/absence or count data for every genome across every layer.</p> <p><code>obikmer merge</code> combines multiple existing kmer indexes into a single index. The result contains all kmers from all sources, with per-genome presence/absence or count data for every genome across every layer.</p>
<hr /> <hr />
<h2 id="modes">Modes</h2> <h2 id="modes">Modes</h2>
<div class="highlight"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="nc">MergeMode</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">Presence</span><span class="p">,</span><span class="w"> </span><span class="n">Count</span><span class="w"> </span><span class="p">}</span> <div class="highlight"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">enum</span><span class="w"> </span><span class="nc">MergeMode</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">Presence</span><span class="p">,</span><span class="w"> </span><span class="n">Count</span><span class="w"> </span><span class="p">}</span>
@@ -1892,29 +1696,38 @@
<h2 id="algorithm">Algorithm</h2> <h2 id="algorithm">Algorithm</h2>
<h3 id="1-validation">1. Validation</h3> <h3 id="1-validation">1. Validation</h3>
<p>Check all sources against the constraints above. Abort on any mismatch.</p> <p>Check all sources against the constraints above. Abort on any mismatch.</p>
<h3 id="2-bootstrap-output-from-the-base-source">2. Bootstrap output from the base source</h3> <h3 id="2-bootstrap-output-from-first-source">2. Bootstrap output from first source</h3>
<p>The base is chosen by <code>choose_base</code> (<code>merge.rs</code>): the source with the largest total <code>unitigs.bin</code> size (restricted to approximate-evidence sources when the output must be approximate). It is not necessarily <code>sources[0]</code>, and the genome columns follow the base first. Because <code>obiskim index</code> is not byte-reproducible (unitig segmentation varies), two near-equal sources can swap roles between runs. Its directory is copied to <code>output</code> (hard links for files <code>merge_partition</code> never rewrites, see below). Immediately after the copy:</p> <p>Recursive file copy of <code>sources[0]</code> → <code>output</code>. Immediately after the copy:</p>
<ul> <ul>
<li><code>index.meta</code> is rewritten with the final genome list (all sources, possibly renamed) and the effective evidence kind.</li> <li><code>index.meta</code> is rewritten with the final genome list (all sources, possibly renamed) and the effective evidence kind.</li>
<li>In <code>Presence</code> mode, any <code>counts/</code> directories inherited from source_0 are removed.</li> <li>In <code>Presence</code> mode, any <code>counts/</code> directories inherited from source_0 are removed.</li>
<li><code>spectrums/</code> from source_0 is removed and rebuilt from scratch across all sources, applying the (possibly renamed) labels.</li> <li><code>spectrums/</code> from source_0 is removed and rebuilt from scratch across all sources, applying the (possibly renamed) labels.</li>
</ul> </ul>
<p>This establishes the partition layout, all existing MPHFs, unitigs, and evidence files. The base source's genomes occupy columns 0 … <code>n_dst_genomes - 1</code> in the destination.</p> <p>This establishes the partition layout, all existing MPHFs, unitigs, and evidence files. The first source's genomes occupy columns 0 … <code>n_dst_genomes - 1</code> in the destination.</p>
<h3 id="3-for-each-subsequent-source-parallel-across-partitions">3. For each subsequent source (parallel across partitions)</h3> <h3 id="3-for-each-subsequent-source-parallel-across-partitions">3. For each subsequent source (parallel across partitions)</h3>
<p><code>obikmerge::partition_merge::merge_partition(dst, i, sources, mode, n_dst_genomes, block_bits, evidence)</code> runs once per partition index <code>i</code> (scheduled largest first by <code>PartitionRunner</code>). Each entry of <code>sources</code> is <code>(&amp;KmerIndex, n_genomes)</code>, where <code>n_genomes</code> is the number of columns that source contributes (&gt; 1 for an already-merged source). Code: <code>partition_merge/mod.rs</code> (orchestration, pass 1) and <code>partition_merge/pass2.rs</code> (per-group fill pipeline).</p> <p><code>KmerPartition::merge_partition(i, sources, mode, n_dst_genomes, block_bits)</code> is called for each partition index <code>i</code>. <code>block_bits</code> is taken from <code>dst.meta.config.block_bits</code>.</p>
<p><strong>First merge, Presence mode</strong>: when <code>n_dst_genomes == 1</code>, <code>TypedLayer::&lt;()&gt;::init_presence_matrix</code> is called on every existing dst layer first. It materialises the implicit single-genome matrix (<code>presence/col_000000.pbiv</code>, all true) so that source columns can be appended to it.</p> <p>Each entry in <code>sources</code> is <code>(&amp;KmerPartition, n_genomes)</code> where <code>n_genomes</code> is the column count that source contributes (&gt; 1 when the source is itself a merged index).</p>
<p>The dst layers are opened once per partition and shared by both passes.</p> <p><strong>First merge, Presence mode</strong>: when <code>n_dst_genomes == 1</code>, <code>Layer::&lt;()&gt;::init_presence_matrix</code> is called on every existing destination layer before any source column is appended. This creates <code>presence/col_000000.pbiv</code> set all-true (genome 0 is present in every slot).</p>
<p><strong>Pass 1 — new k-mers into a de Bruijn graph.</strong> Only the sources' <code>unitigs.bin</code> <em>paths</em> are needed (<code>KmerLayer::new(..).unitigs_path()</code>); no source layer is opened. The files are streamed (at most <code>max_open = 2</code> open at once), and every k-mer absent from all dst layers is pushed into one <code>GraphDeBruijn</code>. All new k-mers of all sources go into a <strong>single</strong> new layer per merge, built by <code>materialize_layer</code> (unitigs + MPHF + evidence).</p> <p><strong>Pass 1 — classify kmers</strong></p>
<p><strong>New-layer matrix.</strong> If a new layer exists, its matrix is created with <code>n_dst_genomes</code> absent columns (all zero/false) and closed immediately. This keeps the column-count invariant, and every source group then appends to it like to the existing layers.</p> <p>Iterate all kmers from all source partitions (via <code>UnitigFileReader</code> + canonical kmer iteration). For each kmer, probe the destination <code>LayeredMap&lt;()&gt;</code>:</p>
<p><strong>Pass 2 — by consecutive groups of <code>SRC_GROUP = 2</code> sources, in source order.</strong> Per group:</p> <ul>
<ol> <li><strong>Hit</strong>: kmer already in the destination; record for Pass 2.</li>
<li>open the group's source layers for this partition;</li> <li><strong>Miss</strong>: push kmer into a <code>GraphDeBruijn</code> accumulator.</li>
<li><code>MatrixBuilder::resume</code> every dst matrix (existing layers + new layer), check <code>n_cols == n_dst_genomes + col_base</code>, append the group's <code>group_n</code> columns;</li> </ul>
<li>run the pipeline: stream each source layer's k-mers, <code>hash_batch</code> + <code>fill_sub_matrix</code> on the source, locate each k-mer in the dst layers (<code>find_batch_grouped</code>) or else in the new layer's MPHF, and write the values column-major into the group's builders;</li> <p><strong>New layer construction</strong></p>
<li>close the columns, then the matrices; drop the group's layers; <code>col_base += group_n</code>.</li> <p>If the accumulator is non-empty, compute de Bruijn unitigs and call <code>Layer::&lt;()&gt;::build(&amp;new_layer_dir, block_bits)</code>. All kmers absent from the destination — across <strong>all</strong> sources — accumulate into a <strong>single</strong> graph, producing one new layer per merge operation (not one per source).</p>
</ol> <p><strong>Pass 2 — fill column builders</strong></p>
<p>Only one group's source layers and destination columns are alive at a time, so the number of live mappings per partition does not depend on the number of sources. Columns are appended in source order, so every genome lands in the same absolute column as in a single-session merge.</p> <p>For each source and each of its layers, re-iterate unitigs and look up stored values via <code>SrcLayerData::lookup(kmer, src_n)</code>:</p>
<p><strong>In-memory columns.</strong> The group's columns are built in RAM (<code>MatrixBuilder::add_mem_col</code> → <code>MemBitVecBuilder</code> / <code>MemCompactIntVecBuilder</code>) and written once, sequentially, at <code>close</code> (<code>.building</code> file, then <code>rename</code>). The files are byte-identical to the former mmap-backed builders' output. There is no sparse file and no <code>MmapMut</code> on this path, so a block the FS cannot allocate is an <code>io::Error</code> instead of a SIGBUS. Files are not <code>fsync</code>ed: one sync per column file made merge ~8× slower. RAM per partition is at most <code>SRC_GROUP × src_n × N_part × (1/8 | 1)</code> bytes (presence | counts). History and figures: <code>merge_mmap_audit.md</code>; scaling limits: <code>merge_scaling.md</code>.</p> <ul>
<li><code>SrcLayerData::SetMembership</code> — no data directory exists; every kmer returns <code>vec![1; n_genomes]</code></li>
<li><code>SrcLayerData::Presence</code> — reads <code>PersistentBitMatrix</code> from <code>presence/</code></li>
<li><code>SrcLayerData::Count</code> — reads <code>PersistentCompactIntMatrix</code> from <code>counts/</code></li>
</ul>
<p>Hits are routed to <code>exist_builders[dst_layer][src_col]</code>; misses are routed to <code>new_src_builders[src_col]</code>.</p>
<p><strong>Column prepending for new layers</strong></p>
<p>Before source columns are written to the new layer, <code>n_dst_genomes</code> absent columns (all-zero / all-false) are prepended — one per genome already in the index — so the column count invariant holds immediately after layer creation.</p>
<p><strong>Close and update metadata</strong></p>
<p>Close all builders; update <code>presence/meta.json</code> or <code>counts/meta.json</code> with <code>{"n": N, "n_cols": n_dst_genomes + n_src_total}</code>; increment <code>PartitionMeta::n_layers</code> if a new layer was added.</p>
<h3 id="4-update-index-metadata">4. Update index metadata</h3> <h3 id="4-update-index-metadata">4. Update index metadata</h3>
<p><code>index.meta</code> was already written during bootstrap with the complete genome list and evidence kind. No further update is needed after the partition loop.</p> <p><code>index.meta</code> was already written during bootstrap with the complete genome list and evidence kind. No further update is needed after the partition loop.</p>
<hr /> <hr />
@@ -1928,13 +1741,13 @@
<span class="w"> </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">append_genome_column</span><span class="p">(</span><span class="n">layer_dir</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="nc">Path</span><span class="p">,</span><span class="w"> </span><span class="n">value_of</span><span class="p">:</span><span class="w"> </span><span class="nc">impl</span><span class="w"> </span><span class="nb">Fn</span><span class="p">(</span><span class="kt">usize</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nc">OLMResult</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span> <span class="w"> </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">append_genome_column</span><span class="p">(</span><span class="n">layer_dir</span><span class="p">:</span><span class="w"> </span><span class="kp">&amp;</span><span class="nc">Path</span><span class="p">,</span><span class="w"> </span><span class="n">value_of</span><span class="p">:</span><span class="w"> </span><span class="nc">impl</span><span class="w"> </span><span class="nb">Fn</span><span class="p">(</span><span class="kt">usize</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="kt">bool</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nc">OLMResult</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre></div> </code></pre></div>
<p>Each appends one column file to the matrix subdirectory (<code>counts/</code> or <code>presence/</code>). In <code>merge_partition</code>, columns are written through <code>MatrixBuilder::add_mem_col</code> (in-memory builders) rather than through these helpers, but the invariant they enforce is the same.</p> <p>Each appends one column file to the matrix subdirectory (<code>counts/</code> or <code>presence/</code>). In <code>merge_partition</code>, columns are written directly via <code>PersistentBitVecBuilder</code> / <code>PersistentCompactIntVecBuilder</code> rather than through these helpers, but the invariant they enforce is the same.</p>
<hr /> <hr />
<h2 id="column-count-invariant">Column count invariant</h2> <h2 id="column-count-invariant">Column count invariant</h2>
<p>After any merge, <strong>every layer in every partition has exactly <code>n_genomes</code> columns</strong>, where <code>n_genomes</code> is the total genome count in the index at that point.</p> <p>After any merge, <strong>every layer in every partition has exactly <code>n_genomes</code> columns</strong>, where <code>n_genomes</code> is the total genome count in the index at that point.</p>
<p>Maintained by three mechanisms:</p> <p>Maintained by three mechanisms:</p>
<ol> <ol>
<li><strong>Existing layers</strong>: <code>n_src_total</code> columns appended (one per source genome), group by group.</li> <li><strong>Existing layers</strong>: <code>n_src_total</code> columns appended (one per source genome).</li>
<li><strong>New layers created during merge</strong>: <code>n_dst_genomes</code> absent columns prepended before source columns.</li> <li><strong>New layers created during merge</strong>: <code>n_dst_genomes</code> absent columns prepended before source columns.</li>
<li><strong>First merge, Presence mode</strong>: <code>init_presence_matrix</code> retroactively creates <code>presence/col_0</code> all-true for genome 0.</li> <li><strong>First merge, Presence mode</strong>: <code>init_presence_matrix</code> retroactively creates <code>presence/col_0</code> all-true for genome 0.</li>
</ol> </ol>
@@ -1973,7 +1786,7 @@
</table> </table>
<hr /> <hr />
<h2 id="on-disk-impact">On-disk impact</h2> <h2 id="on-disk-impact">On-disk impact</h2>
<p>After merging <code>G</code> genomes (sources_0 contributes <code>G0</code>, subsequent sources the rest), <em>before</em> <code>finalize</code> packs each matrix (sparse by default, <code>matrix.pbmx</code> with <code>--dense</code>):</p> <p>After merging <code>G</code> genomes (sources_0 contributes <code>G0</code>, subsequent sources the rest):</p>
<div class="highlight"><pre><span></span><code>partitions/ <div class="highlight"><pre><span></span><code>partitions/
part_00000/ part_00000/
index/ index/
@@ -2006,7 +1819,7 @@ index.meta ← complete genome list + evidence kind written at
</code></pre></div> </code></pre></div>
<p><code>mphf.bin</code>/<code>unitigs.bin</code>/<code>evidence.bin</code>/<code>unitigs.bin.idx</code>/<code>fingerprint.bin</code>/<code>layer_meta.json</code> marked "unchanged" above are hard-linked from the base source's own files during the bootstrap copy (2026-08-28), not copied — <code>merge_partition</code> never rewrites them for pre-existing layers, only the <code>presence</code>/<code>counts</code> subdirectory gets widened in place, so only that subdirectory is a real, independent copy. Falls back to a real copy per file if linking itself fails (different filesystems). Verified: source files are byte-identical (checksummed) before/after a normal merge.</p> <p><code>mphf.bin</code>/<code>unitigs.bin</code>/<code>evidence.bin</code>/<code>unitigs.bin.idx</code>/<code>fingerprint.bin</code>/<code>layer_meta.json</code> marked "unchanged" above are hard-linked from the base source's own files during the bootstrap copy (2026-08-28), not copied — <code>merge_partition</code> never rewrites them for pre-existing layers, only the <code>presence</code>/<code>counts</code> subdirectory gets widened in place, so only that subdirectory is a real, independent copy. Falls back to a real copy per file if linking itself fails (different filesystems). Verified: source files are byte-identical (checksummed) before/after a normal merge.</p>
<h2 id="known-issue-not-yet-fixed-2026-08-28">Known issue (not yet fixed, 2026-08-28)</h2> <h2 id="known-issue-not-yet-fixed-2026-08-28">Known issue (not yet fixed, 2026-08-28)</h2>
<p>Merging an index against itself — literally the same directory passed twice as separate source arguments (e.g. <code>obiskim merge -o out IDX IDX --rename-duplicates</code>) — panics deep in the MPHF's rank-select structure (<code>common_traits::select_in_word</code>, <code>assertion failed: rank &lt; self.count_ones()</code>), inside <code>MphfLayer::find</code> called from <code>merge_partition</code>'s "is this source kmer already in dst" check against the bootstrap-copied <code>dst_layers</code>. Root cause not identified; ruled out so far:</p> <p>Merging an index against itself — literally the same directory passed twice as separate source arguments (e.g. <code>obikmer merge -o out IDX IDX --rename-duplicates</code>) — panics deep in the MPHF's rank-select structure (<code>common_traits::select_in_word</code>, <code>assertion failed: rank &lt; self.count_ones()</code>), inside <code>MphfLayer::find</code> called from <code>merge_partition</code>'s "is this source kmer already in dst" check against the bootstrap-copied <code>dst_layers</code>. Root cause not identified; ruled out so far:</p>
<ul> <ul>
<li><strong>Not an empty-new-layer issue</strong>: a source contributing zero new kmers (verified both as the sole additional source and as a third, fully-redundant source in a 3-way merge) is handled correctly — no layer is created for it, no crash, exit 0.</li> <li><strong>Not an empty-new-layer issue</strong>: a source contributing zero new kmers (verified both as the sole additional source and as a third, fully-redundant source in a 3-way merge) is handled correctly — no layer is created for it, no crash, exit 0.</li>
<li><strong>Not caused by the hard-link change above</strong>: verified via checksum that a normal (two distinct sources) merge leaves every source file byte-identical.</li> <li><strong>Not caused by the hard-link change above</strong>: verified via checksum that a normal (two distinct sources) merge leaves every source file byte-identical.</li>
File diff suppressed because it is too large. Load diff
@@ -12,7 +12,7 @@
<link rel="prev" href="../merge/"> <link rel="prev" href="../merge/">
<link rel="next" href="../merge_mmap_audit/"> <link rel="next" href="../filtering/">
@@ -23,7 +23,7 @@
<title>Merge parallelism & memory - obiskim</title> <title>Merge parallelism & memory - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1186,62 +1074,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1500,35 +1332,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1805,7 +1609,7 @@
<h1 id="merge-parallelism-and-memory-pressure">Merge parallelism and memory pressure</h1> <h1 id="merge-parallelism-and-memory-pressure">Merge parallelism and memory pressure</h1>
<h2 id="problem-observed">Problem observed</h2> <h2 id="problem-observed">Problem observed</h2>
<p>Running <code>obiskim merge</code> over 109 indexes (108 sources + 1 bootstrap) on a 192-core machine <p>Running <code>obikmer merge</code> over 109 indexes (108 sources + 1 bootstrap) on a 192-core machine
produces a fatal OOM during the <code>merge_partitions</code> stage:</p> produces a fatal OOM during the <code>merge_partitions</code> stage:</p>
<div class="highlight"><pre><span></span><code>memory allocation of 9126805520 bytes failed <div class="highlight"><pre><span></span><code>memory allocation of 9126805520 bytes failed
</code></pre></div> </code></pre></div>
@@ -1841,7 +1645,7 @@ For <code>(u64, AtomicU8)</code> with alignment: ~16 bytes per slot.</p>
<p>Plausible for the largest partition of 108 Salix/Betula sources (~450 Mbp each).</p> <p>Plausible for the largest partition of 108 Salix/Betula sources (~450 Mbp each).</p>
<hr /> <hr />
<h2 id="partition-size-distribution">Partition size distribution</h2> <h2 id="partition-size-distribution">Partition size distribution</h2>
<p><code>obiskim utils --partition-stats</code> measures the sum of <code>unitigs.bin</code> file sizes <p><code>obikmer utils --partition-stats</code> measures the sum of <code>unitigs.bin</code> file sizes
per partition across all source indexes (pure <code>stat()</code> syscalls, negligible cost).</p> per partition across all source indexes (pure <code>stat()</code> syscalls, negligible cost).</p>
<p>Observed on a 9-genome pilot (256 partitions):</p> <p>Observed on a 9-genome pilot (256 partitions):</p>
<table> <table>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Mphf.refs - obiskim</title> <title>Mphf.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -12,7 +12,7 @@
<link rel="prev" href="../storage/"> <link rel="prev" href="../storage/">
<link rel="next" href="../mphf_batch_queries/"> <link rel="next" href="../unitig_evidence/">
@@ -23,7 +23,7 @@
<title>MPHF selection - obiskim</title> <title>MPHF selection - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -973,34 +889,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1197,62 +1085,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1511,35 +1343,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
File diff suppressed because it is too large. Load diff
+8 -312
View File
@@ -7,7 +7,7 @@
<meta content="width=device-width,initial-scale=1" name="viewport"/> <meta content="width=device-width,initial-scale=1" name="viewport"/>
<link href="../../assets/images/favicon.png" rel="icon"/> <link href="../../assets/images/favicon.png" rel="icon"/>
<meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/> <meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/>
<title>obicompactvec — Complete Reference - obiskim</title> <title>obicompactvec — Complete Reference - obikmer</title>
<link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/> <link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/>
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/> <link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&amp;display=fallback" rel="stylesheet"/>
@@ -27,7 +27,7 @@
</div> </div>
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav aria-label="Header" class="md-header__inner md-grid"> <nav aria-label="Header" class="md-header__inner md-grid">
<a aria-label="obiskim" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obiskim"> <a aria-label="obikmer" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg>
</a> </a>
<label class="md-header__button md-icon" for="__drawer"> <label class="md-header__button md-icon" for="__drawer">
@@ -37,7 +37,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -60,10 +60,10 @@
<div class="md-sidebar__inner"> <div class="md-sidebar__inner">
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0"> <nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a aria-label="obiskim" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obiskim"> <a aria-label="obikmer" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"></path></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix=""> <ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"> <li class="md-nav__item">
@@ -170,18 +170,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/chance_sharing/">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span> </span>
</a> </a>
</li> </li>
@@ -194,30 +182,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/sibling_partition_unification/">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../theory/pair_coverage_sampling/">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span> </span>
</a> </a>
</li> </li>
@@ -328,18 +292,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../mphf_batch_queries/">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span> </span>
</a> </a>
</li> </li>
@@ -424,30 +376,6 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../merge_mmap_audit/">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../merge_scaling/">
<span class="md-ellipsis">
Merge scaling (open)
</span> </span>
</a> </a>
</li> </li>
@@ -566,19 +494,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="../../architecture/hot_resume_memoization/">
<span class="md-ellipsis">
Hot resume and memoization
@@ -716,46 +632,6 @@
</a> </a>
</li> </li>
<li class="md-nav__item"> <li class="md-nav__item">
<a class="md-nav__link" href="#sparse-matrix-formats">
<span class="md-ellipsis">
Sparse matrix formats
</span>
</a>
<nav aria-label="Sparse matrix formats" class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a class="md-nav__link" href="#persistentsparsebitmatrix">
<span class="md-ellipsis">
PersistentSparseBitMatrix
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="#nonzero_iter-the-one-traversal-per-format">
<span class="md-ellipsis">
nonzero_iter — the one traversal per format
</span>
</a>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="#persistentsparsecompactintmatrix">
<span class="md-ellipsis">
PersistentSparseCompactIntMatrix
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a class="md-nav__link" href="#aggregation-traits-matrix-level"> <a class="md-nav__link" href="#aggregation-traits-matrix-level">
<span class="md-ellipsis"> <span class="md-ellipsis">
@@ -1315,7 +1191,7 @@ Pass 1 — byte max, SIMD-vectorizable, O(n)
<tr> <tr>
<td><code>Sparse</code></td> <td><code>Sparse</code></td>
<td>bit: <code>sparse_meta.json</code> + PFIV/Elias-Fano component files, row-major. Int: same support files (built on <code>PersistentSparseBitMatrix</code> internally) plus <code>singleton_values.pciv</code>/<code>multi_values.pciv</code>/<code>multi_offsets</code> for the per-row, non-deduplicated values</td> <td>bit: <code>sparse_meta.json</code> + PFIV/Elias-Fano component files, row-major. Int: same support files (built on <code>PersistentSparseBitMatrix</code> internally) plus <code>singleton_values.pciv</code>/<code>multi_values.pciv</code>/<code>multi_offsets</code> for the per-row, non-deduplicated values</td>
<td><code>pack --sparse</code>; see "Sparse matrix formats" below for the sparse-vs-dense access-pattern trade-off</td> <td><code>pack --sparse</code>; see <a href="../../architecture/siblings/">siblings.md</a> for the sparse-vs-dense access-pattern trade-off</td>
</tr> </tr>
<tr> <tr>
<td><code>Implicit</code> (bit only)</td> <td><code>Implicit</code> (bit only)</td>
@@ -1325,6 +1201,7 @@ Pass 1 — byte max, SIMD-vectorizable, O(n)
</tbody> </tbody>
</table> </table>
<p><code>PersistentBitMatrix::open(layer_dir)</code> auto-detects the variant, in order: <code>matrix.pbmx</code> → Packed, <code>presence/meta.json</code> → Columnar, <code>presence/sparse_meta.json</code> → Sparse, <code>layer_meta.json</code> (no presence dir at all) → Implicit. <code>PersistentCompactIntMatrix::open(layer_dir)</code> mirrors the same priority order minus <code>Implicit</code> (there's no implicit count matrix — counts always have at least one on-disk column): <code>matrix.pcmx</code> → Packed, <code>counts/meta.json</code> → Columnar, <code>counts/singleton_values.pciv</code> → Sparse. <code>col_view</code>/<code>col</code>/<code>sub_matrix</code> panic on <code>Sparse</code>/<code>Implicit</code> where the operation has no direct-slice equivalent (Sparse is k-mer-major, not column-major; Implicit has no backing storage) — callers needing per-column data on those variants go through <code>row</code>/<code>fill_row</code>.</p> <p><code>PersistentBitMatrix::open(layer_dir)</code> auto-detects the variant, in order: <code>matrix.pbmx</code> → Packed, <code>presence/meta.json</code> → Columnar, <code>presence/sparse_meta.json</code> → Sparse, <code>layer_meta.json</code> (no presence dir at all) → Implicit. <code>PersistentCompactIntMatrix::open(layer_dir)</code> mirrors the same priority order minus <code>Implicit</code> (there's no implicit count matrix — counts always have at least one on-disk column): <code>matrix.pcmx</code> → Packed, <code>counts/meta.json</code> → Columnar, <code>counts/singleton_values.pciv</code> → Sparse. <code>col_view</code>/<code>col</code>/<code>sub_matrix</code> panic on <code>Sparse</code>/<code>Implicit</code> where the operation has no direct-slice equivalent (Sparse is k-mer-major, not column-major; Implicit has no backing storage) — callers needing per-column data on those variants go through <code>row</code>/<code>fill_row</code>.</p>
<p>Unlike the bit side, <code>PersistentSparseCompactIntMatrix</code>'s values are <em>not</em> deduplicated across rows — two rows can share the same non-zero column set (same <code>dict_id</code> in the shared support) while carrying different counts — so its <code>CountPartials</code> impl can't reuse the support's dict-multiplicity shortcut the way <code>BitPartials for PersistentSparseBitMatrix</code> does. It still avoids the naive <code>O(n_cols² × n)</code> column-pair scan via a single row-major pass (<code>row_major_pairwise</code> in <code>sparse_intmatrix.rs</code>), reconstructing the squared-difference formulas (<code>euclidean</code>/<code>relfreq_euclidean</code>/<code>hellinger</code>) from per-column marginals via <code>Σ(a-b)² = Σa²+Σb²-2Σab</code> — see <a href="../../architecture/siblings/">siblings.md</a>'s "<code>PersistentCompactIntMatrix::Sparse</code> — implemented" entry for the full derivation.</p>
<p><code>col_view(c)</code> returns the appropriate view directly:</p> <p><code>col_view(c)</code> returns the appropriate view directly:</p>
<div class="highlight"><pre><span></span><code><span class="c1">// PersistentBitMatrix</span> <div class="highlight"><pre><span></span><code><span class="c1">// PersistentBitMatrix</span>
<span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">col_view</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">usize</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nc">BitSliceView</span><span class="o">&lt;'</span><span class="nb">_</span><span class="o">&gt;</span> <span class="k">pub</span><span class="w"> </span><span class="k">fn</span><span class="w"> </span><span class="nf">col_view</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">:</span><span class="w"> </span><span class="kt">usize</span><span class="p">)</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="nc">BitSliceView</span><span class="o">&lt;'</span><span class="nb">_</span><span class="o">&gt;</span>
@@ -1335,183 +1212,6 @@ Pass 1 — byte max, SIMD-vectorizable, O(n)
<p>No wrapper enums (<code>BitColView</code>, <code>IntColView</code>): the caller receives a <code>Copy</code> view struct immediately usable with any view method or bulk builder method.</p> <p>No wrapper enums (<code>BitColView</code>, <code>IntColView</code>): the caller receives a <code>Copy</code> view struct immediately usable with any view method or bulk builder method.</p>
<p><code>pack_compact_int_matrix</code> and <code>pack_bit_matrix</code> convert columnar → packed format.</p> <p><code>pack_compact_int_matrix</code> and <code>pack_bit_matrix</code> convert columnar → packed format.</p>
<hr/> <hr/>
<h2 id="sparse-matrix-formats">Sparse matrix formats</h2>
<p>Motivated by real k-mer-family data being extremely row-sparse (most rows —
k-mers — present in only a handful of genome columns out of dozens to
thousands): a row-major, deduplicated alternative to the dense column-major
formats above, built once per layer like the rest of the pipeline (never the
whole multi-billion-row index at once). Implements the exact-duplicate
special case of Alanko, Bille, Gørtz, Navarro, Puglisi, "Compact Data
Structures for Collections of Sets" (2025,
<code>biblio/Alanko et al. - Compact Data Structures for Collections of
Sets.pdf</code>) — a plain dedup dictionary, not their full subset-containment
hierarchy.</p>
<h3 id="persistentsparsebitmatrix"><code>PersistentSparseBitMatrix</code></h3>
<p>Four mmap-backed on-disk components: an <code>is_multi</code> rank-capable flag per row
(singleton vs. multi-genome), a fixed-bit-width array for singleton rows
(genome index directly, <code>ceil(log2(n_cols))</code> bits), a separate fixed-width
array for multi-genome rows (<code>dict_id</code>, <code>ceil(log2(n_distinct_multi_sets))</code>
bits — kept apart from the singleton array because <code>n_distinct_multi_sets</code>
can be large in absolute terms even when multi-genome rows are a small
<em>fraction</em> of all rows, and a shared array would force every row, singletons
included, to pay the wider width), and a deduplicated dictionary of distinct
multi-genome sets (Elias-Fano-encoded byte offsets + a varint-encoded values
blob). Supporting primitives: <code>PersistentFixedIntVec</code> (arbitrary,
runtime-parameterised bit width, width <code>0</code> included — needed once an
<code>EliasFano</code> reopen bug surfaced, see below), <code>PersistentRankSelectBitVec</code>
(rank1/rank0/select1 on top of the crate's existing <code>count_ones</code>, via
<code>common_traits::SelectInWord</code>), <code>EliasFano</code> (composes the two). <code>BinaryMatrix</code>
(<code>n</code>, <code>n_cols</code>, <code>row</code>/<code>fill_row</code>, <code>fill_sub_matrix</code>, <code>count_ones</code>) is the
trait unifying dense and sparse at the call sites that need both
interchangeably; column-oriented methods (<code>col</code>, <code>col_view</code>, the
<code>partial_*_dist_matrix</code> family) stay dense-only — <code>Sparse</code>/<code>Implicit</code> panic
there (see the <code>PersistentBitMatrix::open</code> note above).</p>
<p>Measured on real data (one layer, 30.2M rows, 91 genomes):</p>
<table>
<thead>
<tr>
<th></th>
<th>dense</th>
<th>sparse</th>
<th>ratio</th>
</tr>
</thead>
<tbody>
<tr>
<td>on-disk size</td>
<td>328.1MB</td>
<td>43.7MB</td>
<td><strong>7.5x</strong> smaller</td>
</tr>
<tr>
<td>build time / peak RSS</td>
<td>—</td>
<td>4.26s / 628MB</td>
<td>per-layer, in-memory construction</td>
</tr>
<tr>
<td>row access, sequential (2M reads)</td>
<td>43ns/row</td>
<td>32ns/row</td>
<td>sparse faster (smaller structure, better cache fit)</td>
</tr>
<tr>
<td>row access, random (2M reads)</td>
<td>409ns/row</td>
<td>85ns/row</td>
<td>sparse <strong>~4.8x faster</strong> — the <code>--shannon</code>/family-lookup access shape</td>
</tr>
<tr>
<td>column access, one full column (30.2M rows)</td>
<td>11.5ms</td>
<td>993ms</td>
<td>sparse <strong>86x slower</strong> — no native column method, every read decodes a full row to keep one bit</td>
</tr>
</tbody>
</table>
<p>The row-access wins (compactness was the stated design goal, not speed) come
from dense's genome-major layout scattering a single row read across a much
bigger file — costlier than sparse's rank/select/varint decode once the file
is this much smaller. Column access is the flip side of the same layout
choice; <code>nonzero_iter</code> (below) is what removes it from the hot path that
actually matters (<code>query</code>).</p>
<p>Two reopen-correctness bugs, now fixed at the source: (1) <code>EliasFano::open</code>
re-derived its low-bits width from the persisted low-vector's own width
byte; the width-<code>0</code> case was built with a dummy 1-bit placeholder (the
builder used to reject true width <code>0</code>), silently doubling every reopened
value. Fixed by making <code>PersistentFixedIntVec</code> genuinely support width <code>0</code>
(no storage, <code>get</code> always <code>0</code>). (2) An empty row (cardinality 0) used to be
recorded as a singleton at genome <code>0</code>, indistinguishable on read-back from a
<em>real</em> singleton at genome <code>0</code>. Fixed by routing cardinality-0 rows through
the dictionary path (a genuine empty entry).</p>
<p>Still deferred: full Alanko et al. subset-hierarchy compression (only the
exact-duplicate case is built), a sparse <code>PersistentCompactIntMatrix</code>
variant beyond what's described below, BRWT-style column-correlation
exploitation, and a row-major rewrite of
<code>partial_jaccard_dist_matrix</code>/<code>partial_hamming_dist_matrix</code>/etc. as a
per-row co-occurrence accumulation (<code>O(Σ_rows k̄²)</code>) so <code>obikindex</code>'s
<code>--metric</code> distance-matrix path stops paying the column-access penalty on
<code>Sparse</code> — needs its own design pass (how it plugs into
<code>BitPartials</code>/<code>ColumnWeights</code> so both matrix types keep serving <code>--metric</code>),
not just "port the loop".</p>
<h3 id="nonzero_iter-the-one-traversal-per-format"><code>nonzero_iter</code> — the one traversal per format</h3>
<p><code>fn nonzero_iter&lt;'a&gt;(&amp;'a self, slots: &amp;'a [usize]) -&gt; Box&lt;dyn Iterator&lt;Item = (usize, usize, u32)&gt; + 'a&gt;</code>
(item: index into <code>slots</code>, column, value) is the single foundational
per-format traversal primitive every consumer builds on — <code>fill_sub_matrix</code>
and a <code>for_each</code>-style callback are both trivial, free consumers of it
(<code>.for_each(f)</code> is <code>Iterator::for_each</code>; <code>fill_sub_matrix</code> drains the
iterator and scatters into <code>out[][]</code>), instead of two independently
hand-maintained traversals that can silently diverge. <code>Box&lt;dyn Iterator&gt;</code>,
not a bare <code>impl Iterator</code>: <code>Columnar</code>/<code>Packed</code>/<code>Sparse</code>/<code>Implicit</code> are
genuinely different concrete types and the method isn't on a
dyn-compatible trait (<code>BinaryMatrix</code> is used as <code>dyn BinaryMatrix</code>
elsewhere, and RPITIT methods aren't dyn-compatible) — one <code>Box</code> per
<code>nonzero_iter</code> call, not per cell.</p>
<p>Per-format implementation: <code>PersistentSparseBitMatrix</code> decodes natively,
buffered one row at a time (<code>std::iter::from_fn</code> over the existing
<code>for_each_genome_in_row</code>, no <code>n_cols</code>-wide allocation ever). <code>Columnar</code>/
<code>Packed</code> loop columns, collecting each column's hits via
<code>BitSliceView::nonzero_among_sorted</code>/<code>IntSliceView::nonzero_among_sorted</code>
(a <code>filter</code>/<code>filter_map</code> over the vector-level <code>get()</code>, no new state
machine — <code>std</code>'s own <code>Filter</code> iterator already is one) into one <code>Vec</code> via
<code>.extend()</code> (not <code>flat_map</code>: a <code>flat_map</code> closure can't lazily return
something borrowing its own captured sort permutation across separate calls
without either boxing per-column or fighting the borrow checker — eager
collection sidesteps it at zero extra cost, since <code>fill_sub_matrix</code> already
fully materialises anyway). <code>Implicit</code> is trivial (<code>slots.iter().map(|&amp;i| (i, 0, 1))</code>).</p>
<p>This closed a real dispatch bug by construction, not by patching it:
<code>PersistentBitMatrix::fill_sub_matrix</code>/<code>sub_matrix</code> used to reimplement a
naive per-<code>(column, slot)</code> loop instead of delegating to
<code>PersistentSparseBitMatrix</code>'s own efficient native method for <code>Self::Sparse</code>
— two hand-written traversals for the same format, free to drift apart, and
they had (<code>obikphylo</code>'s own cache layer had independently built a parallel
enum wrapper that <em>did</em> dispatch correctly, evidence the bug was worked
around rather than fixed at the source). With <code>fill_sub_matrix</code>/<code>sub_matrix</code>
rewritten to drain <code>nonzero_iter</code>, there is only one traversal per format
left to get right. <code>KmerPartition::query_partition_with</code>
(<code>obikindex/src/partition/query_layer.rs</code>) — previously column-major
(<code>for g { for slot { col_value } }</code>, which for <code>Sparse</code> rebuilt a full row
per single cell touched, O(hits × n_cols) instead of O(hits) — the original
motivation for this primitive) — now issues one <code>layer.nonzero_iter(&amp;slot_list)</code>
call per layer, format-agnostic. Dense/sparse query performance parity
confirmed on real data (previously sparse 30-50% slower than dense,
reproducibly; now within ~1-3% either way — noise level).</p>
<h3 id="persistentsparsecompactintmatrix"><code>PersistentSparseCompactIntMatrix</code></h3>
<p>The count-matrix analogue, built on <code>PersistentSparseBitMatrix</code> as its
"which columns are non-zero" support, values <strong>not</strong> deduplicated (unlike
the bit side, two rows can share the same non-zero column set — same
<code>dict_id</code> — while carrying different counts, so the dict-multiplicity
shortcut <code>BitPartials for PersistentSparseBitMatrix</code> uses doesn't carry
over). <code>CountPartials</code> here: a single row-major pass (<code>row_major_pairwise</code>
in <code>sparse_intmatrix.rs</code>, decodes each row once via
<code>for_each_cell_in_row</code>, nests over that row's own co-present columns) —
<code>O(Σ k̄²)</code> over populated rows, avoiding the naive <code>O(n_cols² × n)</code>
column-pair rescan. <code>min(a,b)</code>-based kernels (<code>bray</code>, <code>relfreq_bray</code>) need
no correction — they vanish when either side is absent. <code>a·b</code> and <code>√(a·b)</code>
kernels (<code>euclidean</code>/<code>relfreq_euclidean</code>/<code>hellinger</code>) do need one, since
<code>(a-0)² = a² ≠ 0</code> unlike the <code>min</code>-based formulas — reconstructed from
per-column marginals via <code>Σ(a-b)² = Σa²+Σb²-2Σab</code>.
<code>threshold_jaccard(1)</code> shortcuts to <code>BitPartials::partial_jaccard</code>
(threshold 1 is exactly presence); <code>threshold_jaccard(0)</code> is closed-form
(every <code>u32</code> is <code>≥ 0</code>).</p>
<p>Wiring the <code>threshold==1</code> shortcut surfaced two pre-existing formula bugs in
<code>BitPartials for PersistentSparseBitMatrix</code> (present since that type's own
introduction, never caught because no test had compared <code>Sparse</code>'s raw
<code>partial_*</code> output against dense on real data — only the diagonal-blind
<code>jaccard_dist_matrix</code>/<code>hamming_dist_matrix</code> finalisations were tested),
fixed at the source:</p>
<ol>
<li><code>partial_jaccard</code>'s diagonal used to be <code>(0, 2×col_weights[i])</code> instead
of a genuine self-comparison <code>(col_weights[i], col_weights[i])</code> —
<code>col_weights_and_pair_counts</code>'s <code>inter</code> never pairs a column with itself
by construction, so the diagonal needs its own case.</li>
<li><code>partial_hamming</code>'s off-diagonal formula itself was wrong: it computed
<code>total - union</code> (rows where <em>neither</em> column is present) instead of the
actual Hamming distance <code>col_weights[i] + col_weights[j] - 2×inter[i,j]</code>
(symmetric-difference size) — the two only coincide when
<code>col_weights[i] + col_weights[j] == total</code>, which small/synthetic test
data can easily satisfy by accident.</li>
</ol>
<h2 id="aggregation-traits-matrix-level">Aggregation traits (matrix level)</h2> <h2 id="aggregation-traits-matrix-level">Aggregation traits (matrix level)</h2>
<h3 id="columnweights">ColumnWeights</h3> <h3 id="columnweights">ColumnWeights</h3>
<div class="highlight"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">ColumnWeights</span><span class="p">:</span><span class="w"> </span><span class="nb">Send</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Sync</span><span class="w"> </span><span class="p">{</span> <div class="highlight"><pre><span></span><code><span class="k">trait</span><span class="w"> </span><span class="n">ColumnWeights</span><span class="p">:</span><span class="w"> </span><span class="nb">Send</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Sync</span><span class="w"> </span><span class="p">{</span>
@@ -1565,10 +1265,6 @@ fixed at the source:</p>
<td><code>threshold_mash_dist_matrix(k, t)</code></td> <td><code>threshold_mash_dist_matrix(k, t)</code></td>
<td>Mash distance, derived from <code>threshold_jaccard_dist_matrix(t)</code> — no separate partial</td> <td>Mash distance, derived from <code>threshold_jaccard_dist_matrix(t)</code> — no separate partial</td>
</tr> </tr>
<tr>
<td><code>threshold_hamming_dist_matrix(t)</code></td>
<td><code>union[i,j] − inter[i,j]</code> (k-mers present in exactly one genome) — no separate partial</td>
</tr>
</tbody> </tbody>
</table> </table>
<h3 id="bitpartials">BitPartials</h3> <h3 id="bitpartials">BitPartials</h3>
@@ -19,7 +19,7 @@
<title>Obipipeline.refs - obiskim</title> <title>Obipipeline.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -23,7 +23,7 @@
<title>obipipeline library - obiskim</title> <title>obipipeline library - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -923,34 +839,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1147,62 +1035,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1461,35 +1293,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1838,7 +1642,7 @@ Implemented as a <strong>TT muncher</strong>: the internal rule <code>@build</co
||? func: InVariant =&gt; OutVariant, ||? func: InVariant =&gt; OutVariant,
} }
</code></pre></div> </code></pre></div>
<p>Two pipes compose with <code>.then(other)</code>. Apply to an iterator with <code>.apply(iter, n_workers, capacity)</code> to get a <code>PipeIter&lt;Out&gt;</code> — an iterator over the pipeline output, backed by a background <code>WorkerPool</code>. The scatter step in <code>obiskim</code> uses <code>make_pipe!</code> and <code>.apply()</code> rather than the full <code>make_pipeline!</code> / <code>WorkerPool</code> pattern.</p> <p>Two pipes compose with <code>.then(other)</code>. Apply to an iterator with <code>.apply(iter, n_workers, capacity)</code> to get a <code>PipeIter&lt;Out&gt;</code> — an iterator over the pipeline output, backed by a background <code>WorkerPool</code>. The scatter step in <code>obikmer</code> uses <code>make_pipe!</code> and <code>.apply()</code> rather than the full <code>make_pipeline!</code> / <code>WorkerPool</code> pattern.</p>
<h2 id="scheduler-architecture">Scheduler architecture</h2> <h2 id="scheduler-architecture">Scheduler architecture</h2>
<div class="highlight"><pre><span></span><code>Source thread ──► [source_rx] ──► Scheduler ──► [worker_tx] ──► Workers (×N) <div class="highlight"><pre><span></span><code>Source thread ──► [source_rx] ──► Scheduler ──► [worker_tx] ──► Workers (×N)
▲ │ ▲ │
+6 -202
View File
@@ -23,7 +23,7 @@
<title>obitaxonomy crate - obiskim</title> <title>obitaxonomy crate - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -984,62 +872,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1473,35 +1305,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -23,7 +23,7 @@
<title>Partition and layer caching (discussion) - obiskim</title> <title>Partition and layer caching (discussion) - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -984,62 +872,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1731,35 +1563,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -2481,7 +2285,7 @@ needed — <code>obikindex → obikpartitionner</code> stays the same direction
conversation as a side effect of investigating the false "independent conversation as a side effect of investigating the false "independent
lifecycle" claim. lifecycle" claim.
- <code>KmerIndex::partition()</code>/<code>partition_mut()</code> are gone; <code>scatter()</code> - <code>KmerIndex::partition()</code>/<code>partition_mut()</code> are gone; <code>scatter()</code>
(<code>obiskim</code>) and any write-side code get a transient <code>PartitionRouter</code> via (<code>obikmer</code>) and any write-side code get a transient <code>PartitionRouter</code> via
<code>KmerIndex::partition_router()</code>. <code>KmerIndex::partition_router()</code>.
- A real bug caught by the test suite during this move: - A real bug caught by the test suite during this move:
<code>PartitionRouter::open</code> initially defaulted to <code>closed: true</code> (inherited <code>PartitionRouter::open</code> initially defaulted to <code>closed: true</code> (inherited
@@ -2646,7 +2450,7 @@ unconsumed (<code>&amp;self</code>/<code>&amp;mut self</code>, not <code>self</c
control (tests, <code>obikphylo</code>'s test harness) still get it, <code>run</code> is a control (tests, <code>obikphylo</code>'s test harness) still get it, <code>run</code> is a
convenience layered on top, not the only way in.</p> convenience layered on top, not the only way in.</p>
<p><code>run</code> absorbs the entire body of what used to be the free function <p><code>run</code> absorbs the entire body of what used to be the free function
<code>obiskim::steps::scatter</code> (now deleted, along with the <code>steps</code> module <code>obikmer::steps::scatter</code> (now deleted, along with the <code>steps</code> module
entirely) — the <code>obipipeline::make_pipe!</code> two-stage pipeline entirely) — the <code>obipipeline::make_pipe!</code> two-stage pipeline
(file→pages→superkmers), throttling, per-file logging. What changed: (file→pages→superkmers), throttling, per-file logging. What changed:
- Every <code>ensure_writer(partition)</code> call now does <code>Layer::create(&amp;layer0_dir)</code> - Every <code>ensure_writer(partition)</code> call now does <code>Layer::create(&amp;layer0_dir)</code>
@@ -2665,7 +2469,7 @@ entirely) — the <code>obipipeline::make_pipe!</code> two-stage pipeline
workspace suite exercises the real CLI's file-reading <code>scatter</code> path workspace suite exercises the real CLI's file-reading <code>scatter</code> path
end-to-end (<code>obikphylo</code>'s test harness and <code>obikpartitionner</code>'s own end-to-end (<code>obikphylo</code>'s test harness and <code>obikpartitionner</code>'s own
tests both call <code>write_batch</code> directly, bypassing <code>run</code>/file discovery tests both call <code>write_batch</code> directly, bypassing <code>run</code>/file discovery
entirely), so the whole suite stayed green while <code>obiskim index</code> on entirely), so the whole suite stayed green while <code>obikmer index</code> on
real FASTA silently indexed 0 kmers. Found by running the actual CLI real FASTA silently indexed 0 kmers. Found by running the actual CLI
against a small FASTA and noticing <code>count.json</code>'s <code>f0</code> (870, correct) against a small FASTA and noticing <code>count.json</code>'s <code>f0</code> (870, correct)
didn't match "0 total kmers indexed" at the final stage. Fixed by didn't match "0 total kmers indexed" at the final stage. Fixed by
@@ -2794,7 +2598,7 @@ own tests.</p>
<code>cargo test --workspace</code>, exit code 0), plus an end-to-end CLI smoke test <code>cargo test --workspace</code>, exit code 0), plus an end-to-end CLI smoke test
against real FASTA data (scatter → dereplicate → count → index-build → against real FASTA data (scatter → dereplicate → count → index-build →
query, same numbers as (3)'s smoke test: 870 kmers) — required this time query, same numbers as (3)'s smoke test: 870 kmers) — required this time
too, per (3)'s own lesson: no test in the suite exercises <code>obiskim index</code>'s too, per (3)'s own lesson: no test in the suite exercises <code>obikmer index</code>'s
real file-driven path.</p> real file-driven path.</p>
<p>Still not done: <code>count_kmer</code>/<code>build_layers</code> staying where they are, the <p>Still not done: <code>count_kmer</code>/<code>build_layers</code> staying where they are, the
<code>obikalgorithm</code> shared-trait extraction (deliberately deferred until a <code>obikalgorithm</code> shared-trait extraction (deliberately deferred until a
@@ -3021,7 +2825,7 @@ removed from <code>router.rs</code>).</p>
equivalent on <code>Dereplicator</code>, which has no setters at all) — a real, equivalent on <code>Dereplicator</code>, which has no setters at all) — a real,
already-present parameter (<code>keep_intermediate</code> at the CLI), not a already-present parameter (<code>keep_intermediate</code> at the CLI), not a
speculative addition.</p> speculative addition.</p>
<p><code>count_kmer</code>'s three former callers (<code>obiskim::cmd::index</code>, <code>obikphylo</code>'s <p><code>count_kmer</code>'s three former callers (<code>obikmer::cmd::index</code>, <code>obikphylo</code>'s
test harness, <code>obikindexer::algorithms::partitionner</code>'s own test harness, <code>obikindexer::algorithms::partitionner</code>'s own
<code>pipeline_counts</code> test helper) all updated to <code>Counter::new(&amp;idx). <code>pipeline_counts</code> test helper) all updated to <code>Counter::new(&amp;idx).
run(...)</code> — the last one simplified further: it used to read back run(...)</code> — the last one simplified further: it used to read back
@@ -3160,7 +2964,7 @@ same reason.</p>
index's kmer sequences — read by <code>rebuild_layer.rs</code> and others, well index's kmer sequences — read by <code>rebuild_layer.rs</code> and others, well
beyond construction — see [[project_unitigs_always_kept]]), beyond construction — see [[project_unitigs_always_kept]]),
<code>pack_matrices</code> (re-runnable maintenance on an already-finished index <code>pack_matrices</code> (re-runnable maintenance on an already-finished index
via <code>obiskim pack</code>, not just a pipeline step), <code>upgrade_layer_meta</code> via <code>obikmer pack</code>, not just a pipeline step), <code>upgrade_layer_meta</code>
(migration, runnable on any existing index at any time).</li> (migration, runnable on any existing index at any time).</li>
</ul> </ul>
<h3 id="the-general-pattern-not-obikindexer-specific">The general pattern (not obikindexer-specific)</h3> <h3 id="the-general-pattern-not-obikindexer-specific">The general pattern (not obikindexer-specific)</h3>
@@ -3269,7 +3073,7 @@ crate, not "private except to one named dependent") — the opposite of
what was wanted.</p> what was wanted.</p>
<p><strong>A real design decision made while wiring callers up, not a mechanical <p><strong>A real design decision made while wiring callers up, not a mechanical
rename</strong>: <code>PrivateBuilder</code> being genuinely <code>pub(crate)</code> to <code>obikindexer</code> rename</strong>: <code>PrivateBuilder</code> being genuinely <code>pub(crate)</code> to <code>obikindexer</code>
means <code>obiskim::cmd::index</code> (a different crate) can no longer call means <code>obikmer::cmd::index</code> (a different crate) can no longer call
<code>mark_scattered</code>/<code>mark_counted</code>/<code>mark_indexed</code>/<code>write_spectrum</code> directly — <code>mark_scattered</code>/<code>mark_counted</code>/<code>mark_indexed</code>/<code>write_spectrum</code> directly —
it never could have, once privacy was real rather than aspirational. Each it never could have, once privacy was real rather than aspirational. Each
algorithm now marks its own completion as part of <code>run()</code>/<code>close()</code> algorithm now marks its own completion as part of <code>run()</code>/<code>close()</code>
@@ -3341,7 +3145,7 @@ traits, two crates, two different reasons, not a contradiction.</p>
internal caller of these four methods needs the trait imported now that internal caller of these four methods needs the trait imported now that
they're no longer inherent — <code>merge.rs</code>, <code>select.rs</code>, <code>rebuild.rs</code>, they're no longer inherent — <code>merge.rs</code>, <code>select.rs</code>, <code>rebuild.rs</code>,
<code>reindex.rs</code> (<code>use crate::index::builder::IndexBuilder;</code>) and, externally, <code>reindex.rs</code> (<code>use crate::index::builder::IndexBuilder;</code>) and, externally,
<code>obiskim::cmd::index::mod</code> (<code>use obikindex::IndexBuilder;</code>, for the three <code>obikmer::cmd::index::mod</code> (<code>use obikindex::IndexBuilder;</code>, for the three
<code>idx.state() &lt; IndexState::X</code> resumability checks). Call syntax at every <code>idx.state() &lt; IndexState::X</code> resumability checks). Call syntax at every
site is unchanged (<code>KmerIndex::create_skeleton(...)</code>, site is unchanged (<code>KmerIndex::create_skeleton(...)</code>,
<code>self.state()</code>) — only trait-in-scope requirements are new, which is <code>self.state()</code>) — only trait-in-scope requirements are new, which is
@@ -3350,7 +3154,7 @@ itself.</p>
<p>Verification went one step further than (9): beyond <p>Verification went one step further than (9): beyond
<code>cargo check --workspace --all-targets</code> + <code>cargo test --workspace</code> + <code>cargo check --workspace --all-targets</code> + <code>cargo test --workspace</code> +
<code>scripts/smoke_test_index.sh</code> (all green, 870 kmers again), ran <code>scripts/smoke_test_index.sh</code> (all green, 870 kmers again), ran
<code>obiskim merge</code> end to end on two freshly built indexes (exercises <code>obikmer merge</code> end to end on two freshly built indexes (exercises
<code>clear_output_for_create</code>/<code>finalize_indexed</code> directly, the two methods <code>clear_output_for_create</code>/<code>finalize_indexed</code> directly, the two methods
<code>scripts/smoke_test_index.sh</code> itself never touches) — exit 0, <code>pack</code> <code>scripts/smoke_test_index.sh</code> itself never touches) — exit 0, <code>pack</code>
stage completed. Test suite alone would not have caught a regression stage completed. Test suite alone would not have caught a regression
@@ -3442,7 +3246,7 @@ field mutation from outside <code>IndexMeta</code>). Fixed across:
<code>entropy.rs</code>/<code>sankoff_bundle.rs</code>/<code>stats.rs</code>/<code>tests.rs</code> — all had <code>entropy.rs</code>/<code>sankoff_bundle.rs</code>/<code>stats.rs</code>/<code>tests.rs</code> — all had
<code>self.meta().genomes.len()</code>-shaped reads, mechanically fixed to <code>self.meta().genomes.len()</code>-shaped reads, mechanically fixed to
<code>.genomes().map_err(OKIError::Io)?.len()</code> (tests: <code>.unwrap()</code>). <code>.genomes().map_err(OKIError::Io)?.len()</code> (tests: <code>.unwrap()</code>).
- <code>obiskim::cmd::*</code>: <code>annotate</code> (rewrote its rename path to load genomes - <code>obikmer::cmd::*</code>: <code>annotate</code> (rewrote its rename path to load genomes
once, mutate the in-memory <code>Vec</code>, then <code>idx.meta().set_genomes(...)</code> once, mutate the in-memory <code>Vec</code>, then <code>idx.meta().set_genomes(...)</code>
instead of <code>meta_mut()</code>), <code>filter</code>/<code>pack</code>/<code>dump</code>/<code>unitig</code>/<code>merge</code>/<code>select</code>/ instead of <code>meta_mut()</code>), <code>filter</code>/<code>pack</code>/<code>dump</code>/<code>unitig</code>/<code>merge</code>/<code>select</code>/
<code>phylo</code> (fetch-once-then-use pattern for genome counts/labels), <code>phylo</code> (fetch-once-then-use pattern for genome counts/labels),
@@ -3561,7 +3365,7 @@ FnMut(Progress) + 'a&gt;</code> etc.) is tied to the algorithm's own <code>'a</c
forcing callers' progress closures to <code>move</code>-capture (and therefore clone forcing callers' progress closures to <code>move</code>-capture (and therefore clone
or <code>Arc</code>-wrap) local state like <code>TracedBar</code>/EMA-rate accumulators that or <code>Arc</code>-wrap) local state like <code>TracedBar</code>/EMA-rate accumulators that
they'd otherwise want to keep using by reference after <code>run()</code> returns.</p> they'd otherwise want to keep using by reference after <code>run()</code> returns.</p>
<p><strong>Why a new crate, not a submodule of <code>obikindexer</code></strong>: <code>obiskim::cmd:: <p><strong>Why a new crate, not a submodule of <code>obikindexer</code></strong>: <code>obikmer::cmd::
index::mod</code> and <code>obikphylo</code>'s own test helpers both need to call <code>.run()</code> index::mod</code> and <code>obikphylo</code>'s own test helpers both need to call <code>.run()</code>
on these algorithms, so the trait has to be reachable from outside on these algorithms, so the trait has to be reachable from outside
<code>obikindexer</code> — putting it in <code>obikindexer</code> itself would work file-wise <code>obikindexer</code> — putting it in <code>obikindexer</code> itself would work file-wise
@@ -3569,15 +3373,15 @@ but conflates "the trait every algorithm implements" with "one crate's
particular four implementations of it", the same reasoning that already particular four implementations of it", the same reasoning that already
separated <code>obikindex</code> (data model) from <code>obikindexer</code> (algorithms separated <code>obikindex</code> (data model) from <code>obikindexer</code> (algorithms
operating on it). <code>obikalgorithm</code> has <strong>no dependencies at all</strong> (see operating on it). <code>obikalgorithm</code> has <strong>no dependencies at all</strong> (see
above); <code>obikindexer</code>, <code>obiskim</code>, and <code>obikphylo</code> (dev-dependency, for above); <code>obikindexer</code>, <code>obikmer</code>, and <code>obikphylo</code> (dev-dependency, for
its test helper) all depend on it.</p> its test helper) all depend on it.</p>
<p><strong>Blast radius</strong>: <code>obikindexer</code>'s four algorithm modules (struct field + <p><strong>Blast radius</strong>: <code>obikindexer</code>'s four algorithm modules (struct field +
setter + trait impl each); <code>obiskim::cmd::index::mod</code> (three call sites: setter + trait impl each); <code>obikmer::cmd::index::mod</code> (three call sites:
<code>.on_progress(cb)</code> before <code>.run()</code>, unqualified now that the trait is in <code>.on_progress(cb)</code> before <code>.run()</code>, unqualified now that the trait is in
scope); <code>obikindexer::algorithms::partitionner::tests</code> and <code>obikphylo:: scope); <code>obikindexer::algorithms::partitionner::tests</code> and <code>obikphylo::
siblings::tests</code> (both had direct <code>.run(None::&lt;fn(Progress)&gt;)</code>-shaped siblings::tests</code> (both had direct <code>.run(None::&lt;fn(Progress)&gt;)</code>-shaped
calls needing the same treatment). New <code>obikalgorithm</code> crate registered calls needing the same treatment). New <code>obikalgorithm</code> crate registered
in the workspace <code>Cargo.toml</code>, depended on by <code>obikindexer</code>/<code>obiskim</code> in the workspace <code>Cargo.toml</code>, depended on by <code>obikindexer</code>/<code>obikmer</code>
(regular) and <code>obikphylo</code> (dev).</p> (regular) and <code>obikphylo</code> (dev).</p>
<p><strong>Verification</strong>: <code>cargo check --workspace --all-targets</code> and <code>cargo test <p><strong>Verification</strong>: <code>cargo check --workspace --all-targets</code> and <code>cargo test
--workspace</code> both green (0 failures), <code>scripts/smoke_test_index.sh</code> green --workspace</code> both green (0 failures), <code>scripts/smoke_test_index.sh</code> green
@@ -3644,7 +3448,7 @@ auto-detection" turned up three unrelated implementations:</p>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p><code>query_partition_with</code> is <code>obiskim query</code>'s normal query path — the one <p><code>query_partition_with</code> is <code>obikmer query</code>'s normal query path — the one
most exposed to repeated cross-partition lookups — and it is still the one most exposed to repeated cross-partition lookups — and it is still the one
with no cache at all. <code>obikphylo</code> built a cache first only because with no cache at all. <code>obikphylo</code> built a cache first only because
sibling-annex construction hits the cost hardest, not because the need is sibling-annex construction hits the cost hardest, not because the need is
@@ -3726,7 +3530,7 @@ above). Concretely, in order:</p>
<code>Vec&lt;KmerPartition&gt;</code> instead of <code>Vec&lt;Vec&lt;Layer&gt;&gt;</code>.</li> <code>Vec&lt;KmerPartition&gt;</code> instead of <code>Vec&lt;Vec&lt;Layer&gt;&gt;</code>.</li>
<li>Migrate <code>obikindex::query_layer::QueryLayer</code>/<code>query_partition_with</code> to <li>Migrate <code>obikindex::query_layer::QueryLayer</code>/<code>query_partition_with</code> to
use <code>KmerPartition</code> too, closing the "no cache at all" gap on use <code>KmerPartition</code> too, closing the "no cache at all" gap on
<code>obiskim</code>'s normal query path (see "Three independent implementations," <code>obikmer</code>'s normal query path (see "Three independent implementations,"
historical, above).</li> historical, above).</li>
</ol> </ol>
<p>Open before implementing: exact API shape of <code>KmerPartition</code> (propose, <p>Open before implementing: exact API shape of <code>KmerPartition</code> (propose,
@@ -3806,7 +3610,7 @@ storage decisions, now a <em>third</em> copy of the same logic to keep in sync)
<h2 id="one-bug-found-while-reading-around-this-signalled-not-fixed-one-earlier-claim-retracted">One bug found while reading around this (signalled, not fixed); one earlier claim retracted</h2> <h2 id="one-bug-found-while-reading-around-this-signalled-not-fixed-one-earlier-claim-retracted">One bug found while reading around this (signalled, not fixed); one earlier claim retracted</h2>
<ul> <ul>
<li><code>obicompactvec::bitmatrix::sparse.rs</code>'s module doc says <li><code>obicompactvec::bitmatrix::sparse.rs</code>'s module doc says
"Not used by any production code path yet" — false since <code>obiskim pack "Not used by any production code path yet" — false since <code>obikmer pack
--sparse</code> (<code>cmd/pack/mod.rs</code>) is wired to <code>pack_sparse_bit_matrix</code> and --sparse</code> (<code>cmd/pack/mod.rs</code>) is wired to <code>pack_sparse_bit_matrix</code> and
<code>Mat::open</code> already reads the result back in the sibling-annex path. <code>Mat::open</code> already reads the result back in the sibling-annex path.
Stale comment, not corrected.</li> Stale comment, not corrected.</li>
@@ -19,7 +19,7 @@
<title>Persistent bit vec.refs - obiskim</title> <title>Persistent bit vec.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -23,7 +23,7 @@
<title>PersistentBitVec - obiskim</title> <title>PersistentBitVec - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1259,62 +1147,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1573,35 +1405,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -19,7 +19,7 @@
<title>Persistent compact int vec.refs - obiskim</title> <title>Persistent compact int vec.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -23,7 +23,7 @@
<title>PersistentCompactIntVec - obiskim</title> <title>PersistentCompactIntVec - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1242,62 +1130,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1556,35 +1388,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Pipeline.refs - obiskim</title> <title>Pipeline.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+8 -204
View File
@@ -23,7 +23,7 @@
<title>Construction pipeline - obiskim</title> <title>Construction pipeline - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -884,34 +800,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1108,62 +996,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1422,35 +1254,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1653,8 +1457,8 @@
<p>The construction parameters p, n, and min_count depend on the kmer frequency spectrum of the dataset. Estimating this spectrum before construction avoids costly re-partitioning if p is badly chosen.</p> <p>The construction parameters p, n, and min_count depend on the kmer frequency spectrum of the dataset. Estimating this spectrum before construction avoids costly re-partitioning if p is badly chosen.</p>
<p>Two approaches are supported:</p> <p>Two approaches are supported:</p>
<ul> <ul>
<li><strong>External estimation (preferred):</strong> run <a href="https://github.com/bcgsc/ntCard">NT-CARD</a> on the input files and pass its histogram output to <code>obiskim build</code>. NT-CARD produces a kmer frequency histogram in a single streaming pass using ntHash and a Flajolet-Martin-style estimator; obiskim reads this file and derives p, n, and min_count automatically.</li> <li><strong>External estimation (preferred):</strong> run <a href="https://github.com/bcgsc/ntCard">NT-CARD</a> on the input files and pass its histogram output to <code>obikmer build</code>. NT-CARD produces a kmer frequency histogram in a single streaming pass using ntHash and a Flajolet-Martin-style estimator; obikmer reads this file and derives p, n, and min_count automatically.</li>
<li><strong>Internal estimation (future):</strong> an <code>obiskim estimate</code> subcommand for users who prefer a single-tool workflow. The implementation would combine two components: (1) <strong>ntHash</strong>, a rolling hash that updates the kmer hash in O(1) per nucleotide by incrementally adding the incoming base and removing the outgoing one — Rust crates exist; (2) a <strong>Flajolet-Martin-style streaming estimator</strong> that maintains a small table of minimum hash values and infers the frequency histogram from their statistical distribution, as described in the NT-CARD paper (Mohamadi <em>et al.</em> 2017)<sup id="fnref:Mohamadi2017-ok"><a class="footnote-ref" href="#fn:Mohamadi2017-ok">1</a></sup>.</li> <li><strong>Internal estimation (future):</strong> an <code>obikmer estimate</code> subcommand for users who prefer a single-tool workflow. The implementation would combine two components: (1) <strong>ntHash</strong>, a rolling hash that updates the kmer hash in O(1) per nucleotide by incrementally adding the incoming base and removing the outgoing one — Rust crates exist; (2) a <strong>Flajolet-Martin-style streaming estimator</strong> that maintains a small table of minimum hash values and infers the frequency histogram from their statistical distribution, as described in the NT-CARD paper (Mohamadi <em>et al.</em> 2017)<sup id="fnref:Mohamadi2017-ok"><a class="footnote-ref" href="#fn:Mohamadi2017-ok">1</a></sup>.</li>
</ul> </ul>
<p>The histogram gives:</p> <p>The histogram gives:</p>
<ul> <ul>
+13 -209
View File
@@ -23,7 +23,7 @@
<title>Select command - obiskim</title> <title>Select command - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -984,62 +872,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1550,35 +1382,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1935,7 +1739,7 @@ then <code>select</code> to reshape the genome columns.</p>
are preserved unchanged; only the data matrices are rewritten.</p> are preserved unchanged; only the data matrices are rewritten.</p>
<hr /> <hr />
<h2 id="synopsis">Synopsis</h2> <h2 id="synopsis">Synopsis</h2>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>&lt;input-index&gt; <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>&lt;input-index&gt;
<span class="w"> </span>--output<span class="w"> </span>&lt;dir&gt; <span class="w"> </span>--output<span class="w"> </span>&lt;dir&gt;
<span class="w"> </span><span class="o">[</span>--group<span class="w"> </span>&lt;name&gt;:&lt;pred&gt;<span class="w"> </span>...<span class="o">]</span> <span class="w"> </span><span class="o">[</span>--group<span class="w"> </span>&lt;name&gt;:&lt;pred&gt;<span class="w"> </span>...<span class="o">]</span>
<span class="w"> </span><span class="o">[</span>--group-op<span class="w"> </span>&lt;name&gt;:&lt;op&gt;<span class="w"> </span>...<span class="o">]</span> <span class="w"> </span><span class="o">[</span>--group-op<span class="w"> </span>&lt;name&gt;:&lt;op&gt;<span class="w"> </span>...<span class="o">]</span>
@@ -2105,11 +1909,11 @@ is &gt; N.</p>
<hr /> <hr />
<h2 id="examples">Examples</h2> <h2 id="examples">Examples</h2>
<h3 id="aggregate-by-metadata-group-default-operators">Aggregate by metadata group, default operators</h3> <h3 id="aggregate-by-metadata-group-default-operators">Aggregate by metadata group, default operators</h3>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span>--aggregate-by<span class="w"> </span>group <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span>--aggregate-by<span class="w"> </span>group
<span class="c1"># one column per unique value of &quot;group&quot;; presence→any, count→sum</span> <span class="c1"># one column per unique value of &quot;group&quot;; presence→any, count→sum</span>
</code></pre></div> </code></pre></div>
<h3 id="named-groups-with-different-operators">Named groups with different operators</h3> <h3 id="named-groups-with-different-operators">Named groups with different operators</h3>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;pub:species=Betula_pubescens&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;pub:species=Betula_pubescens&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;nan:species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;nan:species=Betula_nana&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--group-op<span class="w"> </span><span class="s2">&quot;pub:any&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--group-op<span class="w"> </span><span class="s2">&quot;pub:any&quot;</span><span class="w"> </span><span class="se">\</span>
@@ -2117,21 +1921,21 @@ is &gt; N.</p>
<span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;pub,nan&quot;</span> <span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;pub,nan&quot;</span>
</code></pre></div> </code></pre></div>
<h3 id="mix-aggregated-group-and-individual-genome">Mix aggregated group and individual genome</h3> <h3 id="mix-aggregated-group-and-individual-genome">Mix aggregated group and individual genome</h3>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;A:group=A&quot;</span><span class="w"> </span><span class="se">\</span> <span class="w"> </span>--group<span class="w"> </span><span class="s2">&quot;A:group=A&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;A,Betula_nana--IGA-24-39&quot;</span> <span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;A,Betula_nana--IGA-24-39&quot;</span>
</code></pre></div> </code></pre></div>
<h3 id="pure-column-projection-no-aggregation">Pure column projection (no aggregation)</h3> <h3 id="pure-column-projection-no-aggregation">Pure column projection (no aggregation)</h3>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span> <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>out<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;Betula_nana--TROM-V-149986,Betula_nana--AG-P04-25-01&quot;</span> <span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;Betula_nana--TROM-V-149986,Betula_nana--AG-P04-25-01&quot;</span>
</code></pre></div> </code></pre></div>
<h3 id="compose-with-filter">Compose with filter</h3> <h3 id="compose-with-filter">Compose with filter</h3>
<div class="highlight"><pre><span></span><code><span class="c1"># Step 1: keep only B. nana-specific k-mers</span> <div class="highlight"><pre><span></span><code><span class="c1"># Step 1: keep only B. nana-specific k-mers</span>
obiskim<span class="w"> </span>filter<span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>filtered<span class="w"> </span><span class="se">\</span> obikmer<span class="w"> </span>filter<span class="w"> </span>myindex<span class="w"> </span>--output<span class="w"> </span>filtered<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span> <span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">&quot;species=Betula_nana&quot;</span><span class="w"> </span>--outgroup<span class="w"> </span><span class="s2">&quot;*&quot;</span>
<span class="c1"># Step 2: aggregate genome columns by collection site</span> <span class="c1"># Step 2: aggregate genome columns by collection site</span>
obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>filtered<span class="w"> </span>--output<span class="w"> </span>final<span class="w"> </span>--aggregate-by<span class="w"> </span>site obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>filtered<span class="w"> </span>--output<span class="w"> </span>final<span class="w"> </span>--aggregate-by<span class="w"> </span>site
</code></pre></div> </code></pre></div>
<hr /> <hr />
<h2 id="implementation-notes">Implementation notes</h2> <h2 id="implementation-notes">Implementation notes</h2>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Storage.refs - obiskim</title> <title>Storage.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -23,7 +23,7 @@
<title>On-disk storage - obiskim</title> <title>On-disk storage - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -956,34 +872,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1180,62 +1068,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1494,35 +1326,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Superkmer.refs - obiskim</title> <title>Superkmer.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../../theory/pair_coverage_sampling/"> <link rel="prev" href="../../theory/evolutionary_distances/">
<link rel="next" href="../kmer/"> <link rel="next" href="../kmer/">
@@ -23,7 +23,7 @@
<title>SuperKmer - obiskim</title> <title>SuperKmer - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -862,34 +778,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -1086,62 +974,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1400,35 +1232,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -19,7 +19,7 @@
<title>Unitig evidence.refs - obiskim</title> <title>Unitig evidence.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../unitig_evidence/" class="md-nav__link"> <a href="../unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+12 -208
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../mphf_batch_queries/"> <link rel="prev" href="../mphf/">
<link rel="next" href="../evidence_elimination/"> <link rel="next" href="../evidence_elimination/">
@@ -23,7 +23,7 @@
<title>Unitig evidence encoding - obiskim</title> <title>Unitig evidence encoding - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -396,34 +396,6 @@
<li class="md-nav__item">
<a href="../../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../theory/evolutionary_distances/" class="md-nav__link"> <a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -446,62 +418,6 @@
<li class="md-nav__item">
<a href="../../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -760,34 +676,6 @@
<li class="md-nav__item">
<a href="../mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active"> <li class="md-nav__item md-nav__item--active">
@@ -1208,62 +1096,6 @@
<li class="md-nav__item">
<a href="../merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../filtering/" class="md-nav__link"> <a href="../filtering/" class="md-nav__link">
@@ -1522,35 +1354,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1862,8 +1666,8 @@
<li>Packed nucleotides: A=00, C=01, G=10, T=11, MSB-first within each byte; last byte zero-padded.</li> <li>Packed nucleotides: A=00, C=01, G=10, T=11, MSB-first within each byte; last byte zero-padded.</li>
<li>Byte count for packed sequence: <code>ceil(seql / 4)</code>.</li> <li>Byte count for packed sequence: <code>ceil(seql / 4)</code>.</li>
</ul> </ul>
<p>Unitigs with more than <code>MAX_KMERS_PER_CHUNK = 128</code> k-mers are transparently split into overlapping chunks. Each chunk has at most 128 k-mers (= <code>seql − k + 1 ≤ 128</code>); consecutive chunks overlap by k−1 nucleotides so no kmer is lost:</p> <p>Unitigs with more than <code>MAX_KMERS_PER_CHUNK = 256</code> k-mers are transparently split into overlapping chunks. Each chunk has at most 256 k-mers (= <code>seql − k + 1 ≤ 256</code>); consecutive chunks overlap by k−1 nucleotides so no kmer is lost:</p>
<div class="highlight"><pre><span></span><code>chunk 1: nucleotides [0, MAX_KMERS_PER_CHUNK + k − 2] (128 kmers) <div class="highlight"><pre><span></span><code>chunk 1: nucleotides [0, MAX_KMERS_PER_CHUNK + k − 2] (256 kmers)
chunk 2: nucleotides [256, end] (remaining kmers) chunk 2: nucleotides [256, end] (remaining kmers)
overlap: k−1 nucleotides shared between the two chunks overlap: k−1 nucleotides shared between the two chunks
</code></pre></div> </code></pre></div>
@@ -1920,8 +1724,8 @@ bits [6:0] = rank (7 bits, 0–127)
<tr> <tr>
<td><code>seql − k</code></td> <td><code>seql − k</code></td>
<td>8</td> <td>8</td>
<td>0–127 used</td> <td>0–255</td>
<td>max <code>n_kmers</code> per chunk = 128 = <code>MAX_KMERS_PER_CHUNK</code> (the field could carry 256; capped so that every rank fits 7 bits)</td> <td>max <code>n_kmers</code> per chunk = 256 = <code>MAX_KMERS_PER_CHUNK</code></td>
</tr> </tr>
<tr> <tr>
<td><code>rank</code></td> <td><code>rank</code></td>
@@ -1937,7 +1741,7 @@ bits [6:0] = rank (7 bits, 0–127)
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>The rank field is 7 bits (max 127) and the rank of a k-mer is its index among the chunk's k-mers, so a chunk must hold at most 128 of them: that is what <code>MAX_KMERS_PER_CHUNK = 128</code> guarantees. (Until 2026-10-15 the cap was 256 and the earlier justification here — that rank counts only canonical k-mers, at most half the total — was wrong: <code>iter_indexed_canonical_kmers</code> yields one entry per position. Chunks of 129–256 k-mers occur with few partitions — 6 of them in a <code>--partitions 4</code> index of a 2 GB skim, none with 256 partitions where the observed maximum is ≈ 50 — and their k-mers beyond rank 127 were silently stored with a truncated rank. <code>scripts/check_unitig_chunks.py</code> finds such chunks in an existing index.)</p> <p>The rank field is 7 bits (max 127) even though chunks can contain up to 256 k-mers, because rank counts only canonical kmers within the chunk, and the canonical kmer count is at most half the total.</p>
<hr /> <hr />
<h2 id="evidence-bit-cost">Evidence bit-cost</h2> <h2 id="evidence-bit-cost">Evidence bit-cost</h2>
<p>Strategy B (chunk_id + rank) is the implemented strategy. For <em>B. nana</em> (k=31, 256 partitions, P ≈ 10.4 M unique kmers/partition, U ≈ 275 k chunks/partition, m_u ≈ 37.9 kmers/chunk):</p> <p>Strategy B (chunk_id + rank) is the implemented strategy. For <em>B. nana</em> (k=31, 256 partitions, P ≈ 10.4 M unique kmers/partition, U ≈ 275 k chunks/partition, m_u ≈ 37.9 kmers/chunk):</p>
+12 -208
View File
@@ -21,7 +21,7 @@
<title>obiskim</title> <title>obikmer</title>
@@ -62,7 +62,7 @@
<div data-md-component="skip"> <div data-md-component="skip">
<a href="#obiskim" class="md-skip"> <a href="#obikmer" class="md-skip">
Skip to content Skip to content
</a> </a>
@@ -78,7 +78,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -92,7 +92,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -136,13 +136,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -496,34 +496,6 @@
<li class="md-nav__item">
<a href="theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="theory/evolutionary_distances/" class="md-nav__link"> <a href="theory/evolutionary_distances/" class="md-nav__link">
@@ -546,62 +518,6 @@
<li class="md-nav__item">
<a href="theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -858,34 +774,6 @@
<li class="md-nav__item">
<a href="implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="implementation/unitig_evidence/" class="md-nav__link"> <a href="implementation/unitig_evidence/" class="md-nav__link">
@@ -1082,62 +970,6 @@
<li class="md-nav__item">
<a href="implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="implementation/filtering/" class="md-nav__link"> <a href="implementation/filtering/" class="md-nav__link">
@@ -1396,35 +1228,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1599,8 +1403,8 @@
<h1 id="obiskim">obiskim</h1> <h1 id="obikmer">obikmer</h1>
<p><code>obiskim</code> is a Rust tool for manipulation, counting, indexing, and set operations on DNA sequences represented as kmer sets.</p> <p><code>obikmer</code> is a Rust tool for manipulation, counting, indexing, and set operations on DNA sequences represented as kmer sets.</p>
<h2 id="subcommands">Subcommands</h2> <h2 id="subcommands">Subcommands</h2>
<table> <table>
<thead> <thead>
@@ -1640,7 +1444,7 @@
</tr> </tr>
<tr> <tr>
<td><code>phylo</code></td> <td><code>phylo</code></td>
<td>Genome-vs-genome distances, trees and SNP-based pseudo-alignments. <code>--distance</code> selects either a whole-genome distance computed from k-mer content (<code>jaccard</code>, <code>mash</code>, <code>hamming</code>, <code>bray-curtis</code>, <code>relfreq-bray-curtis</code>, <code>euclidean</code>, <code>relfreq-euclidean</code>, <code>hellinger</code>, <code>hellinger-euclidean</code>; <code>--presence-threshold N</code> converts counts to presence for Jaccard/Mash/Hamming on count indexes) or a <code>snp-*</code> distance (<code>snp-raw</code>, <code>snp-jc</code>, <code>snp-k2p</code>, <code>snp-k81</code>, <code>snp-f81</code>, <code>snp-t92</code>, <code>snp-tn93</code>, <code>snp-tv</code>; optional <code>--gamma-shape</code>) computed from central-position SNPs of k-mer families. <code>--nj</code>/<code>--upgma</code> build trees (Jaccard if no <code>--distance</code>); <code>--shared-kmers</code> writes the shared-k-mer count matrix on its own. SNP analyses read the sibling annex, built on demand (<code>--sibling-annex</code> forces it), with site selection/sampling options (<code>--n-sites</code>, <code>--quartet</code>, <code>--pair-balance</code>, <code>--entropy</code>, <code>--free-loss</code>, <code>--no-ambiguity</code>/<code>--only-diploid</code>, <code>--session</code>), a pseudo-alignment export (<code>--pseudo-alignment</code>, <code>--fasta</code>, <code>--vcf</code>) and Sankoff cost calibration with TNT/PhyG/IQ-TREE exports. See <a href="theory/evolutionary_distances/">evolutionary distances</a></td> <td>Compute pairwise evolutionary-distance proxies between genomes (<code>--metric jaccard\|mash\|hamming\|bray-curtis\|relfreq-bray-curtis\|euclidean\|relfreq-euclidean\|hellinger\|hellinger-euclidean</code>); optionally build NJ/UPGMA trees; <code>--presence-threshold N</code> sets the minimum count to consider a k-mer present when computing Jaccard/Mash on count indexes (default 1); optionally a central-position SNP/Sankoff calibration with exports for TNT/PhyG/IQ-TREE (see <a href="theory/evolutionary_distances/">evolutionary distances</a>)</td>
</tr> </tr>
<tr> <tr>
<td><code>unitig</code></td> <td><code>unitig</code></td>
@@ -1655,8 +1459,8 @@
<td>Estimate approximate-index parameters (z, evidence bits, FP rates) before indexing</td> <td>Estimate approximate-index parameters (z, evidence bits, FP rates) before indexing</td>
</tr> </tr>
<tr> <tr>
<td><code>convert</code></td> <td><code>reindex</code></td>
<td>Convert an index's evidence representation (exact / approximate / hybrid), in place</td> <td>Convert an index's evidence in-place: exact ↔ approx</td>
</tr> </tr>
<tr> <tr>
<td><code>utils</code></td> <td><code>utils</code></td>
+8 -204
View File
@@ -19,7 +19,7 @@
<title>Index.refs - obiskim</title> <title>Index.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../theory/evolutionary_distances/" class="md-nav__link"> <a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/unitig_evidence/" class="md-nav__link"> <a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/filtering/" class="md-nav__link"> <a href="../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1466,8 +1270,8 @@
<h1 id="coverage-indexmd">Coverage: index.md</h1> <h1 id="coverage-indexmd">Coverage: index.md</h1>
<h2 id="code-couvert">Code couvert</h2> <h2 id="code-couvert">Code couvert</h2>
<ul> <ul>
<li><code>obiskim/src/main.rs</code> — point d'entrée CLI, contraintes globales</li> <li><code>obikmer/src/main.rs</code> — point d'entrée CLI, contraintes globales</li>
<li><code>obiskim/src/cli.rs</code> — structure des arguments communs</li> <li><code>obikmer/src/cli.rs</code> — structure des arguments communs</li>
</ul> </ul>
<h2 id="notes">Notes</h2> <h2 id="notes">Notes</h2>
<p>Document de niveau projet (vue d'ensemble, motivations, contraintes fondamentales). <p>Document de niveau projet (vue d'ensemble, motivations, contraintes fondamentales).
+12 -208
View File
@@ -23,7 +23,7 @@
<title>Installation - obiskim</title> <title>Installation - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -582,34 +582,6 @@
<li class="md-nav__item">
<a href="../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../theory/evolutionary_distances/" class="md-nav__link"> <a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -632,62 +604,6 @@
<li class="md-nav__item">
<a href="../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -944,34 +860,6 @@
<li class="md-nav__item">
<a href="../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/unitig_evidence/" class="md-nav__link"> <a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -1168,62 +1056,6 @@
<li class="md-nav__item">
<a href="../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/filtering/" class="md-nav__link"> <a href="../implementation/filtering/" class="md-nav__link">
@@ -1482,35 +1314,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1772,12 +1576,12 @@
<h1 id="installation">Installation</h1> <h1 id="installation">Installation</h1>
<h2 id="prerequisites">Prerequisites</h2> <h2 id="prerequisites">Prerequisites</h2>
<h3 id="rust-toolchain">Rust toolchain</h3> <h3 id="rust-toolchain">Rust toolchain</h3>
<p><code>obiskim</code> requires <strong>Rust 1.85 or later</strong> (edition 2024). Install or update via <a href="https://rustup.rs">rustup</a>:</p> <p><code>obikmer</code> requires <strong>Rust 1.85 or later</strong> (edition 2024). Install or update via <a href="https://rustup.rs">rustup</a>:</p>
<div class="highlight"><pre><span></span><code>curl<span class="w"> </span>--proto<span class="w"> </span><span class="s1">&#39;=https&#39;</span><span class="w"> </span>--tlsv1.2<span class="w"> </span>-sSf<span class="w"> </span>https://sh.rustup.rs<span class="w"> </span><span class="p">|</span><span class="w"> </span>sh <div class="highlight"><pre><span></span><code>curl<span class="w"> </span>--proto<span class="w"> </span><span class="s1">&#39;=https&#39;</span><span class="w"> </span>--tlsv1.2<span class="w"> </span>-sSf<span class="w"> </span>https://sh.rustup.rs<span class="w"> </span><span class="p">|</span><span class="w"> </span>sh
rustup<span class="w"> </span>update<span class="w"> </span>stable rustup<span class="w"> </span>update<span class="w"> </span>stable
</code></pre></div> </code></pre></div>
<h3 id="c-build-environment-required-for-hwloc">C build environment (required for hwloc)</h3> <h3 id="c-build-environment-required-for-hwloc">C build environment (required for hwloc)</h3>
<p><code>obiskim</code> embeds <a href="https://www.open-mpi.org/projects/hwloc/">hwloc</a> (Hardware Locality) for NUMA-aware thread placement on multi-socket machines. hwloc is built from source at compile time via the <code>vendored</code> feature of the <code>hwlocality</code> crate. This requires a standard C build environment.</p> <p><code>obikmer</code> embeds <a href="https://www.open-mpi.org/projects/hwloc/">hwloc</a> (Hardware Locality) for NUMA-aware thread placement on multi-socket machines. hwloc is built from source at compile time via the <code>vendored</code> feature of the <code>hwlocality</code> crate. This requires a standard C build environment.</p>
<h4 id="linux-debianubuntu">Linux (Debian/Ubuntu)</h4> <h4 id="linux-debianubuntu">Linux (Debian/Ubuntu)</h4>
<div class="highlight"><pre><span></span><code>apt<span class="w"> </span>install<span class="w"> </span>build-essential<span class="w"> </span>automake<span class="w"> </span>libtool<span class="w"> </span>autoconf<span class="w"> </span>pkg-config <div class="highlight"><pre><span></span><code>apt<span class="w"> </span>install<span class="w"> </span>build-essential<span class="w"> </span>automake<span class="w"> </span>libtool<span class="w"> </span>autoconf<span class="w"> </span>pkg-config
</code></pre></div> </code></pre></div>
@@ -1794,17 +1598,17 @@ rustup<span class="w"> </span>update<span class="w"> </span>stable
</code></pre></div> </code></pre></div>
<h2 id="building">Building</h2> <h2 id="building">Building</h2>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>clone<span class="w"> </span>&lt;repository-url&gt; <div class="highlight"><pre><span></span><code>git<span class="w"> </span>clone<span class="w"> </span>&lt;repository-url&gt;
<span class="nb">cd</span><span class="w"> </span>obiskim/src <span class="nb">cd</span><span class="w"> </span>obikmer/src
cargo<span class="w"> </span>build<span class="w"> </span>--release cargo<span class="w"> </span>build<span class="w"> </span>--release
</code></pre></div> </code></pre></div>
<p>The compiled binary is at <code>target/release/obiskim</code>.</p> <p>The compiled binary is at <code>target/release/obikmer</code>.</p>
<h3 id="building-on-hpc-clusters-network-filesystems">Building on HPC clusters (network filesystems)</h3> <h3 id="building-on-hpc-clusters-network-filesystems">Building on HPC clusters (network filesystems)</h3>
<p>HPC home directories are typically on a network filesystem (Lustre, NFS) optimised for large sequential reads — not for the thousands of small file operations that Cargo generates during compilation. Building directly on such a filesystem can be extremely slow (0.1% CPU utilisation, tens of minutes for what should take seconds).</p> <p>HPC home directories are typically on a network filesystem (Lustre, NFS) optimised for large sequential reads — not for the thousands of small file operations that Cargo generates during compilation. Building directly on such a filesystem can be extremely slow (0.1% CPU utilisation, tens of minutes for what should take seconds).</p>
<p><strong>Always redirect the build directory to a local scratch disk:</strong></p> <p><strong>Always redirect the build directory to a local scratch disk:</strong></p>
<div class="highlight"><pre><span></span><code><span class="nv">CARGO_TARGET_DIR</span><span class="o">=</span>/scratch/<span class="nv">$USER</span>/cargo-target<span class="w"> </span>cargo<span class="w"> </span>build<span class="w"> </span>--release <div class="highlight"><pre><span></span><code><span class="nv">CARGO_TARGET_DIR</span><span class="o">=</span>/scratch/<span class="nv">$USER</span>/cargo-target<span class="w"> </span>cargo<span class="w"> </span>build<span class="w"> </span>--release
</code></pre></div> </code></pre></div>
<p>Adapt the path to the local scratch available on your cluster (<code>/var/tmp</code>, <code>/tmp</code>, <code>/scratch/local</code>, etc.). Once built, copy the binary to a permanent location:</p> <p>Adapt the path to the local scratch available on your cluster (<code>/var/tmp</code>, <code>/tmp</code>, <code>/scratch/local</code>, etc.). Once built, copy the binary to a permanent location:</p>
<div class="highlight"><pre><span></span><code>cp<span class="w"> </span>/scratch/<span class="nv">$USER</span>/cargo-target/release/obiskim<span class="w"> </span>~/bin/ <div class="highlight"><pre><span></span><code>cp<span class="w"> </span>/scratch/<span class="nv">$USER</span>/cargo-target/release/obikmer<span class="w"> </span>~/bin/
</code></pre></div> </code></pre></div>
<h2 id="numa-support">NUMA support</h2> <h2 id="numa-support">NUMA support</h2>
<p>NUMA-aware thread placement is active automatically on multi-socket Linux machines (detected at runtime via hwloc). No special build flag is required — the detection is built in and falls back gracefully to the single-pool adaptive strategy on:</p> <p>NUMA-aware thread placement is active automatically on multi-socket Linux machines (detected at runtime via hwloc). No special build flag is required — the detection is built in and falls back gracefully to the single-pool adaptive strategy on:</p>
@@ -1814,7 +1618,7 @@ cargo<span class="w"> </span>build<span class="w"> </span>--release
<li>any system where hwloc reports only one NUMA node</li> <li>any system where hwloc reports only one NUMA node</li>
</ul> </ul>
<h2 id="verifying-the-installation">Verifying the installation</h2> <h2 id="verifying-the-installation">Verifying the installation</h2>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>--help <div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>--help
</code></pre></div> </code></pre></div>
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Kmers.refs - obiskim</title> <title>Kmers.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../theory/evolutionary_distances/" class="md-nav__link"> <a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/unitig_evidence/" class="md-nav__link"> <a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/filtering/" class="md-nav__link"> <a href="../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -23,7 +23,7 @@
<title>Kmers and super-kmers - obiskim</title> <title>Kmers and super-kmers - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -495,34 +495,6 @@
<li class="md-nav__item">
<a href="../theory/chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../theory/evolutionary_distances/" class="md-nav__link"> <a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -545,62 +517,6 @@
<li class="md-nav__item">
<a href="../theory/sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../theory/pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -857,34 +773,6 @@
<li class="md-nav__item">
<a href="../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/unitig_evidence/" class="md-nav__link"> <a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -1081,62 +969,6 @@
<li class="md-nav__item">
<a href="../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../implementation/filtering/" class="md-nav__link"> <a href="../implementation/filtering/" class="md-nav__link">
@@ -1395,35 +1227,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
Binary file not shown.
File diff suppressed because it is too large. Load diff
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Encoding.refs - obiskim</title> <title>Encoding.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -23,7 +23,7 @@
<title>DNA encoding - obiskim</title> <title>DNA encoding - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -467,34 +467,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -517,62 +489,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -829,34 +745,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1053,62 +941,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1367,35 +1199,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+7 -203
View File
@@ -19,7 +19,7 @@
<title>Entropy.refs - obiskim</title> <title>Entropy.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1474,7 +1278,7 @@
<h2 id="notes">Notes</h2> <h2 id="notes">Notes</h2>
<p>Le repli en classes d'équivalence circulaires + brin inverse (décrit dans une version antérieure de ce document) a été supprimé : voir la section « Why no equivalence classes » de <code>entropy.md</code> pour la justification théorique et numérique.</p> <p>Le repli en classes d'équivalence circulaires + brin inverse (décrit dans une version antérieure de ce document) a été supprimé : voir la section « Why no equivalence classes » de <code>entropy.md</code> pour la justification théorique et numérique.</p>
<p>Vérifier que les paramètres <code>theta</code> et <code>level_max</code> dans le CLI <p>Vérifier que les paramètres <code>theta</code> et <code>level_max</code> dans le CLI
(<code>obiskim/src/cli.rs</code> → <code>CommonArgs</code>) correspondent bien à ce qui est décrit.</p> (<code>obikmer/src/cli.rs</code> → <code>CommonArgs</code>) correspondent bien à ce qui est décrit.</p>
+6 -202
View File
@@ -23,7 +23,7 @@
<title>Entropy filter - obiskim</title> <title>Entropy filter - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -533,34 +533,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -583,62 +555,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -895,34 +811,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1119,62 +1007,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1433,35 +1265,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
File diff suppressed because it is too large. Load diff
+7 -203
View File
@@ -19,7 +19,7 @@
<title>Indexing.refs - obiskim</title> <title>Indexing.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
@@ -1471,7 +1275,7 @@
</ul> </ul>
<h2 id="notes">Notes</h2> <h2 id="notes">Notes</h2>
<p>Vérifier que la doc mentionne bien que le nombre de partitions est une puissance de 2 <p>Vérifier que la doc mentionne bien que le nombre de partitions est une puissance de 2
(converti par <code>partitions_to_bits</code> dans <code>obiskim/src/cli.rs</code>).</p> (converti par <code>partitions_to_bits</code> dans <code>obikmer/src/cli.rs</code>).</p>
+7 -203
View File
@@ -12,7 +12,7 @@
<link rel="prev" href="../minimizer/"> <link rel="prev" href="../minimizer/">
<link rel="next" href="../chance_sharing/"> <link rel="next" href="../evolutionary_distances/">
@@ -23,7 +23,7 @@
<title>Partitioning architecture - obiskim</title> <title>Partitioning architecture - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -467,34 +467,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -517,62 +489,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -829,34 +745,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1053,62 +941,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1367,35 +1199,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -19,7 +19,7 @@
<title>Minimizer.refs - obiskim</title> <title>Minimizer.refs - obikmer</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -134,13 +134,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -392,34 +392,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -442,62 +414,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -754,34 +670,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -978,62 +866,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1292,35 +1124,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
+6 -202
View File
@@ -23,7 +23,7 @@
<title>Minimizer selection - obiskim</title> <title>Minimizer selection - obikmer</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header"> <header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header"> <nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis"> <div class="md-header__ellipsis">
<div class="md-header__topic"> <div class="md-header__topic">
<span class="md-ellipsis"> <span class="md-ellipsis">
obiskim obikmer
</span> </span>
</div> </div>
<div class="md-header__topic" data-md-component="header-topic"> <div class="md-header__topic" data-md-component="header-topic">
@@ -138,13 +138,13 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0"> <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer"> <label class="md-nav__title" for="__drawer">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo"> <a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a> </a>
obiskim obikmer
</label> </label>
<ul class="md-nav__list" data-md-scrollfix> <ul class="md-nav__list" data-md-scrollfix>
@@ -511,34 +511,6 @@
<li class="md-nav__item">
<a href="../chance_sharing/" class="md-nav__link">
<span class="md-ellipsis">
Chance sharing across genomes (discussion)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../evolutionary_distances/" class="md-nav__link"> <a href="../evolutionary_distances/" class="md-nav__link">
@@ -561,62 +533,6 @@
<li class="md-nav__item">
<a href="../sibling_partition_unification/" class="md-nav__link">
<span class="md-ellipsis">
Sibling partition unification (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../pair_coverage_sampling/" class="md-nav__link">
<span class="md-ellipsis">
Pair-coverage-biased family sampling (discussion)
</span>
</a>
</li>
</ul> </ul>
</nav> </nav>
@@ -873,34 +789,6 @@
<li class="md-nav__item">
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
<span class="md-ellipsis">
MPHF batch queries (inventory)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/unitig_evidence/" class="md-nav__link"> <a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1097,62 +985,6 @@
<li class="md-nav__item">
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
<span class="md-ellipsis">
Merge mmap audit (2026-11)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../implementation/merge_scaling/" class="md-nav__link">
<span class="md-ellipsis">
Merge scaling (open)
</span>
</a>
</li>
<li class="md-nav__item"> <li class="md-nav__item">
<a href="../../implementation/filtering/" class="md-nav__link"> <a href="../../implementation/filtering/" class="md-nav__link">
@@ -1411,35 +1243,7 @@
<span class="md-ellipsis"> <span class="md-ellipsis">
Sibling annex Sibling annex (discussion)
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 573 files, more files were not shown because too many files have changed in this diff. Show more