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

+78 -7
View File
@@ -23,7 +23,7 @@
<title>estimate - obikmer — User Guide</title>
<title>estimate - obiskim — User Guide</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 — User Guide" class="md-header__button md-logo" aria-label="obikmer — User Guide" data-md-component="logo">
<a href="../.." title="obiskim — User Guide" class="md-header__button md-logo" aria-label="obiskim — User Guide" 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 — User Guide
obiskim — User Guide
</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 — User Guide" class="md-nav__button md-logo" aria-label="obikmer — User Guide" data-md-component="logo">
<a href="../.." title="obiskim — User Guide" class="md-nav__button md-logo" aria-label="obiskim — User Guide" 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 — User Guide
obiskim — User Guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
@@ -1189,6 +1189,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#comparing-an-index-with-random-sharing" class="md-nav__link">
<span class="md-ellipsis">
Comparing an index with random sharing
</span>
</a>
</li>
</ul>
@@ -1491,6 +1502,17 @@
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#comparing-an-index-with-random-sharing" class="md-nav__link">
<span class="md-ellipsis">
Comparing an index with random sharing
</span>
</a>
</li>
</ul>
@@ -1511,8 +1533,8 @@
<h1 id="estimate">estimate</h1>
<p>Estimate approximate-index parameters (z, evidence bits, false-positive rate) before building an index with <code>--approx</code>, without touching any files.</p>
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>estimate<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
<p><code>estimate</code> has two independent uses. Without <code>--index</code>, it estimates approximate-index parameters (z, evidence bits, false-positive rate) before building an index with <code>--approx</code>, without touching any files. With <code>--index</code>, it compares the k-mer sharing observed in an existing index with the sharing expected by chance (see the last section).</p>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>estimate<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
</code></pre></div>
<h2 id="options">Options</h2>
<table>
@@ -1547,6 +1569,55 @@
</tbody>
</table>
<p>Any two of <code>-z</code>, <code>--evidence-bits</code>, <code>--fp</code> may be given; the third is derived using the same model as <code>index --approx</code> and <code>convert --approx-evidence</code> (<span class="arithmatex">\(FP = 1 / 2^{b \cdot z}\)</span>). The report printed to stdout includes: query <span class="arithmatex">\(k\)</span>, effective indexed <span class="arithmatex">\(k\)</span> (<span class="arithmatex">\(k-z+1\)</span>), <span class="arithmatex">\(z\)</span>, evidence bits, per-kmer false-positive rate, and per-z-window false-positive rate.</p>
<h2 id="comparing-an-index-with-random-sharing">Comparing an index with random sharing</h2>
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>estimate<span class="w"> </span>--index<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>--presence-threshold<span class="w"> </span>N<span class="o">]</span><span class="w"> </span><span class="o">[</span>-o<span class="w"> </span>FILE<span class="o">]</span>
</code></pre></div>
<p>With <code>--index</code>, <code>estimate</code> reads an existing index instead of computing approximate-index parameters, and it cannot be combined with <code>-k</code>, <code>-z</code>, <code>--evidence-bits</code> or <code>--fp</code>. Its purpose is to tell how much of the k-mer sharing between the genomes of the index goes beyond what chance alone would produce, which is the question behind the choice of <span class="arithmatex">\(k\)</span> (see <a href="../../theory/kmer_indexing/kmers/">K-mer size</a>).</p>
<p>The command writes a CSV, to standard output or to <code>FILE</code>, with one row for each <span class="arithmatex">\(r\)</span> from 1 to the number of genomes <span class="arithmatex">\(S\)</span>:</p>
<table>
<thead>
<tr>
<th>Column</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>r</code></td>
<td>Minimum number of genomes sharing a k-mer</td>
</tr>
<tr>
<td><code>k_r</code></td>
<td>Number of k-mers present in at least <code>r</code> genomes</td>
</tr>
<tr>
<td><code>O_r</code></td>
<td>Observed proportion <span class="arithmatex">\(k_r / k_1\)</span></td>
</tr>
<tr>
<td><code>q_r</code></td>
<td>Proportion expected by chance, <span class="arithmatex">\(P(X \geq r \mid X \geq 1)\)</span>, where <span class="arithmatex">\(X\)</span> is the number of genomes containing a given k-mer under the random-sequence model</td>
</tr>
<tr>
<td><code>D_r</code></td>
<td>Deviation <span class="arithmatex">\(O_r - q_r\)</span></td>
</tr>
<tr>
<td><code>FP_r</code></td>
<td>Number of k-mers expected to be present in at least <code>r</code> genomes by chance over the whole canonical k-mer space, <span class="arithmatex">\(M_k \, P(X \geq r)\)</span></td>
</tr>
<tr>
<td><code>FDR_r</code></td>
<td>Estimated false discovery rate of the k-mers shared by at least <code>r</code> genomes: 1 when <code>k_r</code> is 0, otherwise <span class="arithmatex">\(\min(1, \mathrm{FP}_r / k_r)\)</span></td>
</tr>
</tbody>
</table>
<p>A positive <code>D_r</code> means that k-mers are shared by at least <code>r</code> genomes more often than random sequences would share them; a negative value means less often. The first row always has <code>D_1 = 0</code>, because <span class="arithmatex">\(k_1\)</span> counts only k-mers present in at least one genome.</p>
<p>When no k-mer is shared by at least <code>r</code> genomes (<code>k_r = 0</code>), there is no set of k-mers whose false discovery rate could be estimated, and <code>FDR_r</code> is set to 1 by convention. This value means that nothing can be claimed at this level; it does not mean that the observed k-mers are false positives. The <code>FP_r</code> column of the same row shows how many k-mers chance alone would have produced.</p>
<p>The expected proportion is computed under the random-sequence model of the theory page: the genomes are unrelated, and each genome is a set of <span class="arithmatex">\(N_i\)</span> distinct canonical k-mers drawn without replacement and uniformly from the <span class="arithmatex">\(M_k = 4^k/2\)</span> canonical k-mers. A given k-mer is then present in genome <span class="arithmatex">\(i\)</span> with probability <span class="arithmatex">\(p_i = N_i / M_k = 2N_i/4^k\)</span>, where <span class="arithmatex">\(N_i\)</span> is the number of distinct canonical k-mers considered as present in genome <span class="arithmatex">\(i\)</span>. Genome sizes are rarely known, in particular when the index was built from unassembled reads, and the number of distinct k-mers has the advantage of being measured on the index itself and of not depending on the sequencing coverage.</p>
<p>Because the <span class="arithmatex">\(N_i\)</span> differ between genomes, the number <span class="arithmatex">\(X\)</span> of genomes containing a k-mer follows an exact Poisson-binomial distribution, from which <span class="arithmatex">\(P(X \geq r)\)</span> is obtained for every <span class="arithmatex">\(r\)</span> in a single pass. The approximation by a binomial distribution based on the mean genome size is not used.</p>
<p><code>--presence-threshold</code> (default 1) has the same meaning as in <code>phylo</code>: on an index that stores counts, a k-mer is present in a genome only when its count reaches the threshold. Both <span class="arithmatex">\(N_i\)</span> and <span class="arithmatex">\(k_r\)</span> are computed with this same threshold, so the observed and expected proportions describe the same data. It has no effect on an index without counts.</p>
<p>The <code>k</code> used is the k-mer size stored in the index (for an approximate index, the effective indexed size <span class="arithmatex">\(k-z+1\)</span>).</p>