docs: rename project to obiskim and expand documentation

Rename the project from "obikmer" to "obiskim" across all documentation, user guides, and developer notes. Add extensive new theoretical and implementation documentation covering chance sharing, sibling partition unification, pair-coverage sampling, MPHF batch queries, merge scaling, and hot resume/memoization. Update navigation structures to reflect these new topics and the new project name.

- Rename "obikmer" to "obiskim" in all HTML titles, headers, navigation labels, and code examples across `DevDoc/` and `doc/` directories.
- Add new navigation links for "Chance sharing across genomes", "Sibling partition unification", "Pair-coverage-biased family sampling", "MPHF batch queries", "Merge mmap audit", "Merge scaling", and "Hot resume and memoization" throughout the documentation site.
- Move `DevDoc/architecture/numa_worker_pools/index.html` to `DevDoc/architecture/hot_resume_memoization/index.html` and update content to focus on hot resume and memoization strategies.
- Move `DevDoc/implementation/evidence_elimination/index.html` to `DevDoc/implementation/merge_mmap_audit/index.html` and update content to detail merge mmap audit findings and plans.
- Move `DevDoc/implementation/superkmer.refs/index.html` to `DevDoc/implementation/merge_scaling/index.html` and update content to discuss merge scaling costs and dependencies.
- Move `DevDoc/theory/indexing/index.html` to `DevDoc/theory/chance_sharing/index.html` and rewrite content to discuss chance sharing across genomes and null models.
- Move `DevDoc/theory/minimizer/index.html` to `DevDoc/theory/sibling_partition_unification/index.html` and update content to discuss sibling partition unification and Can3 masked canonical form.
- Add new `DevDoc/implementation/mphf_batch_queries/index.html` documenting MPHF batch query performance and inventory.
- Add new `DevDoc/theory/pair_coverage_sampling/index.html` documenting pair-coverage-biased family sampling theory and diagnostics.
- Update `DevDoc/architecture/query/index.html` to describe `by_partition` using `Vec<PartitionKmers>` instead of `HashMap` for reduced memory usage.
- Update `DevDoc/implementation/merge/index.html` to describe bootstrap output logic selecting base source by largest `unitigs.bin` size and using `MatrixBuilder::resume`.
- Update `DevDoc/implementation/unitig_evidence/index.html` to change `MAX_KMERS_PER_CHUNK` from 256 to 128 and update rank field documentation.
- Update `DevDoc/implementation/obipipeline/index.html` to reflect that `obiskim` uses `make_pipe!` and `.apply()` instead of `make_pipeline!` / `WorkerPool`.
- Update `DevDoc/implementation/filtering/index.html` to change `FilterArgs` inheritance to `obiskim::cmd::predicate::FilterArgs`.
- Update `DevDoc/implementation/partition_layer_cache/index.html` to reflect new crate dependency structure requiring external reachability for algorithm implementation traits.
- Update `doc/formats/index_layout/index.html` to describe new directory structure for index files including `part_NNNNN/index/layer_X/` and updated merging/packing logic.
- Update `doc/formats/vcf/index.html` to use `obiskim` prefixes for contigs and update VCF header source.
- Update `doc/usage/estimate/index.html` to add "Comparing an index with random sharing" section and clarify `--index` and `--presence-threshold` options.
- Update `doc/usage/phylo/index.html` to clarify that running `obiskim phylo` twice draws independent samples and update `--sibling-annex` behavior.
- Update `doc/usage/select/index.html` to clarify that `select` always writes to a new output directory and explains hard-linking mechanism.
- Add new BibTeX entries for Karlin et al. and Bennett et al. in `doc/references.bib`.
- Delete `scripts/smoke_test_index2.sh` which contained end-to-end smoke tests for `obikmer2 index` and `obikmer query`.
- Update `src/Cargo.lock` to bump "obiskim" package dependency from 1.4.8 to 1.4.9.
This commit is contained in:
Eric Coissac committed 2026-12-02 16:12:54 +01:00
1 parent 917cb26186
commit f1b4b4ebda
102 files changed
+27255 -1226

No files matched your search

+201 -5
View File
@@ -19,7 +19,7 @@
<title>obikmer</title>
<title>obiskim</title>
@@ -71,7 +71,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="/." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="/." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -85,7 +85,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="/." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="/." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -387,6 +387,34 @@
<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">
<a href="/theory/evolutionary_distances/" class="md-nav__link">
@@ -409,6 +437,62 @@
<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>
</nav>
@@ -665,6 +749,34 @@
<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">
<a href="/implementation/unitig_evidence/" class="md-nav__link">
@@ -861,6 +973,62 @@
<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">
<a href="/implementation/filtering/" class="md-nav__link">
@@ -1139,6 +1307,34 @@
<li class="md-nav__item">
<a href="/architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="/architecture/numa_worker_pools/" class="md-nav__link">
File diff suppressed because it is too large. Load diff
@@ -19,7 +19,7 @@
<title>Index architecture.refs - obikmer</title>
<title>Index architecture.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -23,7 +23,7 @@
<title>Kmer index - obikmer</title>
<title>Kmer index - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -674,6 +758,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -870,6 +982,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1390,6 +1558,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -21,7 +21,7 @@
<title>NUMA-aware partition runner - obikmer</title>
<title>NUMA-aware partition runner - obiskim</title>
@@ -78,7 +78,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -92,7 +92,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -394,6 +394,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -416,6 +444,62 @@
<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>
</nav>
@@ -672,6 +756,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -868,6 +980,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1148,6 +1316,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -9,7 +9,7 @@
<link rel="prev" href="../siblings/">
<link rel="prev" href="../hot_resume_memoization/">
<link rel="next" href="../numa_partition_runner/">
@@ -23,7 +23,7 @@
<title>NUMA-aware worker pools - obikmer</title>
<title>NUMA-aware worker pools - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -674,6 +758,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -870,6 +982,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1148,6 +1316,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
+202 -6
View File
@@ -19,7 +19,7 @@
<title>Query.refs - obikmer</title>
<title>Query.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -1270,7 +1466,7 @@
<h1 id="coverage-architecturequerymd">Coverage: architecture/query.md</h1>
<h2 id="code-couvert">Code couvert</h2>
<ul>
<li><code>obikmer/src/cmd/query.rs</code> — commande query, format de sortie</li>
<li><code>obiskim/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>obiread/src/lib.rs</code> — lecture des séquences d'entrée pour la requête</li>
</ul>
+350 -20
View File
@@ -19,7 +19,7 @@
<title>Query system - obikmer</title>
<title>Query system - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -1524,6 +1720,45 @@
</ul>
</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>
</ul>
@@ -1561,7 +1796,7 @@
decompose all sequences into superkmers (SuperKmerIter) — construction only,
not the dedup key
deduplicate at k-mer granularity, split by partition in the same pass:
by_partition: Vec&lt;HashMap&lt;CanonicalKmer, Vec&lt;KmerDesc&gt;&gt;&gt; ← KmerDesc = (seq_idx, pos)
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)
allocate SmerIndex (SmerIndex::new): in_index: Vec&lt;bool&gt;, sized total_smers —
NOT multiplied by n_genomes
allocate by_genome: Vec&lt;Vec&lt;(seq_idx, pos, value)&gt;&gt;, one empty Vec per genome —
@@ -1733,7 +1968,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>
<hr />
<h2 id="cli">CLI</h2>
<div class="highlight"><pre><span></span><code>obikmer query &lt;index&gt; [--detail] [--mismatch] [--count-missing]
<div class="highlight"><pre><span></span><code>obiskim query &lt;index&gt; [--detail] [--mismatch] [--count-missing]
[--force-presence] [--presence-threshold &lt;n&gt;]
[-z &lt;z&gt;] [-T &lt;threads&gt;] [--chunk-size &lt;MiB&gt;]
&lt;query.fa&gt; [&lt;query2.fa&gt; ...]
@@ -1813,7 +2048,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>
<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.
<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>
<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>
<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>
</blockquote>
@@ -1834,19 +2069,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>
<hr />
<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>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>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>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>
<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>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>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>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>
<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>
<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><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>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>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 <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 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>Deliverable used by every phase below</strong>: a before/after throughput and core-utilization measurement on the reference machine.</li>
@@ -1854,7 +2089,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>
<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>
<li><code>obikmer/src/cmd/query.rs</code>:</li>
<li><code>obiskim/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>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>
@@ -1867,7 +2102,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>
<p><strong>Goal</strong>: <code>chunk_bytes</code> reflects actual per-chunk memory (<code>O(n_genomes)</code>), not a fixed multiplier.</p>
<ul>
<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:
<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:
<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>
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>
@@ -1879,7 +2114,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>
<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>
<li><code>obikmer/src/cmd/query.rs</code>:</li>
<li><code>obiskim/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><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>
@@ -1888,14 +2123,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><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><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>
<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>
</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>
<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>
- <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>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.
- <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.
- 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>
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.
@@ -1907,14 +2142,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>
<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>
<li><code>obikmer/src/cmd/query.rs</code>, <code>process_chunk</code>:</li>
<li><code>obiskim/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>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>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>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>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>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>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>
</ul>
@@ -1923,7 +2158,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.
- <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).
- <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>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>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>
<h3 id="phase-6-parallel-gzip-decompression-independent-optional">Phase 6 — Parallel gzip decompression (independent, optional)</h3>
@@ -1934,6 +2169,101 @@ 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>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>
<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>
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Rebuild / filter — column-first design - obikmer</title>
<title>Rebuild / filter — column-first design - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -19,7 +19,7 @@
<title>Invariant.refs - obikmer</title>
<title>Invariant.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../numa_worker_pools/" class="md-nav__link">
@@ -23,7 +23,7 @@
<title>Sequences - obikmer</title>
<title>Sequences - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -674,6 +758,34 @@
<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">
<a href="../../../implementation/unitig_evidence/" class="md-nav__link">
@@ -870,6 +982,62 @@
<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">
<a href="../../../implementation/filtering/" class="md-nav__link">
@@ -1160,6 +1328,34 @@
<li class="md-nav__item">
<a href="../../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../numa_worker_pools/" class="md-nav__link">
+203 -10
View File
@@ -12,7 +12,7 @@
<link rel="prev" href="../index_architecture/">
<link rel="next" href="../numa_worker_pools/">
<link rel="next" href="../hot_resume_memoization/">
@@ -23,7 +23,7 @@
<title>Sibling annex - obikmer</title>
<title>Sibling annex - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -674,6 +758,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -870,6 +982,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1296,6 +1464,34 @@
<li class="md-nav__item">
<a href="../hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../numa_worker_pools/" class="md-nav__link">
@@ -1496,9 +1692,6 @@
<h1 id="sibling-annex-snp-family-pipeline-architecture">Sibling annex &amp; SNP-family pipeline — architecture</h1>
<p>Current state of <code>obikphylo::siblings</code> (crate <code>obikphylo</code>, module <code>siblings</code>).
Historical rationale, dated findings, and superseded designs live in <code>jj</code>
history, not here.</p>
<h2 id="data-model">Data model</h2>
<p>A <strong>family</strong> is the up-to-4 k-mers sharing all flanks and differing only at
the central base (well-defined for odd <code>k</code>). <code>FamilyMask</code> (<code>siblingannex.rs</code>)
@@ -1623,7 +1816,7 @@ operations with no cross-invocation sharing concern: <code>build_sibling_annex</
<code>shannon_entropy_csv</code>, <code>sibling_family_size_histogram</code>/<code>sibling_annex_stats</code>,
<code>family_overlap</code>. The sampled SNP path (<code>sampled_scan</code>, <code>AlignmentReducer</code>,
<code>PairwiseReducer</code>, <code>distance_matrix</code>, <code>SankoffBundle</code>) is <strong>not</strong> wrapped in
trait methods — the CLI (<code>obikmer::cmd::phylo</code>) composes them directly,
trait methods — the CLI (<code>obiskim::cmd::phylo</code>) composes them directly,
because it alone knows the union of reducers a given invocation needs
(<code>--pseudo-alignment</code>/Sankoff group/<code>snp-*</code> <code>--distance</code> can combine in one
call). A per-output trait method would have to either duplicate that
@@ -23,7 +23,7 @@
<title>Benchmark: query-path testing - obikmer</title>
<title>Benchmark: query-path testing - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -872,6 +984,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1285,6 +1453,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1476,8 +1672,8 @@
<h1 id="benchmark-query-path-testing">Benchmark: query-path testing</h1>
<p><code>benchmark/Makefile</code> exercises indexing, merge, and phylo distance
reconstruction against simulated bacterial genomes. It now also covers
<code>obikmer query</code> — the read-matching path — and the sparse packed
presence-matrix format (<code>obikmer pack --sparse</code>), previously untested by
<code>obiskim query</code> — the read-matching path — and the sparse packed
presence-matrix format (<code>obiskim pack --sparse</code>), previously untested by
this pipeline.</p>
<h2 id="motivation">Motivation</h2>
<ul>
@@ -1511,7 +1707,7 @@ without duplicating the exhaustive per-specimen coverage
<code>verify_merge_presence</code> already provides across all <code>SPECIMENS</code>.</p>
<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
<code>global_index_presence/</code> wholesale, then <code>obikmer pack --sparse</code> in place.
<code>global_index_presence/</code> wholesale, then <code>obiskim pack --sparse</code> in place.
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
dense-packing — <code>pack_sparse_bit_matrix</code> (<code>obicompactvec/src/bitmatrix/sparse.rs:447</code>)
@@ -1519,7 +1715,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
afterward. No separate merge run needed.</p>
<h2 id="query-runs">Query runs</h2>
<p><code>query_one.sh dense|sparse SPECIMEN</code> runs <code>obikmer query --count-missing</code>
<p><code>query_one.sh dense|sparse SPECIMEN</code> runs <code>obiskim query --count-missing</code>
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
captured to <code>stats/query_{dense,sparse}/SPECIMEN.stats</code> (same
@@ -19,7 +19,7 @@
<title>Chunkreader.refs - obikmer</title>
<title>Chunkreader.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+89 -5
View File
@@ -9,7 +9,7 @@
<link href="../pipeline/" rel="next"/>
<link href="../../assets/images/favicon.png" rel="icon"/>
<meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/>
<title>Chunk reader - obikmer</title>
<title>Chunk reader - obiskim</title>
<link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/>
<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"/>
@@ -29,7 +29,7 @@
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav aria-label="Header" class="md-header__inner md-grid">
<a aria-label="obikmer" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<a aria-label="obiskim" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obiskim">
<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>
<label class="md-header__button md-icon" for="__drawer">
@@ -39,7 +39,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
@@ -62,10 +62,10 @@
<div class="md-sidebar__inner">
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a aria-label="obikmer" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<a aria-label="obiskim" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obiskim">
<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>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
@@ -172,6 +172,18 @@
</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>
</a>
</li>
@@ -184,6 +196,30 @@
</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>
</a>
</li>
@@ -377,6 +413,18 @@
</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>
</a>
</li>
@@ -461,6 +509,30 @@
</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>
</a>
</li>
@@ -583,6 +655,18 @@
</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
</span>
</a>
</li>
@@ -19,7 +19,7 @@
<title>Evidence elimination.refs - obikmer</title>
<title>Evidence elimination.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1274,9 +1470,9 @@
<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/reindex.rs</code> — KmerIndex::reindex(), conversion exact↔approx en place</li>
<li><code>obikmer/src/cmd/reindex.rs</code> — CLI reindex, options --approx, -z, --evidence-bits, --fp, --block-size</li>
<li><code>obikmer/src/cmd/index.rs</code> — resolve_approx_params(), options --approx, -z, --evidence-bits, --fp</li>
<li><code>obikmer/src/cmd/estimate.rs</code> — commande estimate (dry-run des paramètres)</li>
<li><code>obiskim/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>obiskim/src/cmd/estimate.rs</code> — commande estimate (dry-run des paramètres)</li>
</ul>
<h2 id="notes">Notes</h2>
<p>Ce document était à l'origine une discussion de design (4 approches). L'implémentation
@@ -23,7 +23,7 @@
<title>Evidence elimination (discussion) - obikmer</title>
<title>Evidence elimination (discussion) - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1007,6 +1119,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1285,6 +1453,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+213 -17
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../merge_parallelism/">
<link rel="prev" href="../merge_scaling/">
<link rel="next" href="../select/">
@@ -23,7 +23,7 @@
<title>Kmer filtering - obikmer</title>
<title>Kmer filtering - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -870,6 +982,62 @@
<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>
@@ -1408,6 +1576,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -2117,7 +2313,7 @@ mathematically equivalent for integer counts: <code>n / N &lt; F</code> ↔ <cod
<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
and absent from every other genome in the index:</p>
<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>
<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>
<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>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2125,7 +2321,7 @@ and absent from every other genome in the index:</p>
</code></pre></div>
<p>Keep k-mers found in at least 2 <em>Betula nana</em> genomes and absent from all
other <em>Betula</em>:</p>
<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>
<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>
<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>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2133,14 +2329,14 @@ other <em>Betula</em>:</p>
</code></pre></div>
<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>
<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>
<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>
<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>--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
</code></pre></div>
<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>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>
<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>
<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=Carpinus&quot;</span><span class="w"> </span><span class="se">\</span>
@@ -2148,21 +2344,21 @@ and in fewer than 10 % of everything outside <em>Betulaceae</em>:</p>
</code></pre></div>
<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>
<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>
<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>
<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>--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
</code></pre></div>
<p>To dump only k-mers specific to <em>Betula nana</em>:</p>
<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>
<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>
<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>--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>
</code></pre></div>
<p>To enumerate unitigs of the <em>Betula</em>-specific subgraph:</p>
<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>
<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>
<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>--min-count<span class="w"> </span><span class="m">2</span><span class="w"> </span><span class="se">\</span>
@@ -2173,14 +2369,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.
Iteration terminates immediately — subsequent partitions and layers are not scanned.
Useful for quick inspection of large indexes without loading the entire dataset.</p>
<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>
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>
<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>
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>
</code></pre></div>
<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).
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>
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>
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>
</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>
<h2 id="implementation">Implementation</h2>
@@ -2193,7 +2389,7 @@ obikmer<span class="w"> </span>phylo<span class="w"> </span>myindex<span class="
lookup and counter.</p>
</li>
<li>
<p><strong><code>obikmer::cmd::predicate::FilterArgs</code></strong> — shared <code>clap</code> argument group
<p><strong><code>obiskim::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
<code>UnitigArgs</code>. <code>FilterArgs::build_filters()</code> returns a ready-to-use filter
list.</p>
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Kmer.refs - obikmer</title>
<title>Kmer.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>Kmer - obikmer</title>
<title>Kmer - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -811,6 +895,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1007,6 +1119,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1285,6 +1453,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -19,7 +19,7 @@
<title>Layer tier.refs - obikmer</title>
<title>Layer tier.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>obikindex layer tier - obikmer</title>
<title>obikindex layer tier - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1246,6 +1358,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1524,6 +1692,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Merge.refs - obikmer</title>
<title>Merge.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+227 -40
View File
@@ -23,7 +23,7 @@
<title>Merge command - obikmer</title>
<title>Merge command - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -955,10 +1067,10 @@
</li>
<li class="md-nav__item">
<a href="#2-bootstrap-output-from-first-source" class="md-nav__link">
<a href="#2-bootstrap-output-from-the-base-source" class="md-nav__link">
<span class="md-ellipsis">
2. Bootstrap output from first source
2. Bootstrap output from the base source
</span>
</a>
@@ -1090,6 +1202,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1368,6 +1536,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1530,10 +1726,10 @@
</li>
<li class="md-nav__item">
<a href="#2-bootstrap-output-from-first-source" class="md-nav__link">
<a href="#2-bootstrap-output-from-the-base-source" class="md-nav__link">
<span class="md-ellipsis">
2. Bootstrap output from first source
2. Bootstrap output from the base source
</span>
</a>
@@ -1641,7 +1837,7 @@
<h1 id="merge-command">Merge command</h1>
<h2 id="purpose">Purpose</h2>
<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>
<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>
<hr />
<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>
@@ -1696,38 +1892,29 @@
<h2 id="algorithm">Algorithm</h2>
<h3 id="1-validation">1. Validation</h3>
<p>Check all sources against the constraints above. Abort on any mismatch.</p>
<h3 id="2-bootstrap-output-from-first-source">2. Bootstrap output from first source</h3>
<p>Recursive file copy of <code>sources[0]</code> → <code>output</code>. Immediately after the copy:</p>
<h3 id="2-bootstrap-output-from-the-base-source">2. Bootstrap output from the base 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>
<ul>
<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><code>spectrums/</code> from source_0 is removed and rebuilt from scratch across all sources, applying the (possibly renamed) labels.</li>
</ul>
<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>
<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>
<h3 id="3-for-each-subsequent-source-parallel-across-partitions">3. For each subsequent source (parallel across partitions)</h3>
<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>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><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 — classify kmers</strong></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>
<ul>
<li><strong>Hit</strong>: kmer already in the destination; record for Pass 2.</li>
<li><strong>Miss</strong>: push kmer into a <code>GraphDeBruijn</code> accumulator.</li>
</ul>
<p><strong>New layer construction</strong></p>
<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>
<p><strong>Pass 2 — fill column builders</strong></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>
<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>
<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><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>The dst layers are opened once per partition and shared by both passes.</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>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><strong>Pass 2 — by consecutive groups of <code>SRC_GROUP = 2</code> sources, in source order.</strong> Per group:</p>
<ol>
<li>open the group's source layers for this partition;</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>
<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>
<li>close the columns, then the matrices; drop the group's layers; <code>col_base += group_n</code>.</li>
</ol>
<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><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>
<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>
<hr />
@@ -1741,13 +1928,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="p">}</span>
</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 directly via <code>PersistentBitVecBuilder</code> / <code>PersistentCompactIntVecBuilder</code> 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 through <code>MatrixBuilder::add_mem_col</code> (in-memory builders) rather than through these helpers, but the invariant they enforce is the same.</p>
<hr />
<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>Maintained by three mechanisms:</p>
<ol>
<li><strong>Existing layers</strong>: <code>n_src_total</code> columns appended (one per source genome).</li>
<li><strong>Existing layers</strong>: <code>n_src_total</code> columns appended (one per source genome), group by group.</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>
</ol>
@@ -1786,7 +1973,7 @@
</table>
<hr />
<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):</p>
<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>
<div class="highlight"><pre><span></span><code>partitions/
part_00000/
index/
@@ -1819,7 +2006,7 @@ index.meta ← complete genome list + evidence kind written at
</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>
<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>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>
<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>
<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 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="next" href="../filtering/">
<link rel="next" href="../merge_mmap_audit/">
@@ -23,7 +23,7 @@
<title>Merge parallelism & memory - obikmer</title>
<title>Merge parallelism & memory - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1074,6 +1186,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1352,6 +1520,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1609,7 +1805,7 @@
<h1 id="merge-parallelism-and-memory-pressure">Merge parallelism and memory pressure</h1>
<h2 id="problem-observed">Problem observed</h2>
<p>Running <code>obikmer merge</code> over 109 indexes (108 sources + 1 bootstrap) on a 192-core machine
<p>Running <code>obiskim 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>
<div class="highlight"><pre><span></span><code>memory allocation of 9126805520 bytes failed
</code></pre></div>
@@ -1645,7 +1841,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>
<hr />
<h2 id="partition-size-distribution">Partition size distribution</h2>
<p><code>obikmer utils --partition-stats</code> measures the sum of <code>unitigs.bin</code> file sizes
<p><code>obiskim 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>
<p>Observed on a 9-genome pilot (256 partitions):</p>
<table>
File diff suppressed because it is too large. Load diff
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Mphf.refs - obikmer</title>
<title>Mphf.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+202 -6
View File
@@ -12,7 +12,7 @@
<link rel="prev" href="../storage/">
<link rel="next" href="../unitig_evidence/">
<link rel="next" href="../mphf_batch_queries/">
@@ -23,7 +23,7 @@
<title>MPHF selection - obikmer</title>
<title>MPHF selection - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -889,6 +973,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1085,6 +1197,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1363,6 +1531,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
File diff suppressed because it is too large. Load diff
+93 -5
View File
@@ -7,7 +7,7 @@
<meta content="width=device-width,initial-scale=1" name="viewport"/>
<link href="../../assets/images/favicon.png" rel="icon"/>
<meta content="mkdocs-1.6.1, mkdocs-material-9.7.6" name="generator"/>
<title>obicompactvec — Complete Reference - obikmer</title>
<title>obicompactvec — Complete Reference - obiskim</title>
<link href="../../assets/stylesheets/main.484c7ddc.min.css" rel="stylesheet"/>
<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"/>
@@ -27,7 +27,7 @@
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav aria-label="Header" class="md-header__inner md-grid">
<a aria-label="obikmer" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<a aria-label="obiskim" class="md-header__button md-logo" data-md-component="logo" href="../.." title="obiskim">
<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>
<label class="md-header__button md-icon" for="__drawer">
@@ -37,7 +37,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
@@ -60,10 +60,10 @@
<div class="md-sidebar__inner">
<nav aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a aria-label="obikmer" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obikmer">
<a aria-label="obiskim" class="md-nav__button md-logo" data-md-component="logo" href="../.." title="obiskim">
<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>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item">
@@ -170,6 +170,18 @@
</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>
</a>
</li>
@@ -182,6 +194,30 @@
</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>
</a>
</li>
@@ -292,6 +328,18 @@
</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>
</a>
</li>
@@ -376,6 +424,30 @@
</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>
</a>
</li>
@@ -498,6 +570,18 @@
</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
</span>
</a>
</li>
@@ -1481,6 +1565,10 @@ fixed at the source:</p>
<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>
</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>
</table>
<h3 id="bitpartials">BitPartials</h3>
@@ -19,7 +19,7 @@
<title>Obipipeline.refs - obikmer</title>
<title>Obipipeline.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+202 -6
View File
@@ -23,7 +23,7 @@
<title>obipipeline library - obikmer</title>
<title>obipipeline library - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -839,6 +923,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1035,6 +1147,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1313,6 +1481,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1642,7 +1838,7 @@ Implemented as a <strong>TT muncher</strong>: the internal rule <code>@build</co
||? func: InVariant =&gt; OutVariant,
}
</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>obikmer</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>obiskim</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>
<div class="highlight"><pre><span></span><code>Source thread ──► [source_rx] ──► Scheduler ──► [worker_tx] ──► Workers (×N)
▲ │
+201 -5
View File
@@ -23,7 +23,7 @@
<title>obitaxonomy crate - obikmer</title>
<title>obitaxonomy crate - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -872,6 +984,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1325,6 +1493,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -23,7 +23,7 @@
<title>Partition and layer caching (discussion) - obikmer</title>
<title>Partition and layer caching (discussion) - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -872,6 +984,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1583,6 +1751,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -2285,7 +2481,7 @@ needed — <code>obikindex → obikpartitionner</code> stays the same direction
conversation as a side effect of investigating the false "independent
lifecycle" claim.
- <code>KmerIndex::partition()</code>/<code>partition_mut()</code> are gone; <code>scatter()</code>
(<code>obikmer</code>) and any write-side code get a transient <code>PartitionRouter</code> via
(<code>obiskim</code>) and any write-side code get a transient <code>PartitionRouter</code> via
<code>KmerIndex::partition_router()</code>.
- A real bug caught by the test suite during this move:
<code>PartitionRouter::open</code> initially defaulted to <code>closed: true</code> (inherited
@@ -2450,7 +2646,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
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
<code>obikmer::steps::scatter</code> (now deleted, along with the <code>steps</code> module
<code>obiskim::steps::scatter</code> (now deleted, along with the <code>steps</code> module
entirely) — the <code>obipipeline::make_pipe!</code> two-stage pipeline
(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>
@@ -2469,7 +2665,7 @@ entirely) — the <code>obipipeline::make_pipe!</code> two-stage pipeline
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
tests both call <code>write_batch</code> directly, bypassing <code>run</code>/file discovery
entirely), so the whole suite stayed green while <code>obikmer index</code> on
entirely), so the whole suite stayed green while <code>obiskim index</code> on
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)
didn't match "0 total kmers indexed" at the final stage. Fixed by
@@ -2598,7 +2794,7 @@ own tests.</p>
<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 →
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>obikmer index</code>'s
too, per (3)'s own lesson: no test in the suite exercises <code>obiskim index</code>'s
real file-driven path.</p>
<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
@@ -2825,7 +3021,7 @@ removed from <code>router.rs</code>).</p>
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
speculative addition.</p>
<p><code>count_kmer</code>'s three former callers (<code>obikmer::cmd::index</code>, <code>obikphylo</code>'s
<p><code>count_kmer</code>'s three former callers (<code>obiskim::cmd::index</code>, <code>obikphylo</code>'s
test harness, <code>obikindexer::algorithms::partitionner</code>'s own
<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
@@ -2964,7 +3160,7 @@ same reason.</p>
index's kmer sequences — read by <code>rebuild_layer.rs</code> and others, well
beyond construction — see [[project_unitigs_always_kept]]),
<code>pack_matrices</code> (re-runnable maintenance on an already-finished index
via <code>obikmer pack</code>, not just a pipeline step), <code>upgrade_layer_meta</code>
via <code>obiskim pack</code>, not just a pipeline step), <code>upgrade_layer_meta</code>
(migration, runnable on any existing index at any time).</li>
</ul>
<h3 id="the-general-pattern-not-obikindexer-specific">The general pattern (not obikindexer-specific)</h3>
@@ -3073,7 +3269,7 @@ crate, not "private except to one named dependent") — the opposite of
what was wanted.</p>
<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>
means <code>obikmer::cmd::index</code> (a different crate) can no longer call
means <code>obiskim::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 —
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>
@@ -3145,7 +3341,7 @@ traits, two crates, two different reasons, not a contradiction.</p>
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>,
<code>reindex.rs</code> (<code>use crate::index::builder::IndexBuilder;</code>) and, externally,
<code>obikmer::cmd::index::mod</code> (<code>use obikindex::IndexBuilder;</code>, for the three
<code>obiskim::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
site is unchanged (<code>KmerIndex::create_skeleton(...)</code>,
<code>self.state()</code>) — only trait-in-scope requirements are new, which is
@@ -3154,7 +3350,7 @@ itself.</p>
<p>Verification went one step further than (9): beyond
<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>obikmer merge</code> end to end on two freshly built indexes (exercises
<code>obiskim 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>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
@@ -3246,7 +3442,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>self.meta().genomes.len()</code>-shaped reads, mechanically fixed to
<code>.genomes().map_err(OKIError::Io)?.len()</code> (tests: <code>.unwrap()</code>).
- <code>obikmer::cmd::*</code>: <code>annotate</code> (rewrote its rename path to load genomes
- <code>obiskim::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>
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),
@@ -3365,7 +3561,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
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>
<p><strong>Why a new crate, not a submodule of <code>obikindexer</code></strong>: <code>obikmer::cmd::
<p><strong>Why a new crate, not a submodule of <code>obikindexer</code></strong>: <code>obiskim::cmd::
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
<code>obikindexer</code> — putting it in <code>obikindexer</code> itself would work file-wise
@@ -3373,15 +3569,15 @@ but conflates "the trait every algorithm implements" with "one crate's
particular four implementations of it", the same reasoning that already
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
above); <code>obikindexer</code>, <code>obikmer</code>, and <code>obikphylo</code> (dev-dependency, for
above); <code>obikindexer</code>, <code>obiskim</code>, and <code>obikphylo</code> (dev-dependency, for
its test helper) all depend on it.</p>
<p><strong>Blast radius</strong>: <code>obikindexer</code>'s four algorithm modules (struct field +
setter + trait impl each); <code>obikmer::cmd::index::mod</code> (three call sites:
setter + trait impl each); <code>obiskim::cmd::index::mod</code> (three call sites:
<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::
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
in the workspace <code>Cargo.toml</code>, depended on by <code>obikindexer</code>/<code>obikmer</code>
in the workspace <code>Cargo.toml</code>, depended on by <code>obikindexer</code>/<code>obiskim</code>
(regular) and <code>obikphylo</code> (dev).</p>
<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
@@ -3448,7 +3644,7 @@ auto-detection" turned up three unrelated implementations:</p>
</tr>
</tbody>
</table>
<p><code>query_partition_with</code> is <code>obikmer query</code>'s normal query path — the one
<p><code>query_partition_with</code> is <code>obiskim query</code>'s normal query path — 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
sibling-annex construction hits the cost hardest, not because the need is
@@ -3530,7 +3726,7 @@ above). Concretely, in order:</p>
<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
use <code>KmerPartition</code> too, closing the "no cache at all" gap on
<code>obikmer</code>'s normal query path (see "Three independent implementations,"
<code>obiskim</code>'s normal query path (see "Three independent implementations,"
historical, above).</li>
</ol>
<p>Open before implementing: exact API shape of <code>KmerPartition</code> (propose,
@@ -3610,7 +3806,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>
<ul>
<li><code>obicompactvec::bitmatrix::sparse.rs</code>'s module doc says
"Not used by any production code path yet" — false since <code>obikmer pack
"Not used by any production code path yet" — false since <code>obiskim pack
--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.
Stale comment, not corrected.</li>
@@ -19,7 +19,7 @@
<title>Persistent bit vec.refs - obikmer</title>
<title>Persistent bit vec.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -23,7 +23,7 @@
<title>PersistentBitVec - obikmer</title>
<title>PersistentBitVec - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1147,6 +1259,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1425,6 +1593,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -19,7 +19,7 @@
<title>Persistent compact int vec.refs - obikmer</title>
<title>Persistent compact int vec.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -23,7 +23,7 @@
<title>PersistentCompactIntVec - obikmer</title>
<title>PersistentCompactIntVec - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1130,6 +1242,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1408,6 +1576,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Pipeline.refs - obikmer</title>
<title>Pipeline.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+203 -7
View File
@@ -23,7 +23,7 @@
<title>Construction pipeline - obikmer</title>
<title>Construction pipeline - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -800,6 +884,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -996,6 +1108,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1274,6 +1442,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1457,8 +1653,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>Two approaches are supported:</p>
<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>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>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>
<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>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>
</ul>
<p>The histogram gives:</p>
<ul>
+208 -12
View File
@@ -23,7 +23,7 @@
<title>Select command - obikmer</title>
<title>Select command - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -676,6 +760,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -872,6 +984,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1402,6 +1570,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1739,7 +1935,7 @@ then <code>select</code> to reshape the genome columns.</p>
are preserved unchanged; only the data matrices are rewritten.</p>
<hr />
<h2 id="synopsis">Synopsis</h2>
<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;
<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;
<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-op<span class="w"> </span>&lt;name&gt;:&lt;op&gt;<span class="w"> </span>...<span class="o">]</span>
@@ -1909,11 +2105,11 @@ is &gt; N.</p>
<hr />
<h2 id="examples">Examples</h2>
<h3 id="aggregate-by-metadata-group-default-operators">Aggregate by metadata group, default operators</h3>
<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
<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
<span class="c1"># one column per unique value of &quot;group&quot;; presence→any, count→sum</span>
</code></pre></div>
<h3 id="named-groups-with-different-operators">Named groups with different operators</h3>
<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>
<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>
<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-op<span class="w"> </span><span class="s2">&quot;pub:any&quot;</span><span class="w"> </span><span class="se">\</span>
@@ -1921,21 +2117,21 @@ is &gt; N.</p>
<span class="w"> </span>--select<span class="w"> </span><span class="s2">&quot;pub,nan&quot;</span>
</code></pre></div>
<h3 id="mix-aggregated-group-and-individual-genome">Mix aggregated group and individual genome</h3>
<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>
<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>
<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>
</code></pre></div>
<h3 id="pure-column-projection-no-aggregation">Pure column projection (no aggregation)</h3>
<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>
<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>
<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>
<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>
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>
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>
<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>
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
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
</code></pre></div>
<hr />
<h2 id="implementation-notes">Implementation notes</h2>
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Storage.refs - obikmer</title>
<title>Storage.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>On-disk storage - obikmer</title>
<title>On-disk storage - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -872,6 +956,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -1068,6 +1180,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1346,6 +1514,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Superkmer.refs - obikmer</title>
<title>Superkmer.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+202 -6
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../../theory/evolutionary_distances/">
<link rel="prev" href="../../theory/pair_coverage_sampling/">
<link rel="next" href="../kmer/">
@@ -23,7 +23,7 @@
<title>SuperKmer - obikmer</title>
<title>SuperKmer - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -778,6 +862,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -974,6 +1086,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1252,6 +1420,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -19,7 +19,7 @@
<title>Unitig evidence.refs - obikmer</title>
<title>Unitig evidence.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+207 -11
View File
@@ -9,7 +9,7 @@
<link rel="prev" href="../mphf/">
<link rel="prev" href="../mphf_batch_queries/">
<link rel="next" href="../evidence_elimination/">
@@ -23,7 +23,7 @@
<title>Unitig evidence encoding - obikmer</title>
<title>Unitig evidence encoding - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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">
<a href="../../theory/evolutionary_distances/" class="md-nav__link">
@@ -418,6 +446,62 @@
<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>
</nav>
@@ -674,6 +758,34 @@
<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>
@@ -1096,6 +1208,62 @@
<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">
<a href="../filtering/" class="md-nav__link">
@@ -1374,6 +1542,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1666,8 +1862,8 @@
<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>
</ul>
<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] (256 kmers)
<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>
<div class="highlight"><pre><span></span><code>chunk 1: nucleotides [0, MAX_KMERS_PER_CHUNK + k − 2] (128 kmers)
chunk 2: nucleotides [256, end] (remaining kmers)
overlap: k−1 nucleotides shared between the two chunks
</code></pre></div>
@@ -1724,8 +1920,8 @@ bits [6:0] = rank (7 bits, 0–127)
<tr>
<td><code>seql − k</code></td>
<td>8</td>
<td>0–255</td>
<td>max <code>n_kmers</code> per chunk = 256 = <code>MAX_KMERS_PER_CHUNK</code></td>
<td>0–127 used</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>
</tr>
<tr>
<td><code>rank</code></td>
@@ -1741,7 +1937,7 @@ bits [6:0] = rank (7 bits, 0–127)
</tr>
</tbody>
</table>
<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>
<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>
<hr />
<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>
+207 -11
View File
@@ -21,7 +21,7 @@
<title>obikmer</title>
<title>obiskim</title>
@@ -62,7 +62,7 @@
<div data-md-component="skip">
<a href="#obikmer" class="md-skip">
<a href="#obiskim" class="md-skip">
Skip to content
</a>
@@ -78,7 +78,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -92,7 +92,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -496,6 +496,34 @@
<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">
<a href="theory/evolutionary_distances/" class="md-nav__link">
@@ -518,6 +546,62 @@
<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>
</nav>
@@ -774,6 +858,34 @@
<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">
<a href="implementation/unitig_evidence/" class="md-nav__link">
@@ -970,6 +1082,62 @@
<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">
<a href="implementation/filtering/" class="md-nav__link">
@@ -1248,6 +1416,34 @@
<li class="md-nav__item">
<a href="architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="architecture/numa_worker_pools/" class="md-nav__link">
@@ -1403,8 +1599,8 @@
<h1 id="obikmer">obikmer</h1>
<p><code>obikmer</code> is a Rust tool for manipulation, counting, indexing, and set operations on DNA sequences represented as kmer sets.</p>
<h1 id="obiskim">obiskim</h1>
<p><code>obiskim</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>
<table>
<thead>
@@ -1444,7 +1640,7 @@
</tr>
<tr>
<td><code>phylo</code></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>
<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>
</tr>
<tr>
<td><code>unitig</code></td>
@@ -1459,8 +1655,8 @@
<td>Estimate approximate-index parameters (z, evidence bits, FP rates) before indexing</td>
</tr>
<tr>
<td><code>reindex</code></td>
<td>Convert an index's evidence in-place: exact ↔ approx</td>
<td><code>convert</code></td>
<td>Convert an index's evidence representation (exact / approximate / hybrid), in place</td>
</tr>
<tr>
<td><code>utils</code></td>
+203 -7
View File
@@ -19,7 +19,7 @@
<title>Index.refs - obikmer</title>
<title>Index.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1270,8 +1466,8 @@
<h1 id="coverage-indexmd">Coverage: index.md</h1>
<h2 id="code-couvert">Code couvert</h2>
<ul>
<li><code>obikmer/src/main.rs</code> — point d'entrée CLI, contraintes globales</li>
<li><code>obikmer/src/cli.rs</code> — structure des arguments communs</li>
<li><code>obiskim/src/main.rs</code> — point d'entrée CLI, contraintes globales</li>
<li><code>obiskim/src/cli.rs</code> — structure des arguments communs</li>
</ul>
<h2 id="notes">Notes</h2>
<p>Document de niveau projet (vue d'ensemble, motivations, contraintes fondamentales).
+207 -11
View File
@@ -23,7 +23,7 @@
<title>Installation - obikmer</title>
<title>Installation - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -582,6 +582,34 @@
<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">
<a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -604,6 +632,62 @@
<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>
</nav>
@@ -860,6 +944,34 @@
<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">
<a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -1056,6 +1168,62 @@
<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">
<a href="../implementation/filtering/" class="md-nav__link">
@@ -1334,6 +1502,34 @@
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1576,12 +1772,12 @@
<h1 id="installation">Installation</h1>
<h2 id="prerequisites">Prerequisites</h2>
<h3 id="rust-toolchain">Rust toolchain</h3>
<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>
<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>
<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
</code></pre></div>
<h3 id="c-build-environment-required-for-hwloc">C build environment (required for hwloc)</h3>
<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>
<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>
<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
</code></pre></div>
@@ -1598,17 +1794,17 @@ rustup<span class="w"> </span>update<span class="w"> </span>stable
</code></pre></div>
<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;
<span class="nb">cd</span><span class="w"> </span>obikmer/src
<span class="nb">cd</span><span class="w"> </span>obiskim/src
cargo<span class="w"> </span>build<span class="w"> </span>--release
</code></pre></div>
<p>The compiled binary is at <code>target/release/obikmer</code>.</p>
<p>The compiled binary is at <code>target/release/obiskim</code>.</p>
<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><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
</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>
<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/
<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/
</code></pre></div>
<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>
@@ -1618,7 +1814,7 @@ cargo<span class="w"> </span>build<span class="w"> </span>--release
<li>any system where hwloc reports only one NUMA node</li>
</ul>
<h2 id="verifying-the-installation">Verifying the installation</h2>
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>--help
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>--help
</code></pre></div>
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Kmers.refs - obikmer</title>
<title>Kmers.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>Kmers and super-kmers - obikmer</title>
<title>Kmers and super-kmers - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href=".." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href=".." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -495,6 +495,34 @@
<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">
<a href="../theory/evolutionary_distances/" class="md-nav__link">
@@ -517,6 +545,62 @@
<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>
</nav>
@@ -773,6 +857,34 @@
<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">
<a href="../implementation/unitig_evidence/" class="md-nav__link">
@@ -969,6 +1081,62 @@
<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">
<a href="../implementation/filtering/" class="md-nav__link">
@@ -1247,6 +1415,34 @@
<li class="md-nav__item">
<a href="../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../architecture/numa_worker_pools/" class="md-nav__link">
Binary file not shown.
File diff suppressed because it is too large. Load diff
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Encoding.refs - obikmer</title>
<title>Encoding.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>DNA encoding - obikmer</title>
<title>DNA encoding - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -467,6 +467,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -489,6 +517,62 @@
<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>
</nav>
@@ -745,6 +829,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -941,6 +1053,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1219,6 +1387,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+202 -6
View File
@@ -19,7 +19,7 @@
<title>Entropy.refs - obikmer</title>
<title>Entropy.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1278,7 +1474,7 @@
<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>Vérifier que les paramètres <code>theta</code> et <code>level_max</code> dans le CLI
(<code>obikmer/src/cli.rs</code> → <code>CommonArgs</code>) correspondent bien à ce qui est décrit.</p>
(<code>obiskim/src/cli.rs</code> → <code>CommonArgs</code>) correspondent bien à ce qui est décrit.</p>
+201 -5
View File
@@ -23,7 +23,7 @@
<title>Entropy filter - obikmer</title>
<title>Entropy filter - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -533,6 +533,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -555,6 +583,62 @@
<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>
</nav>
@@ -811,6 +895,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1007,6 +1119,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1285,6 +1453,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+330 -35
View File
@@ -9,10 +9,10 @@
<link rel="prev" href="../indexing/">
<link rel="prev" href="../chance_sharing/">
<link rel="next" href="../../implementation/superkmer/">
<link rel="next" href="../sibling_partition_unification/">
@@ -23,7 +23,7 @@
<title>Central-position SNP distance (discussion) - obikmer</title>
<title>Central-position SNP distance (discussion) - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -396,6 +396,34 @@
<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>
@@ -791,10 +819,10 @@
</li>
<li class="md-nav__item">
<a href="#step-4-surfacing-obikindex-obikmer-cli" class="md-nav__link">
<a href="#step-4-surfacing-obikindex-obiskim-cli" class="md-nav__link">
<span class="md-ellipsis">
Step 4 — surfacing (obikindex + obikmer CLI)
Step 4 — surfacing (obikindex + obiskim CLI)
</span>
</a>
@@ -1009,6 +1037,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#vcf-export-of-the-pseudo-alignment" class="md-nav__link">
<span class="md-ellipsis">
VCF export of the pseudo-alignment
</span>
</a>
</li>
<li class="md-nav__item">
@@ -1031,6 +1070,62 @@
<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>
</nav>
@@ -1287,6 +1382,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -1483,6 +1606,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1761,6 +1940,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -2177,10 +2384,10 @@
</li>
<li class="md-nav__item">
<a href="#step-4-surfacing-obikindex-obikmer-cli" class="md-nav__link">
<a href="#step-4-surfacing-obikindex-obiskim-cli" class="md-nav__link">
<span class="md-ellipsis">
Step 4 — surfacing (obikindex + obikmer CLI)
Step 4 — surfacing (obikindex + obiskim CLI)
</span>
</a>
@@ -2395,6 +2602,17 @@
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#vcf-export-of-the-pseudo-alignment" class="md-nav__link">
<span class="md-ellipsis">
VCF export of the pseudo-alignment
</span>
</a>
</li>
<li class="md-nav__item">
@@ -2603,7 +2821,7 @@ implication is that columns should be allowed partial coverage (&gt;=2 resolved
genomes, not unanimous) rather than requiring every genome to be net
single-copy at that locus.</p>
<h2 id="context-detectability-and-a-3-way-ordinal-distance-per-pair">Context, detectability, and a 3-way ordinal distance per pair</h2>
<p>Empirical follow-up to the pseudo-alignment idea above: <code>obikmer phylo
<p>Empirical follow-up to the pseudo-alignment idea above: <code>obiskim phylo
--snp</code> was run on a real 20-genome benchmark index and the resulting FASTA
fed to <code>raxml-ng</code>. Two problems surfaced, both traced back to conflating
distinct notions under one symbol.</p>
@@ -2937,7 +3155,7 @@ before testing it.</p>
informative across domains with this character type. Exploratory only —
run entirely outside the repo (<code>/tmp/tnt_run</code>, TNT installed locally under
<code>TNT/</code>), no new Rust code. Kept here as the record of what was learned.</p>
<p><strong>Pipeline.</strong> <code>obikmer phylo --snp</code> emits one IUPAC-coded pseudo-alignment
<p><strong>Pipeline.</strong> <code>obiskim phylo --snp</code> emits one IUPAC-coded pseudo-alignment
row per genome (<code>snp_pseudo_alignment</code>, one column per family with
<code>family_size() &gt;= 2</code>). A small external Python script decodes IUPAC back to
the 16-state bitmask, applies the set-edit-distance formula above, and
@@ -3001,14 +3219,14 @@ simply does not survive domain-level divergence. Cross-domain placement
would need conserved-marker characters (rRNA, ribosomal proteins), not this
estimator.</p>
<h3 id="native-sankoff-tnt-phyg-export-2026-08-12-superseding-the-external-scripts-above">Native <code>--sankoff --tnt</code>/<code>--phyg</code> export (2026-08-12), superseding the external scripts above</h3>
<p>The ad hoc Python glue from the previous section is superseded: <code>obikmer
<p>The ad hoc Python glue from the previous section is superseded: <code>obiskim
distance --sankoff</code> now calibrates the matrix natively (<code>p_hat</code>, 6-category
substitution costs, <code>c_ctx</code> weighted by <code>mean_sub_cost</code> — see the worked
example above) and <code>--tnt</code>/<code>--phyg</code> each write a ready-to-run script from
it, no external script needed. <code>∅</code> is an ordinary 16th state throughout
(never <code>-</code>), specifically to avoid gap-semantics confusion in downstream
tools — see "A concrete Sankoff cost matrix" above for why.</p>
<p><strong>TNT (<code>--tnt</code>).</strong> <code>write_sankoff_tnt</code> (<code>obikmer/src/cmd/phylo/mod.rs</code>)
<p><strong>TNT (<code>--tnt</code>).</strong> <code>write_sankoff_tnt</code> (<code>obiskim/src/cmd/phylo/mod.rs</code>)
recodes to TNT's own <code>0-9A-F</code> xread alphabet (its default reader rejects
the wider IUPAC set otherwise), scales and rounds costs to integers
(<code>smatrix</code>/<code>cost</code> reject decimals), then re-runs integer Floyd-Warshall on
@@ -3133,7 +3351,7 @@ from the alignment") does <strong>not</strong> work as a shortcut for this — f
custom-file morphology model, <code>readParameters</code> always requires the file's
own frequency line unconditionally; omitting it and passing <code>+F</code> instead
just fails (<code>ERROR: State frequencies could not be read</code>). <code>π</code> has to be
computed by <code>obikmer</code> and written into the file, not left to IQ-TREE.</p>
computed by <code>obiskim</code> and written into the file, not left to IQ-TREE.</p>
<p>Net effect: no free-rate ML estimation needed for this piece at all (the
mistaken assumption that motivated most of this discussion — that
building an asymmetric <code>Q</code> a priori would require solving a linear system
@@ -3203,11 +3421,11 @@ with no error to catch it. <strong>Checked against the real biological alignment
symbol <code>N</code> (IUPAC "all four bases ambiguous," state index 15) occurs 1383
times across 13 of the 20 sequences — present, so this specific real
dataset is not at risk. Still worth a real, general presence check inside
<code>obikmer</code> before this is wired in, rather than assuming every future
<code>obiskim</code> before this is wired in, rather than assuming every future
dataset will have <code>N</code> too (nothing in IQ-TREE would catch it if not).</p>
<p><strong>Resolution: subset + compact-renumber, not rely on all 16 appearing.</strong>
Since IQ-TREE always infers <code>N</code> from the alignment's own content and
nothing overrides that, the fix is to make the file <code>obikmer</code> writes match
nothing overrides that, the fix is to make the file <code>obiskim</code> writes match
that inference <em>by construction</em>, for every run, rather than hope the
16th (or any particular) state happens to occur:
1. Scan the real alignment for which of the 16 canonical states actually
@@ -3255,7 +3473,7 @@ genuine CTMC rate matrix <code>Q</code> could plausibly be recovered as
the stationary-frequency gap above is closed. Superseded by the two
sections below, which implement and then substantially revise this.</p>
<h3 id="r-implemented-exclude-genome-added-rogue-taxon-test-negative-2026-08-12"><code>R</code>/<code>π</code> implemented; <code>--exclude-genome</code> added; rogue-taxon test negative (2026-08-12)</h3>
<p><code>write_iqtree</code> (<code>obikmer/src/cmd/phylo/iqtree.rs</code>) implements exactly
<p><code>write_iqtree</code> (<code>obiskim/src/cmd/phylo/iqtree.rs</code>) implements exactly
the <code>R = exp(-cost)</code> / empirical-<code>π</code> design above: writes
<code>&lt;prefix&gt;_iqtree.model</code> (lower-triangular <code>R</code>, PAML order, then <code>π</code>) and
<code>&lt;prefix&gt;_iqtree.fasta</code> (alignment recoded to the compact <code>0..k-1</code>
@@ -3299,7 +3517,7 @@ tell: with <code>n_eligible=1</code>, the ratio can only be exactly <code>0</cod
3-for-3 landing on <code>0.0</code> is more than sampling noise alone would predict;
possibly ascertainment bias — see below — or possibly a few genuinely
ultra-conserved loci; not resolved).</p>
<p><strong><code>--exclude-genome LABEL</code></strong> (repeatable, <code>obikmer phylo</code>) added for
<p><strong><code>--exclude-genome LABEL</code></strong> (repeatable, <code>obiskim phylo</code>) added for
exactly this kind of test: zeroes the excluded genome's row/column in
<code>RawSnpDistanceOutput</code> after <code>raw_snp_distance</code> runs (a pair with zero
counts is already skipped by <code>calibrate_p_hat</code>/<code>base_pair_tally</code> — no
@@ -3497,7 +3715,7 @@ silently wrong data for TNT/PhyG, and a hard failure for IQ-TREE's <code>+ASC</c
(verified: excluding 2 taxa on the benchmark left 116,351 such columns —
matches the manual <code>+ASC</code> failures hit earlier in this same investigation,
before <code>--exclude-genome</code> existed). Fixed in <code>drop_excluded</code>
(<code>obikmer/src/cmd/phylo/mod.rs</code>): after dropping excluded rows,
(<code>obiskim/src/cmd/phylo/mod.rs</code>): after dropping excluded rows,
re-scan each column among the <em>surviving</em> sequences and drop any that are
now constant. Verified: 908,723 → 792,372 sites after excluding 2 taxa,
zero monomorphic columns remain, <code>π</code> recomputed from the corrected
@@ -3791,7 +4009,7 @@ prescriptions; adjust to reality when implementing.</p>
takes the min by <code>seq_hash()</code> — the same selection <code>RollingStat</code> performs,
evaluated once. Partition index is then
<code>(minimizer.seq_hash() &amp; (n_partitions - 1)) as usize</code>, exactly as
<code>QueryBatch::from_records</code> (<code>obikmer/src/cmd/query.rs:142</code>); <code>n_partitions</code>
<code>QueryBatch::from_records</code> (<code>obiskim/src/cmd/query.rs:142</code>); <code>n_partitions</code>
is a power of two so the mask is valid.</li>
</ol>
<h3 id="step-1-the-tally-accumulator-obikindex">Step 1 — the tally accumulator (<code>obikindex</code>)</h3>
@@ -3903,7 +4121,7 @@ ever queries. Instead: compute it lazily, on first <code>phylo</code> call again
given index, and persist the result alongside that index for subsequent
calls — the same lazy-derived-cache pattern <code>PersistentBitMatrix</code> already
uses for <code>Columnar</code> -&gt; <code>Packed</code>. This requires no explicit invalidation for
<code>merge</code> or <code>filter</code> (<code>obikindex/src/merge.rs</code>, <code>obikmer/src/cmd/filter.rs</code>):
<code>merge</code> or <code>filter</code> (<code>obikindex/src/merge.rs</code>, <code>obiskim/src/cmd/filter.rs</code>):
both only ever write to a fresh <code>--output</code> directory, never mutate an input
index in place, so a re-merged/re-filtered index is simply a new state with
no annex yet. <code>select --in-place</code> (<code>select_layer.rs:139-235</code>) is the
@@ -4096,7 +4314,7 @@ above) is observed anywhere in the index — fixes both:
<code>bitmatrix.rs:264-287</code>); if absent, run step 3 and persist; if present,
mmap and reuse.
5. <strong>Invalidation.</strong> <code>merge</code> and <code>filter</code> always write to a fresh <code>--output</code>
directory (<code>obikindex/src/merge.rs</code>, <code>obikmer/src/cmd/filter.rs</code>) so a
directory (<code>obikindex/src/merge.rs</code>, <code>obiskim/src/cmd/filter.rs</code>) so a
re-merged/re-filtered index simply has no annex yet — nothing to
invalidate. <code>select --in-place</code> (<code>select_layer.rs:139-235</code>) mutates
columns of an existing index without changing its location, which can
@@ -4124,7 +4342,7 @@ accumulated counts (same shape as <code>jaccard_to_mash</code>):</p>
</ul>
<p>Guard the singularities (<code>p &gt;= 3/4</code> for JC, <code>1-2P-Q &lt;= 0</code> or <code>1-2Q &lt;= 0</code> for
K2P) by clamping to a max distance, as <code>jaccard_to_mash</code> clamps <code>J &lt;= 0</code>.</p>
<h3 id="step-4-surfacing-obikindex-obikmer-cli">Step 4 — surfacing (<code>obikindex</code> + <code>obikmer</code> CLI)</h3>
<h3 id="step-4-surfacing-obikindex-obiskim-cli">Step 4 — surfacing (<code>obikindex</code> + <code>obiskim</code> CLI)</h3>
<p>These metrics do not fit <code>DistanceMetric</code>'s current <code>LayeredStore</code>-partial
dispatch (they need the cross-partition sweep and produce a different
intermediate). Two options, to decide:</p>
@@ -4163,7 +4381,7 @@ lookups proportionally; <code>p_hat</code> is unbiased. Off by default (exact).<
<ol>
<li>Step 0 primitives + their unit tests (self-contained, no distance wiring).
This also unblocks the long-declared-but-unimplemented <code>query --mismatch</code>
(<code>obikmer/src/cmd/query.rs:676</code>, currently a warning), which needs the same
(<code>obiskim/src/cmd/query.rs:676</code>, currently a warning), which needs the same
neighbour + routing machinery.</li>
<li><code>SnpTally</code> + finalisation math with a brute-force (non-swept) reference
backend, validated on a tiny index.</li>
@@ -4209,7 +4427,7 @@ tree weakly — will likely need a minimum-detected-loci-per-genome filter
upstream (exclude or flag under-covered genomes) before this becomes a
correctness problem rather than a power problem. Not designed yet.</p>
<h3 id="-free-loss-implemented-2026-08-13"><code>--free-loss</code> implemented (2026-08-13)</h3>
<p><code>obikmer phylo --sankoff --free-loss</code> (with <code>--tnt</code>/<code>--phyg</code>/<code>--iqtree</code>)
<p><code>obiskim phylo --sankoff --free-loss</code> (with <code>--tnt</code>/<code>--phyg</code>/<code>--iqtree</code>)
recodes <code>∅</code> (a family's non-detection in a genome) to <code>?</code> instead of the
default ordinary, costed 16th state — the resolution of the discussion
above. <code>?</code>, not <code>-</code>: <code>-</code> still carries gap/indel semantics in TNT/PhyG/
@@ -4284,7 +4502,7 @@ filtered alignment — next verification step, alongside the still-open PhyG
<p><strong>Diagnostic added: <code>--family-overlap</code>.</strong> Real per-genome-pair count of
shared variable families (columns where neither genome is <code>∅</code>), diagonal
kept (degenerates to "genome's own total family count", not a separate
computation — see <code>obikmer/src/cmd/phylo/family_overlap.rs</code>). On the
computation — see <code>obiskim/src/cmd/phylo/family_overlap.rs</code>). On the
20-genome benchmark this predicted the <code>--tnt</code>/<code>--iqtree</code> rogue-placement
pattern exactly: Candidozyma shares <strong>0</strong> families with all 19 others (hence
its ~0-length branch, placed anywhere); the mean off-diagonal shared-family
@@ -4345,13 +4563,13 @@ it stores) from a run on one taxon set against a regenerated <code>iqtree.fasta<
with a different taxon count crashes with <code>Assertion 'i &gt;= 0 &amp;&amp; i &lt;
(int)seq_names.size()' failed</code> in <code>Alignment::getSeqName</code> /
<code>PhyloTree::assignLeafNames</code> — <code>--undo</code> tries to graft a stored tree with
the old leaf count onto the new, smaller alignment. Not an <code>obikmer</code> bug;
the old leaf count onto the new, smaller alignment. Not an <code>obiskim</code> bug;
avoid by using a fresh <code>--prefix</code> (or <code>-redo</code>) whenever the underlying
alignment's taxon set changes, never <code>--undo</code> across them.</p>
<h2 id="_iqtree_statescsv-compact-symbol-traceability-2026-08-15"><code>_iqtree_states.csv</code>: compact-symbol traceability (2026-08-15)</h2>
<p>User-reported suspicion: <code>--iqtree --free-loss</code> state frequencies "don't
sum to 1". Verified both by code trace and unit test
(<code>obikmer/src/cmd/phylo/iqtree.rs</code>, <code>free_loss_excludes_absent_state_and_freq_sums_to_one</code>)
(<code>obiskim/src/cmd/phylo/iqtree.rs</code>, <code>free_loss_excludes_absent_state_and_freq_sums_to_one</code>)
— <strong>not a bug</strong>: <code>compact_alphabet</code>'s counting loop <code>continue</code>s on
<code>free_loss &amp;&amp; b == b'-'</code> <em>before</em> recoding/counting, so the absent state
never enters <code>occurs</code>/<code>counts</code>, and <code>freq[i] = counts[old]/total</code> sums to
@@ -4435,7 +4653,7 @@ multi-base states too — biologically, a family showing 3–4 simultaneously
observed central bases across genomes is far more likely to be
assembly/detection noise than a genuinely ancestral, widely-preserved
polymorphism, the same reasoning already used for <code>-</code>.</p>
<p><strong>Mechanism</strong> (<code>obikmer/src/cmd/phylo/iqtree.rs</code>, <code>write_iqtree</code>): a
<p><strong>Mechanism</strong> (<code>obiskim/src/cmd/phylo/iqtree.rs</code>, <code>write_iqtree</code>): a
<em>second</em> filtering pass, active only under <code>--free-loss</code>. After the first
<code>compact_alphabet</code> call (post ascertainment-filtering), any state with
<code>freq &lt; --iqtree-min-freq</code> (default <code>0.001</code>) has every occurrence recoded
@@ -4934,7 +5152,7 @@ generally (the same mechanism as <code>corrected_log</code>, not a coincidence
Nei's own formula is the <code>θ=0</code> special case applied to a pairwise <code>D</code>
rather than a whole-tree one). Explicitly stated by the authors as
infeasible beyond about 5–6 taxa (their own simulations stop at 5); not a
candidate for obikmer's typical genome counts. Notable contribution worth
candidate for obiskim's typical genome counts. Notable contribution worth
keeping in mind regardless: <code>ρ = (1+θα)/(1+α)</code> is shown to be a more robust
summary of rate heterogeneity than <code>α</code> alone whenever <code>θ</code> isn't negligible
— <code>α</code> and <code>θ</code> are confounded (nearly-invariant sites can come from either a
@@ -4955,7 +5173,7 @@ not a closed form; (4) the site-level <code>k̂</code> values (real-valued, not
integers) are fit to a negative binomial (Uzzell &amp; Corbin 1971) by ML to
get α — again no closed form, numerical optimization. This is a real
per-site pipeline requiring a tree <em>before</em> distances/α can be computed —
the reverse of obikmer's current dependency order (<code>snp_distance</code> computes
the reverse of obiskim's current dependency order (<code>snp_distance</code> computes
distances, which <code>--nj</code>/<code>--upgma</code> only turn into a tree <em>afterward</em>). Their
own answer to this chicken-and-egg problem is an iterative
distance→tree→α→distance loop, which they themselves flag as expensive.
@@ -5018,7 +5236,7 @@ proper is judged not worth the effort).</p>
<p><strong>Correctness bug, not just a performance one.</strong> <code>--sankoff</code>/<code>--tnt</code>/<code>--phyg</code>/
<code>--iqtree</code> (via <code>SiblingExt::sankoff_bundle</code>) and a <code>snp-*</code> <code>--distance</code>
(via <code>SiblingExt::snp_distance</code>) always consume the <em>exact same</em> selection
parameters when requested together in one <code>obikmer phylo</code> invocation
parameters when requested together in one <code>obiskim phylo</code> invocation
(<code>n</code>/<code>free_loss</code>/<code>no_ambiguity</code>/excluded-set/<code>entropy_bias</code> — the CLI has
no way to give them different values in one run, see <code>cmd/phylo/args.rs</code>).
Before this fix, each independently called <code>sample_index</code>, and
@@ -5057,7 +5275,7 @@ the same tiny test index.</p>
<code>--session DIR</code> (<code>cmd/phylo/args.rs</code>) names a directory (outside the
index) that persists the <code>snp-*</code> <code>--distance</code> sample — the
<code>PairwiseTally</code>/<code>PartitionDispersion</code> pair <code>sample_index</code> would otherwise
rebuild from scratch — across <em>separate</em> <code>obikmer phylo</code> invocations.</p>
rebuild from scratch — across <em>separate</em> <code>obiskim phylo</code> invocations.</p>
<p><strong>Crate placement, as planned</strong>: a new <strong><code>obiksession</code></strong> crate
(<code>src/obiksession/</code>), domain-agnostic — no <code>PairwiseTally</code>/"site" concept
anywhere in it. <code>Session::open(dir, params: &amp;[u8], force: bool)</code> handles
@@ -5194,6 +5412,83 @@ the new <code>snp-*</code> ones — accepted explicitly (pre-release, single dev
user, no external consumers to break). Scoped to the distance matrix only:
<code>--shared-kmers</code> and <code>--raw-snp-counts</code> are counts, not distances, and keep
their existing CSV-only format.</p>
<h2 id="vcf-export-of-the-pseudo-alignment">VCF export of the pseudo-alignment</h2>
<p><code>phylo --vcf</code> writes the drawn sites of <code>--pseudo-alignment</code> as a VCF
(<code>--fasta</code>/<code>--vcf</code> choose the formats, FASTA is the default, both can be
combined). A family has no genomic coordinate, so coordinates are virtual and
derived from where the scan finds the family: <code>CHROM = obiskim_&lt;partition&gt;_&lt;layer&gt;</code>,
<code>POS = family_idx + 1</code> (<code>scan_layer_families</code>' iteration-order index inside
that layer). Stable for a given index + annex, sorted by construction because
<code>on_family</code> is replayed in <code>family_idx</code> order. A global dense rank or a bit
packing of (layer, partition, idx) into one <code>POS</code> was rejected: it needs
per-layer minorant counts and can exceed VCF's 2^31-1 bound.</p>
<p><code>ID</code> is <code>CanonicalKmer::family_id()</code>: centre forced to <code>A</code> on the
k-mer and on its revcomp, each canonicalised, minimum of the two (centre
printed as <code>N</code>). Index-independent, hence the key for merging VCFs from
different indexes. No <code>INFO/LOCUS</code> duplicate (dropped: same string as <code>ID</code>, costly
at 5M loci); <code>QUAL</code>/<code>FILTER</code>/<code>INFO</code> are all <code>.</code>. An alternative defined as the minimum of
<code>central_canonical_neighbors()</code> was dropped: it canonicalises 4 k-mers where
this one needs 2, with no other benefit. <code>family_id</code> idempotence and
family-wide equality are tested exhaustively for k = 3, 5, 7.</p>
<p><code>SurvivingFamily</code> now carries the minorant k-mer (the scan callback passes it),
and <code>SnpAlignment</code> a <code>SiteLocus</code> per column. Alleles are the unambiguous cells
of the IUPAC matrix, in the FASTA's convention (central base of the member's
canonical form, not necessarily the <code>ID</code> k-mer's strand).</p>
<p>Absence handling. <code>masked_state</code> keeps absence (<code>m == 0</code>, <code>-</code>) as a real state
unless <code>--free-loss</code>, where it becomes missing (<code>?</code>). A first version mapped
<code>-</code> and <code>?</code> both to <code>.</code>: on a toy 4-genome index half of the lines then had
<code>ALT = .</code> (presence/absence-only sites, selected by <code>survives_masking</code>), i.e.
polymorphic sites rendered as monomorphic. Absence became an extra allele,
first written <code>*</code>; that was a misuse: in VCF 4.5 (section on the ALT column)
<code>*</code> is "allele missing due to overlapping deletion", and <code>&lt;*&gt;</code> is the gVCF
unspecified allele, <code>DEL</code>/<code>INS</code>/<code>DUP</code>/<code>INV</code>/<code>CNV</code> are structural-variant
types. Now the symbolic allele <code>&lt;ABS&gt;</code> (free-form ID, declared by a
<code>##ALT=&lt;ID=ABS,...&gt;</code> line, always written in the header, listed after the
bases); <code>?</code> and IUPAC ambiguity codes stay <code>.</code> (haploid GT cannot express a
genome carrying several forms; superseded below). A symbolic ALT formally
asks for a padding base before <code>POS</code>; moot here, positions being virtual.
Checked with <code>bcftools view</code>/<code>stats</code> and <code>tabix</code>: no warning, the sites with
<code>&lt;ABS&gt;</code> are classed "others" by <code>bcftools stats</code>, and
<code>-e 'ALT="&lt;ABS&gt;"'</code> drops exactly them. The writer needs no knowledge of
<code>--free-loss</code>: <code>-</code> simply never occurs with it. A reference-genome option
(<code>--vcf-ref</code>) was implemented then dropped: <code>REF</code> is always the per-site
majority base (alphabetical on ties).</p>
<p>Ploidy. VCF allows any ploidy in <code>GT</code> (number of alleles written, variable
per sample/site), but an obiskim cell only says <em>which</em> forms a genome
carries, not their multiplicity (<code>A/A/G</code> and <code>A/G/G</code> are both <code>R</code>), nor
whether several forms mean heterozygosity or paralogues. Compromise chosen:
<code>--no-ambiguity</code> =&gt; haploid (ambiguous cells are already <code>?</code>); otherwise
diploid, single base <code>X</code> -&gt; <code>X/X</code>, two-base code -&gt; <code>X/Y</code>, <code>-</code> -&gt; <code>&lt;ABS&gt;/&lt;ABS&gt;</code>, and
three/four-base codes or <code>?</code> -&gt; <code>./.</code>. <code>REF</code> is the majority allele counting
each copy once (so a het contributes 1+1, a homozygote 2). Counting copies
for a real dosage (polyploids) would need k-mer counts (<code>--with-counts</code>),
not used by the pseudo-alignment scan today. <code>--only-diploid</code> (selection option, <code>conflicts_with --no-ambiguity</code>) adds a
third <code>masked_state</code> rule: <code>count_ones() &gt; 2</code> -&gt; missing. It lives in
<code>SamplingSpec</code>/<code>masked_state</code>, i.e. the post-hoc masking and
<code>survives_masking</code>, so FASTA, Sankoff and <code>snp-*</code> see it too. Unit-tested
(<code>masked_state</code>); the toy index has no 3/4-member cells, so the end-to-end
run is identical to the default mode.</p>
<p>First version of this flag read the persisted annexes under the default
convention (a third variant was judged not worth it). Rejected: the draw
would then describe other genomes than the alignment, and the pair-balance
weights and entropy are computed from the carrier set. Replaced by
<code>AmbiguityPolicy { Keep, Forbid, OnlyDiploid }</code> (one type instead of
<code>free_loss</code>/<code>no_ambiguity</code>/<code>only_diploid</code> booleans in <code>masked_state</code>,
<code>is_carrier</code>, <code>SamplingSpec</code> and every annex key). Annex headers store
<code>AmbiguityPolicy::header_flags</code> (0 = Keep, 1 = Forbid, as the old bit, 2 =
OnlyDiploid), so annexes written before the change stay valid; each policy
has its own file (<code>*.diploid.*</code> for the new one). <code>--sibling-annex</code> no longer
precomputes everything (<code>AnnexRequest::everything</code> removed, a rebuild only
costs the base annex): it builds the derived annexes named by the other
options of the command (<code>AnnexSelection</code>: <code>--entropy</code>, <code>--quartet</code>,
<code>--pair-balance</code>, <code>--family-overlap</code>/<code>--min-shared-family</code>, under the one
policy given); the rest is built on demand as before. A rebuild still drops
every derived annex (their <code>family_idx</code> numbering is tied to the base one).
Checked on the toy index: <code>--sibling-annex</code> alone leaves only
<code>siblings.psib</code>; <code>--quartet --only-diploid</code> adds <code>quartet.diploid.pbiv</code> only.
Toy index: default mode 187
lines, no <code>ALT = .</code>; <code>--no-ambiguity</code> 93 lines (the sites whose polymorphism
was only ambiguity codes disappear, since those cells became <code>?</code>).</p>
<h2 id="references">References</h2>
<p>The Mash mutation-rate model this discussion contrasts with:
(Fan <em>et al.</em> 2015; Marbl Lab 2026)<sup id="fnref:Mash-distances-doc"><a class="footnote-ref" href="#fn:Mash-distances-doc">1</a></sup> <sup id="fnref:Fan2015-mash-formula"><a class="footnote-ref" href="#fn:Fan2015-mash-formula">2</a></sup>.</p>
+202 -6
View File
@@ -19,7 +19,7 @@
<title>Indexing.refs - obikmer</title>
<title>Indexing.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
@@ -1275,7 +1471,7 @@
</ul>
<h2 id="notes">Notes</h2>
<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>obikmer/src/cli.rs</code>).</p>
(converti par <code>partitions_to_bits</code> dans <code>obiskim/src/cli.rs</code>).</p>
+202 -6
View File
@@ -12,7 +12,7 @@
<link rel="prev" href="../minimizer/">
<link rel="next" href="../evolutionary_distances/">
<link rel="next" href="../chance_sharing/">
@@ -23,7 +23,7 @@
<title>Partitioning architecture - obikmer</title>
<title>Partitioning architecture - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -467,6 +467,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -489,6 +517,62 @@
<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>
</nav>
@@ -745,6 +829,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -941,6 +1053,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1219,6 +1387,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -19,7 +19,7 @@
<title>Minimizer.refs - obikmer</title>
<title>Minimizer.refs - obiskim</title>
@@ -76,7 +76,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -90,7 +90,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -392,6 +392,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -414,6 +442,62 @@
<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>
</nav>
@@ -670,6 +754,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -866,6 +978,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1144,6 +1312,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
+201 -5
View File
@@ -23,7 +23,7 @@
<title>Minimizer selection - obikmer</title>
<title>Minimizer selection - obiskim</title>
@@ -80,7 +80,7 @@
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="obikmer" class="md-header__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" 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>
@@ -94,7 +94,7 @@
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
obikmer
obiskim
</span>
</div>
<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">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="obikmer" class="md-nav__button md-logo" aria-label="obikmer" data-md-component="logo">
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" 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>
</a>
obikmer
obiskim
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -511,6 +511,34 @@
<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">
<a href="../evolutionary_distances/" class="md-nav__link">
@@ -533,6 +561,62 @@
<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>
</nav>
@@ -789,6 +873,34 @@
<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">
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
@@ -985,6 +1097,62 @@
<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">
<a href="../../implementation/filtering/" class="md-nav__link">
@@ -1263,6 +1431,34 @@
<li class="md-nav__item">
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
<span class="md-ellipsis">
Hot resume and memoization
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff