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:
1 parent
917cb26186
commit
f1b4b4ebda
102 files changed
+27255
-1226
No files matched your search
@@ -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>&self</code>/<code>&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(&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(&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() < 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></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::<fn(Progress)>)</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<KmerPartition></code> instead of <code>Vec<Vec<Layer>></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>
|
||||
|
||||
Reference in new issue
Block a user