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
+5
-5
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
|
||||
<title>obikmer — User Guide</title>
|
||||
<title>obiskim — User Guide</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 — 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>
|
||||
@@ -85,7 +85,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">
|
||||
@@ -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 — 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>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Architecture notes - obikmer — User Guide</title>
|
||||
<title>Architecture notes - obiskim — User Guide</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 — 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>
|
||||
@@ -92,7 +92,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">
|
||||
@@ -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 — 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>
|
||||
@@ -1573,7 +1573,7 @@
|
||||
|
||||
|
||||
<h1 id="architecture-notes-for-advanced-use">Architecture notes for advanced use</h1>
|
||||
<p>This page describes execution-level behavior relevant to sizing and running <code>obikmer</code> on large datasets or multi-socket machines. It complements the <a href="../formats/index_layout/">index format</a> and <a href="../theory/kmer_indexing/indexing_architecture/">theory</a> pages.</p>
|
||||
<p>This page describes execution-level behavior relevant to sizing and running <code>obiskim</code> on large datasets or multi-socket machines. It complements the <a href="../formats/index_layout/">index format</a> and <a href="../theory/kmer_indexing/indexing_architecture/">theory</a> pages.</p>
|
||||
<h2 id="sequence-invariant">Sequence invariant</h2>
|
||||
<p>Every input sequence is treated purely as a compact representation of a set of overlapping kmers:</p>
|
||||
<ul>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Index construction and on-disk layout - obikmer — User Guide</title>
|
||||
<title>Index construction and on-disk layout - 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>
|
||||
@@ -1580,46 +1580,55 @@
|
||||
<h2 id="construction-pipeline">Construction pipeline</h2>
|
||||
<p>Building an index (<a href="../../usage/index_command/"><code>index</code></a>) proceeds through a fixed sequence of phases, each operating independently per partition (see <a href="../../theory/kmer_indexing/indexing_architecture/">Partitioning and indexing architecture</a>):</p>
|
||||
<ol>
|
||||
<li><strong>Scatter.</strong> A single streaming pass over the input. Each sequence fragment is cut at non-ACGT bases, passed through the low-complexity entropy filter (see <a href="../../theory/kmer_indexing/entropy_filter/">Low-complexity kmer filter</a>), and any resulting segment shorter than k is dropped. Surviving segments are decomposed into super-kmers, canonicalized, and routed by <code>hash(minimizer) mod n_partitions</code> into one file per partition.</li>
|
||||
<li><strong>Scatter.</strong> A single streaming pass over the input. Each sequence fragment is cut at non-ACGT bases, passed through the low-complexity entropy filter (see <a href="../../theory/kmer_indexing/entropy_filter/">Low-complexity kmer filter</a>), and any resulting segment shorter than k is dropped. Surviving segments are decomposed into super-kmers, canonicalized, and routed by <code>hash(minimizer) mod n_partitions</code> into one file per partition. The number of partitions is always a power of two, so this routing amounts to keeping the low bits of the hash.</li>
|
||||
<li><strong>Dereplication.</strong> Within each partition, identical super-kmer sequences are merged and their occurrence counts summed. This count is per super-kmer, not per kmer — a kmer's true abundance is the sum of the counts of every super-kmer containing it.</li>
|
||||
<li><strong>Exact counting.</strong> Every kmer in every dereplicated super-kmer is enumerated and its exact total count computed. A per-genome kmer frequency spectrum is produced at this stage.</li>
|
||||
<li><strong>Quorum filtering.</strong> Kmers outside the <code>--min-abundance</code>/<code>--max-abundance</code> range are dropped, and super-kmers are recompacted around the surviving kmer set.</li>
|
||||
<li><strong>Local assembly.</strong> The surviving kmers of each partition are assembled into unitigs — maximal non-branching runs of a local de Bruijn graph — such that every kmer appears exactly once, at one (unitig, offset) location.</li>
|
||||
<li><strong>MPHF and evidence construction.</strong> A minimal perfect hash function is built over the canonical kmers of each partition, together with the evidence structure needed to verify that a queried kmer was genuinely indexed (see below). Per-genome counts or presence bits are recorded alongside if requested.</li>
|
||||
<li><strong>Exact counting.</strong> Every kmer in every dereplicated super-kmer is enumerated and its exact total count computed. To accumulate these counts, a provisional minimal perfect hash function is built over the distinct kmers of the partition and a temporary count file is filled through it. Both are working files: they are deleted at the end of the build unless <code>--keep-intermediate</code> is given. A per-genome kmer frequency spectrum is produced at this stage, from the counts as they are before any abundance filtering.</li>
|
||||
<li><strong>Quorum filtering and local assembly.</strong> The kmers of the dereplicated super-kmers are fed one by one into a local de Bruijn graph of the partition. A kmer whose count falls outside the <code>--min-abundance</code>/<code>--max-abundance</code> range is dropped at this point, and never enters the graph; the super-kmers themselves are not rewritten. The kmers that remain are assembled into unitigs — maximal non-branching runs of the graph — such that every kmer appears exactly once, at one (unitig, offset) location.</li>
|
||||
<li><strong>MPHF and evidence construction.</strong> The final minimal perfect hash function is built over the canonical kmers that survived, together with the evidence structure needed to verify that a queried kmer was genuinely indexed (see below). Per-genome counts or presence bits are recorded alongside if requested; the counts come from the counting phase.</li>
|
||||
</ol>
|
||||
<p>Phases 1–5 are independent per partition and run in parallel; phase 6 finalizes each partition once its kmer set is fixed.</p>
|
||||
<p>Within each phase, the partitions are independent of one another and are processed in parallel. The phases themselves follow one another over the whole index, and the index records in its <code>index.meta</code> file how far the build has gone (after scatter, after counting, and when fully built). A build that was interrupted can therefore be resumed: the phases already completed are skipped.</p>
|
||||
<h2 id="minimal-perfect-hash-function-mphf">Minimal perfect hash function (MPHF)</h2>
|
||||
<p>Each partition's surviving kmers are mapped to a dense range of integer slots by a minimal perfect hash function: no collisions, near-optimal space (a few bits per key), O(1) lookup. Because an MPHF maps <em>any</em> input to some slot — including kmers that were never indexed — a lookup alone cannot distinguish a genuinely indexed kmer from an arbitrary one; every lookup is followed by an evidence check.</p>
|
||||
<h2 id="evidence-exact-vs-approximate">Evidence: exact vs. approximate</h2>
|
||||
<p>Two verification modes are available, selected at build time (<code>index --approx</code>) and convertible afterwards (<a href="../../usage/convert/"><code>convert</code></a>):</p>
|
||||
<p>Three verification modes exist. The exact and approximate modes are selected at build time (<code>index --approx</code>), and any of the three can be reached afterwards with <a href="../../usage/convert/"><code>convert</code></a>:</p>
|
||||
<ul>
|
||||
<li><strong>Exact</strong> (default): the hashed slot stores a pointer back into the partition's unitig data. At query time the kmer is reconstructed from that location and compared directly to the query. Zero false positives, at the cost of one extra random read per lookup.</li>
|
||||
<li><strong>Approximate</strong> (<code>--approx</code>): the slot stores a short fingerprint (<code>--evidence-bits</code> bits) instead of a pointer; verification is a single fingerprint comparison. This trades a small, bounded false-positive rate (<span class="arithmatex">\(1/2^b\)</span> per kmer, reduced further to about <span class="arithmatex">\(1/2^{b \cdot z}\)</span> for a read requiring <span class="arithmatex">\(z\)</span> consecutive matching kmers via the <code>-z</code>/<code>--findere-z</code> parameter) for lower memory and disk usage, since no reconstruction index is needed. See <a href="../../usage/estimate/"><code>estimate</code></a> to explore this trade-off before building.</li>
|
||||
<li><strong>Hybrid</strong> (<code>convert --hybrid-evidence</code>): both the fingerprint and the exact evidence are kept. A lookup uses the fingerprint, which is fast and approximate, while the exact evidence remains stored alongside it.</li>
|
||||
</ul>
|
||||
<h2 id="on-disk-layout">On-disk layout</h2>
|
||||
<div class="highlight"><pre><span></span><code><index_root>/
|
||||
index.meta global configuration (k, minimizer size, partition count,
|
||||
evidence mode, whether counts are stored) and genome list/metadata
|
||||
scatter.done / count.done / index.done build-progress sentinels
|
||||
spectrums/<label>.json per-genome kmer frequency histogram
|
||||
partitions/
|
||||
part_00000/ ... part_NNNNN/
|
||||
index/
|
||||
meta.json number of layers in this partition
|
||||
layer_0/
|
||||
unitigs.bin reconstructible kmer sequence data — always kept
|
||||
unitigs.bin.idx random-access index into unitigs.bin (exact evidence only)
|
||||
mphf.bin the minimal perfect hash function
|
||||
evidence.bin exact evidence (exact mode only)
|
||||
fingerprint.bin approximate evidence (approximate mode only)
|
||||
counts/ per-genome kmer counts (if counts were requested)
|
||||
presence/ per-genome presence/absence bits
|
||||
layer_1/, layer_2/, ... added by later merges, same internal structure
|
||||
<div class="highlight"><pre><span></span><code>📁 <index_root>/
|
||||
├── 📄 index.meta configuration (k, minimizer size, partition count,
|
||||
│ evidence mode, counts stored or not), genome list
|
||||
│ and metadata, build state (empty, scattered,
|
||||
│ counted, indexed)
|
||||
├── 📄 .obiskim.lock lock files: commands that read the index share it,
|
||||
├── 📄 .obiskim.gate commands that write into it hold it exclusively
|
||||
├── 📁 spectrums/
|
||||
│ └── 📄 <label>.json per-genome kmer frequency histogram
|
||||
└── 📁 partitions/
|
||||
├── 📁 part_00000/
|
||||
│ └── 📁 index/
|
||||
│ ├── 📁 layer_0/
|
||||
│ │ ├── 📄 layer_meta.json number of kmers in this layer
|
||||
│ │ ├── 📄 unitigs.bin reconstructible kmer sequence data — always kept
|
||||
│ │ ├── 📄 unitigs.bin.idx random access into unitigs.bin (exact, hybrid)
|
||||
│ │ ├── 📄 mphf.bin the minimal perfect hash function
|
||||
│ │ ├── 📄 evidence.bin exact evidence (exact, hybrid)
|
||||
│ │ ├── 📄 fingerprint.bin approximate evidence (approximate, hybrid)
|
||||
│ │ ├── 📁 counts/ per-genome kmer counts (if requested)
|
||||
│ │ └── 📁 presence/ per-genome presence/absence bits
|
||||
│ └── 📁 layer_1/, layer_2/, … added by later merges, same structure
|
||||
├── 📁 part_00001/
|
||||
│ └── …
|
||||
└── 📁 part_NNNNN/
|
||||
</code></pre></div>
|
||||
<p>The build state is stored in <code>index.meta</code> and not in separate marker files: it is what allows an interrupted build to resume. The number of layers of a partition is not stored anywhere either; it is found by looking for <code>layer_0</code>, <code>layer_1</code>, ... until one is missing. A partition that received no kmer at all (which happens with small inputs and many partitions) has no layer on disk.</p>
|
||||
<p>The matrix directory of a layer, <code>counts/</code> or <code>presence/</code>, exists in three forms, which hold the same information. A freshly built index stores one file per genome, with a small metadata file (for counts, <code>col_000000.pciv</code>, <code>col_000001.pciv</code>, ... and <code>meta.json</code>). The dense packed form, produced by <a href="../../usage/pack/"><code>pack</code></a>, stores the whole matrix in a single file. The sparse packed form, produced by <code>pack --sparse</code> and, by default, by <a href="../../usage/merge/"><code>merge</code></a>, stores for each kmer only the list of genomes that carry it, with the lists shared between kmers deduplicated (for counts, the directory then holds files such as <code>dict_values.bin</code>, <code>singleton.pfiv</code>, <code>multi.pfiv</code> and <code>sparse_meta.json</code>). Which form a layer uses is detected from the files found in the directory.</p>
|
||||
<p><code>unitigs.bin</code> is the only file from which the indexed kmer content can be fully recovered; it is always retained. Every other file (MPHF, evidence, counts) is derived from it.</p>
|
||||
<p>A <strong>layer</strong> corresponds to one increment of kmer content added to a partition — most commonly, one <a href="../../usage/merge/"><code>merge</code></a> operation that introduces kmers not already present in the index. Genomes already present in the index simply gain new columns in the existing layers' count/presence data; only genuinely new kmer content is assembled into a new layer. Because of this, merging cost scales with the novel kmer content being added, not with the accumulated size of the index. A query against an index with several layers checks each layer's MPHF in turn.</p>
|
||||
<p>Sources merged together must share the same kmer size, minimizer size, partition count, and evidence mode (including matching approximate-mode parameters); mismatches are rejected rather than silently reconciled — <a href="../../usage/convert/"><code>convert</code></a> one of the sources first if needed.</p>
|
||||
<p><code>obikmer pack</code> consolidates a partition's per-column files (counts/presence) into a single file, reducing the number of file opens needed at query time.</p>
|
||||
<p>A <strong>layer</strong> corresponds to one increment of kmer content added to a partition — most commonly, one <a href="../../usage/merge/"><code>merge</code></a> operation that introduces kmers not already present in the index. The genomes of the merged sources are added as new columns to the count/presence data of the existing layers; only genuinely new kmer content, that is kmers absent from every existing layer of the partition, is assembled into a new layer. A kmer therefore belongs to exactly one layer of its partition. Because of this, merging cost scales with the novel kmer content being added, not with the accumulated size of the index. A query against an index with several layers checks each layer's MPHF in turn.</p>
|
||||
<p>Sources merged together must share the same kmer size, minimizer size and partition count; any mismatch is rejected rather than silently reconciled. The evidence mode, on the other hand, may differ between sources: as soon as one source is approximate or hybrid, the destination is chosen among the approximate or hybrid sources, and the merged index takes its evidence mode. A count merge additionally requires every source to store counts. Finally, an index whose matrices are already packed, which includes any merge output, can be merged in as a source but not used as the destination, so at least one source must still be unpacked.</p>
|
||||
<p><a href="../../usage/pack/"><code>pack</code></a> consolidates a partition's per-column files (counts/presence) into a single file, reducing the number of file opens needed at query time; with <code>--sparse</code>, it also switches to the sparse form described above.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
+14
-14
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>VCF pseudo-alignment - obikmer — User Guide</title>
|
||||
<title>VCF pseudo-alignment - 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>
|
||||
@@ -1748,26 +1748,26 @@
|
||||
<p>The pseudo-alignment (see <a href="../../theory/phylogeny/snp_based/central_snp_model/">Central-position SNP model</a>) has one column per <em>family</em>: the up to four k-mers that share all their bases except the central one. A genome that carries one of these k-mers shows a particular base at the centre, and the columns of the alignment are those central bases, genome by genome. The FASTA output keeps this as a matrix of letters. The VCF output lists the same columns as sites with alleles and genotypes, which is the form that variant-oriented tools (<code>bcftools</code>, population-genetics software, genotype viewers) expect.</p>
|
||||
<p>Nothing here comes from a reference genome. The file has no real coordinates, and the sites are not located on a chromosome: the positions below are labels that make the file valid and reproducible, not map positions.</p>
|
||||
<h2 id="producing-the-file">Producing the file</h2>
|
||||
<div class="highlight"><pre><span></span><code>obikmer phylo --vcf --n-sites 5000000 -o run1 my_index
|
||||
<div class="highlight"><pre><span></span><code>obiskim phylo --vcf --n-sites 5000000 -o run1 my_index
|
||||
</code></pre></div>
|
||||
<p><code>--vcf</code> implies <code>--pseudo-alignment</code>, so <code>--n-sites N|all</code> is required, (the sibling annex it reads is built automatically if missing; see <a href="../../usage/phylo/"><code>phylo</code></a>). <code>--fasta</code> and <code>--vcf</code> can be given together to get both files from the same draw; with neither, only the FASTA is written. Every option that shapes the draw (<code>--free-loss</code>, <code>--no-ambiguity</code>, <code>--only-diploid</code>, <code>--quartet</code>, <code>--exclude-genome</code>, ...) applies to the VCF exactly as to the FASTA, since both describe the same sites.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<p>An illustrative excerpt (columns are tab-separated in the file):</p>
|
||||
<div class="highlight"><pre><span></span><code>##fileformat=VCFv4.5
|
||||
##source=obikmer
|
||||
##contig=<ID=obikmer_0_0>
|
||||
##contig=<ID=obikmer_0_1>
|
||||
##source=obiskim
|
||||
##contig=<ID=obiskim_0_0>
|
||||
##contig=<ID=obiskim_0_1>
|
||||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype (diploid)">
|
||||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT idx0 idx1 idx2 idx3
|
||||
obikmer_0_0 440 CGATTNGTTAA A G . . . GT 0/0 1/1 0/0 0/0
|
||||
obikmer_0_0 1511 CACGANTGTAG A G,T . . . GT 0/0 0/0 1/1 2/2
|
||||
obikmer_0_1 9 TTACGNAGCTA C * . . . GT 0/0 0/0 1/1 0/0
|
||||
obiskim_0_0 440 CGATTNGTTAA A G . . . GT 0/0 1/1 0/0 0/0
|
||||
obiskim_0_0 1511 CACGANTGTAG A G,T . . . GT 0/0 0/0 1/1 2/2
|
||||
obiskim_0_1 9 TTACGNAGCTA C * . . . GT 0/0 0/0 1/1 0/0
|
||||
</code></pre></div>
|
||||
<p>There is one sample column per genome that takes part in the draw, named after the genome label, in the index's own order. A genome removed with <code>--exclude-genome</code> or <code>--min-shared-family</code> has no column at all. <code>QUAL</code>, <code>FILTER</code> and <code>INFO</code> are always <code>.</code>: obikmer applies no variant filter and attaches no annotation, and leaving them empty keeps a file of millions of sites compact.</p>
|
||||
<p>There is one sample column per genome that takes part in the draw, named after the genome label, in the index's own order. A genome removed with <code>--exclude-genome</code> or <code>--min-shared-family</code> has no column at all. <code>QUAL</code>, <code>FILTER</code> and <code>INFO</code> are always <code>.</code>: obiskim applies no variant filter and attaches no annotation, and leaving them empty keeps a file of millions of sites compact.</p>
|
||||
<h2 id="coordinates-chrom-and-pos">Coordinates: <code>CHROM</code> and <code>POS</code></h2>
|
||||
<p>An index is organised in partitions, and each partition holds one or more layers of k-mers (see <a href="../index_layout/">Index construction and on-disk layout</a>). A family always belongs to exactly one layer of one partition, and the families of a layer are visited in a fixed order. The VCF uses that structure as coordinates:</p>
|
||||
<ul>
|
||||
<li><code>CHROM</code> is <code>obikmer_<partition>_<layer></code>, one virtual contig per layer of each partition in which at least one site was drawn;</li>
|
||||
<li><code>CHROM</code> is <code>obiskim_<partition>_<layer></code>, one virtual contig per layer of each partition in which at least one site was drawn;</li>
|
||||
<li><code>POS</code> is the rank of the family inside that layer, starting at 1.</li>
|
||||
</ul>
|
||||
<p>For a given index and a given sibling annex, a family therefore always receives the same <code>CHROM</code> and <code>POS</code>, whatever the draw, the options or the number of sites requested. Two runs on the same index can be compared position by position. This stability is lost if the sibling annex is rebuilt, or if the index is rebuilt, merged or filtered, because the families are then enumerated again. Positions are never comparable between two different indexes; use <code>ID</code> for that. Even rebuilding an index from the very same genomes may enumerate the families in another order: on a small test index built twice from identical input, the family <code>CGATTNGTTAA</code> had <code>POS</code> 440 the first time and 371 the second, with the same <code>ID</code>.</p>
|
||||
|
||||
+9
-9
@@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
|
||||
<title>obikmer — User Guide</title>
|
||||
<title>obiskim — User Guide</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 — 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>
|
||||
@@ -92,7 +92,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">
|
||||
@@ -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 — 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>
|
||||
@@ -1616,9 +1616,9 @@
|
||||
|
||||
|
||||
|
||||
<h1 id="obikmer">obikmer</h1>
|
||||
<p><code>obikmer</code> is a command-line tool for counting, indexing, querying and comparing DNA sequences represented as kmer sets. It targets individual genome datasets of tens of gigabases, with an emphasis on computational, memory, and disk efficiency.</p>
|
||||
<p>All functionality is exposed through a single binary, <code>obikmer</code>, organized as subcommands.</p>
|
||||
<h1 id="obiskim">obiskim</h1>
|
||||
<p><code>obiskim</code> is a command-line tool for counting, indexing, querying and comparing DNA sequences represented as kmer sets. It targets individual genome datasets of tens of gigabases, with an emphasis on computational, memory, and disk efficiency.</p>
|
||||
<p>All functionality is exposed through a single binary, <code>obiskim</code>, organized as subcommands.</p>
|
||||
<h2 id="core-principles">Core principles</h2>
|
||||
<ul>
|
||||
<li>Kmers are of fixed, odd length <span class="arithmatex">\(k\)</span>, chosen at index-construction time in the range <span class="arithmatex">\([11, 31]\)</span> (see <a href="theory/kmer_indexing/kmers/">Kmers</a>).</li>
|
||||
|
||||
+11
-11
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Installation - obikmer — User Guide</title>
|
||||
<title>Installation - 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>
|
||||
@@ -1767,12 +1767,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">'=https'</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, which 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, which 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>
|
||||
@@ -1789,17 +1789,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><repository-url>
|
||||
<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) optimized for large sequential reads, not for the many small file operations Cargo generates during compilation. Building directly on such a filesystem can be extremely slow.</p>
|
||||
<p>Redirect the build directory to a local scratch disk:</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 scratch space 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 build flag is required — it falls back gracefully to a single-pool strategy on:</p>
|
||||
@@ -1809,7 +1809,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>
|
||||
|
||||
|
||||
|
||||
@@ -857,3 +857,235 @@
|
||||
doi = "10.1214/aop/1176996461",
|
||||
issn = "0091-1798,2168-894X"
|
||||
}
|
||||
|
||||
@ARTICLE{Karlin1997-lm,
|
||||
title = "{Compositional differences within and between eukaryotic genomes}",
|
||||
author = "Karlin, S and Mrázek, J",
|
||||
journal = "Proceedings of the National Academy of Sciences of the United
|
||||
States of America",
|
||||
publisher = "Proceedings of the National Academy of Sciences",
|
||||
volume = 94,
|
||||
number = 19,
|
||||
pages = "10227--10232",
|
||||
abstract = "Eukaryotic genome similarity relationships are inferred using
|
||||
sequence information derived from large aggregates of genomic
|
||||
sequences. Comparisons within and between species sample
|
||||
sequences are based on the profile of dinucleotide relative
|
||||
abundance values (The profile is ρ* XY = f * XY / f * X f * Y for
|
||||
all XY , where f * X denotes the frequency of the nucleotide X
|
||||
and f * XY denotes the frequency of the dinucleotide XY , both
|
||||
computed from the sequence concatenated with its inverted
|
||||
complement). Previous studies with respect to prokaryotes and
|
||||
this study document that profiles of different DNA sequence
|
||||
samples (sample size ≥50 kb) from the same organism are generally
|
||||
much more similar to each other than they are to profiles from
|
||||
other organisms, and that closely related organisms generally
|
||||
have more similar profiles than do distantly related organisms.
|
||||
On this basis we refer to the collection {ρ* XY } as the genome
|
||||
signature . This paper identifies ρ* XY extremes and compares
|
||||
genome signature differences for a diverse range of eukaryotic
|
||||
species. Interpretations on the mechanisms maintaining these
|
||||
profile differences center on genome-wide replication, repair,
|
||||
DNA structures, and context-dependent mutational biases. It is
|
||||
also observed that mitochondrial genome signature differences
|
||||
between species parallel the corresponding nuclear genome
|
||||
signature differences despite large differences between
|
||||
corresponding mitochondrial and nuclear signatures. The genome
|
||||
signature differences also have implications for contrasts
|
||||
between rodents and other mammals, and between monocot and dicot
|
||||
plants, as well as providing evidence for similarities among
|
||||
fungi and the diversity of protists.",
|
||||
month = sep,
|
||||
year = 1997,
|
||||
url = "http://dx.doi.org/10.1073/pnas.94.19.10227",
|
||||
doi = "10.1073/pnas.94.19.10227",
|
||||
pmc = "PMC23344",
|
||||
pmid = 9294192,
|
||||
issn = "0027-8424,1091-6490",
|
||||
language = "en"
|
||||
}
|
||||
|
||||
@ARTICLE{Karlin1997-vm,
|
||||
title = "{Compositional biases of bacterial genomes and evolutionary
|
||||
implications}",
|
||||
author = "Karlin, S and Mrázek, J and Campbell, A M",
|
||||
journal = "Journal of Bacteriology",
|
||||
publisher = "American Society for Microbiology",
|
||||
volume = 179,
|
||||
number = 12,
|
||||
pages = "3899--3913",
|
||||
abstract = "We compare and contrast genome-wide compositional biases and
|
||||
distributions of short oligonucleotides across 15 diverse
|
||||
prokaryotes that have substantial genomic sequence collections.
|
||||
These include seven complete genomes (Escherichia coli,
|
||||
Haemophilus influenzae, Mycoplasma genitalium, Mycoplasma
|
||||
pneumoniae, Synechocystis sp. strain PCC6803, Methanococcus
|
||||
jannaschii, and Pyrobaculum aerophilum). A key observation
|
||||
concerns the constancy of the dinucleotide relative abundance
|
||||
profiles over multiple 50-kb disjoint contigs within the same
|
||||
genome. (The profile is rhoXY* = fXY*/fX*fY* for all XY, where
|
||||
fX* denotes the frequency of the nucleotide X and fY* denotes the
|
||||
frequency of the dinucleotide XY, both computed from the sequence
|
||||
concatenated with its inverted complementary sequence.) On the
|
||||
basis of this constancy, we refer to the collection [rhoXY*] as
|
||||
the genome signature. We establish that the differences between
|
||||
[rhoXY*] vectors of 50-kb sample contigs of different genomes
|
||||
virtually always exceed the differences between those of the same
|
||||
genomes. Various di- and tetranucleotide biases are identified.
|
||||
In particular, we find that the dinucleotide CpG=CG is
|
||||
underrepresented in many thermophiles (e.g., M. jannaschii,
|
||||
Sulfolobus sp., and M. thermoautotrophicum) but overrepresented
|
||||
in halobacteria. TA is broadly underrepresented in prokaryotes
|
||||
and eukaryotes, but normal counts appear in Sulfolobus and P.
|
||||
aerophilum sequences. More than for any other bacterial genome,
|
||||
palindromic tetranucleotides are underrepresented in H.
|
||||
influenzae. The M. jannaschii sequence is unprecedented in its
|
||||
extreme underrepresentation of CTAG tetranucleotides and in the
|
||||
anomalous distribution of CTAG sites around the genome.
|
||||
Comparative analysis of numbers of long tetranucleotide
|
||||
microsatellites distinguishes H. influenzae. Dinucleotide
|
||||
relative abundance differences between bacterial sequences are
|
||||
compared. For example, in these assessments of differences, the
|
||||
cyanobacteria Synechocystis, Synechococcus, and Anabaena do not
|
||||
form a coherent group and are as far from each other as general
|
||||
gram-negative sequences are from general gram-positive sequences.
|
||||
The difference of M. jannaschii from low-G+C gram-positive
|
||||
proteobacteria is one-half of the difference from gram-negative
|
||||
proteobacteria. Interpretations and hypotheses center on the role
|
||||
of the genome signature in highlighting similarities and
|
||||
dissimilarities across different classes of prokaryotic species,
|
||||
possible mechanisms underlying the genome signature, the form and
|
||||
level of genome compositional flux, the use of the genome
|
||||
signature as a chronometer of molecular phylogeny, and
|
||||
implications with respect to the three putative eubacterial,
|
||||
archaeal, and eukaryote domains of life and to the origin and
|
||||
early evolution of eukaryotes.",
|
||||
month = jun,
|
||||
year = 1997,
|
||||
url = "http://dx.doi.org/10.1128/jb.179.12.3899-3913.1997",
|
||||
doi = "10.1128/jb.179.12.3899-3913.1997",
|
||||
pmc = "PMC179198",
|
||||
pmid = 9190805,
|
||||
issn = "0021-9193,1098-5530",
|
||||
language = "en"
|
||||
}
|
||||
@ARTICLE{Karlin1995-lt,
|
||||
title = "{Dinucleotide relative abundance extremes: a genomic signature}",
|
||||
author = "Karlin, S and Burge, C",
|
||||
journal = "Trends in Genetics: TIG",
|
||||
publisher = "Elsevier BV",
|
||||
volume = 11,
|
||||
number = 7,
|
||||
pages = "283--290",
|
||||
abstract = "Early biochemical experiments established that the set of
|
||||
dinucleotide odds ratios or 'general design' is a remarkably
|
||||
stable property of the DNA of an organism, which is essentially
|
||||
the same in protein-coding DNA, bulk genomic DNA, and in
|
||||
different renaturation rate and density gradient fractions of
|
||||
genomic DNA in many organisms. Analysis of currently available
|
||||
genomic sequence data has extended these earlier results, showing
|
||||
that the general designs of disjoint samples of a genome are
|
||||
substantially more similar to each other than to those of
|
||||
sequences from other organisms and that closely related organisms
|
||||
have similar general designs. From this perspective, the set of
|
||||
dinucleotide odds ratio (relative abundance) values constitute a
|
||||
signature of each DNA genome, which can discriminate between
|
||||
sequences from different organisms. Dinucleotide-odds ratio
|
||||
values appear to reflect not only the chemistry of dinucleotide
|
||||
stacking energies and base-step conformational preferences, but
|
||||
also the species-specific properties of DNA modification,
|
||||
replication and repair mechanisms.",
|
||||
month = jul,
|
||||
year = 1995,
|
||||
url = "http://dx.doi.org/10.1016/s0168-9525(00)89076-9",
|
||||
doi = "10.1016/s0168-9525(00)89076-9",
|
||||
pmid = 7482779,
|
||||
issn = "0168-9525,1362-4555",
|
||||
language = "en"
|
||||
}
|
||||
|
||||
@ARTICLE{Karlin1994-on,
|
||||
title = "{Heterogeneity of genomes: measures and values}",
|
||||
author = "Karlin, S and Ladunga, I and Blaisdell, B E",
|
||||
journal = "Proceedings of the National Academy of Sciences of the United
|
||||
States of America",
|
||||
publisher = "Proceedings of the National Academy of Sciences",
|
||||
volume = 91,
|
||||
number = 26,
|
||||
pages = "12837--12841",
|
||||
abstract = "Genomic homogeneity is investigated for a broad base of DNA
|
||||
sequences in terms of dinucleotide relative abundance distances
|
||||
(abbreviated delta-distances) and of oligonucleotide
|
||||
compositional extremes. It is shown that delta-distances between
|
||||
different genomic sequences in the same species are low, only
|
||||
about 2 or 3 times the distance found in random DNA, and are
|
||||
generally smaller than the between-species delta-distances.
|
||||
Extremes in short oligonucleotides include underrepresentation of
|
||||
TpA and overrepresentation of GpC in most temperate bacteriophage
|
||||
sequences; underrepresentation of CTAG in most eubacterial
|
||||
genomes; underrepresentation of GATC in most bacteriophage; CpG
|
||||
suppression in vertebrates, in all animal mitochondrial genomes,
|
||||
and in many thermophilic bacterial sequences; and
|
||||
overrepresentation of GpG/CpC in all animal mitochondrial sets
|
||||
and chloroplast genomes. Interpretations center on DNA structures
|
||||
(dinucleotide stacking energies, DNA curvature and superhelicity,
|
||||
nucleosome organization), context-dependent mutational events,
|
||||
methylation effects, and processes of replication and repair.",
|
||||
month = dec,
|
||||
year = 1994,
|
||||
url = "http://dx.doi.org/10.1073/pnas.91.26.12837",
|
||||
doi = "10.1073/pnas.91.26.12837",
|
||||
pmc = "PMC45535",
|
||||
pmid = 7809131,
|
||||
issn = "0027-8424,1091-6490",
|
||||
language = "en"
|
||||
}
|
||||
@ARTICLE{Bennett2013-cl,
|
||||
title = "{Small, smaller, smallest: the origins and evolution of ancient
|
||||
dual symbioses in a Phloem-feeding insect}",
|
||||
author = "Bennett, Gordon M and Moran, Nancy A",
|
||||
journal = "Genome Biology and Evolution",
|
||||
publisher = "Oxford University Press (OUP)",
|
||||
volume = 5,
|
||||
number = 9,
|
||||
pages = "1675--1688",
|
||||
abstract = "Many insects rely on bacterial symbionts with tiny genomes
|
||||
specialized for provisioning nutrients lacking in host diets.
|
||||
Xylem sap and phloem sap are both deficient as insect diets, but
|
||||
differ dramatically in nutrient content, potentially affecting
|
||||
symbiont genome evolution. For sap-feeding insects, sequenced
|
||||
symbiont genomes are available only for phloem-feeding examples
|
||||
from the suborder Sternorrhyncha and xylem-feeding examples from
|
||||
the suborder Auchenorrhyncha, confounding comparisons. We
|
||||
sequenced genomes of the obligate symbionts, Sulcia muelleri and
|
||||
Nasuia deltocephalinicola, of the phloem-feeding pest insect,
|
||||
Macrosteles quadrilineatus (Auchenorrhyncha: Cicadellidae). Our
|
||||
results reveal that Nasuia-ALF has the smallest bacterial genome
|
||||
yet sequenced (112 kb), and that the Sulcia-ALF genome (190 kb)
|
||||
is smaller than that of Sulcia in other insect lineages.
|
||||
Together, these symbionts retain the capability to synthesize the
|
||||
10 essential amino acids, as observed for several symbiont pairs
|
||||
from xylem-feeding Auchenorrhyncha. Nasuia retains genes enabling
|
||||
synthesis of two amino acids, DNA replication, transcription, and
|
||||
translation. Both symbionts have lost genes underlying ATP
|
||||
synthesis through oxidative phosphorylation, possibly as a
|
||||
consequence of the enriched sugar content of phloem. Shared
|
||||
genomic features, including reassignment of the UGA codon from
|
||||
Stop to tryptophan, and phylogenetic results suggest that
|
||||
Nasuia-ALF is most closely related to Zinderia, the
|
||||
betaproteobacterial symbiont of spittlebugs. Thus,
|
||||
Nasuia/Zinderia and Sulcia likely represent ancient associates
|
||||
that have co-resided in hosts since the divergence of leafhoppers
|
||||
and spittlebugs >200 Ma, and possibly since the origin of the
|
||||
Auchenorrhyncha, >260 Ma.",
|
||||
month = aug,
|
||||
year = 2013,
|
||||
url = "http://dx.doi.org/10.1093/gbe/evt118",
|
||||
keywords = "Nasuia deltocephalinicola; Sulcia muelleri; gene loss; genome
|
||||
evolution; leafhopper; nutritional symbioses",
|
||||
doi = "10.1093/gbe/evt118",
|
||||
pmc = "PMC3787670",
|
||||
pmid = 23918810,
|
||||
issn = "1759-6653",
|
||||
language = "en"
|
||||
}
|
||||
Binary file not shown.
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>DNA encoding - obikmer — User Guide</title>
|
||||
<title>DNA encoding - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Low-complexity kmer filter - obikmer — User Guide</title>
|
||||
<title>Low-complexity kmer filter - 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>
|
||||
@@ -1601,7 +1601,7 @@
|
||||
|
||||
|
||||
<h1 id="low-complexity-kmer-filter">Low-complexity kmer filter</h1>
|
||||
<p>Low-complexity kmers (homopolymer runs, tandem repeats) can dominate an index without carrying useful information. <code>obikmer</code> detects and excludes them during index construction using a normalized Shannon entropy score.</p>
|
||||
<p>Low-complexity kmers (homopolymer runs, tandem repeats) can dominate an index without carrying useful information. <code>obiskim</code> detects and excludes them during index construction using a normalized Shannon entropy score.</p>
|
||||
<h2 id="sub-word-frequencies">Sub-word frequencies</h2>
|
||||
<p>For a kmer of length <span class="arithmatex">\(k\)</span> and a sub-word size <span class="arithmatex">\(ws\)</span> (<span class="arithmatex">\(1 \le ws \le ws_{\max}\)</span>, default <span class="arithmatex">\(ws_{\max} = 6\)</span>), the kmer is decomposed into its <span class="arithmatex">\(k - ws + 1\)</span> overlapping sub-words of length <span class="arithmatex">\(ws\)</span> by sliding a window across it. Each sub-word is tallied under its raw 2-bit-packed value, with no canonicalization.</p>
|
||||
<h2 id="corrected-shannon-entropy">Corrected Shannon entropy</h2>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Partitioning and indexing architecture - obikmer — User Guide</title>
|
||||
<title>Partitioning and indexing architecture - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Kmers - obikmer — User Guide</title>
|
||||
<title>Kmers - 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>
|
||||
@@ -404,62 +404,6 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Representation limit">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#k-mer-specificity" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
K-mer specificity
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#estimating-false-discovery-rate-on-homology-inference" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Estimating False discovery rate on homology inference
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Estimating False discovery rate on homology inference">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#the-random-model" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
The random model
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#exact-tail-probability" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Exact tail probability
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -474,10 +418,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#karlin-ost-1988-formula" class="md-nav__link">
|
||||
<a href="#k-mer-specificity" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Karlin--Ost (1988) formula
|
||||
K-mer specificity
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -485,22 +429,33 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#chance-sharing-across-genomes-and-the-fdr-of-homology" class="md-nav__link">
|
||||
<a href="#choosing-an-appropriate-k-mer-size" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Chance sharing across genomes and the FDR of homology
|
||||
Choosing an appropriate k-mer size
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Chance sharing across genomes and the FDR of homology">
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#chance-sharing-across-genomes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Chance sharing across genomes
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Chance sharing across genomes">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#the-null-model" class="md-nav__link">
|
||||
<a href="#the-null-model-and-genome-specific-probabilities" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
The null model
|
||||
The null model and genome-specific probabilities
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -508,10 +463,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#exact-tail-probability_1" class="md-nav__link">
|
||||
<a href="#computing-the-poisson-binomial-distribution" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Exact tail probability
|
||||
Computing the Poisson-binomial distribution
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -519,10 +474,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#approximation-with-equal-genome-sizes" class="md-nav__link">
|
||||
<a href="#comparing-observed-and-expected-sharing-in-the-index" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Approximation with equal genome sizes
|
||||
Comparing observed and expected sharing in the index
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -530,10 +485,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#false-discovery-rate" class="md-nav__link">
|
||||
<a href="#estimating-the-false-discovery-rate" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
False discovery rate
|
||||
Estimating the false discovery rate
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -554,28 +509,6 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#1-fdr-dun-ensemble-de-k-mers-selectionnes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
1. FDR d'un ensemble de k-mers sélectionnés
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#2-markov-dordre-0-avec-frequences-inegales" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
2. Markov d'ordre 0 avec fréquences inégales
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1665,62 +1598,6 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Representation limit">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#k-mer-specificity" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
K-mer specificity
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#estimating-false-discovery-rate-on-homology-inference" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Estimating False discovery rate on homology inference
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Estimating False discovery rate on homology inference">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#the-random-model" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
The random model
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#exact-tail-probability" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Exact tail probability
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -1735,10 +1612,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#karlin-ost-1988-formula" class="md-nav__link">
|
||||
<a href="#k-mer-specificity" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Karlin--Ost (1988) formula
|
||||
K-mer specificity
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -1746,22 +1623,33 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#chance-sharing-across-genomes-and-the-fdr-of-homology" class="md-nav__link">
|
||||
<a href="#choosing-an-appropriate-k-mer-size" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Chance sharing across genomes and the FDR of homology
|
||||
Choosing an appropriate k-mer size
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Chance sharing across genomes and the FDR of homology">
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#chance-sharing-across-genomes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Chance sharing across genomes
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Chance sharing across genomes">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#the-null-model" class="md-nav__link">
|
||||
<a href="#the-null-model-and-genome-specific-probabilities" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
The null model
|
||||
The null model and genome-specific probabilities
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -1769,10 +1657,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#exact-tail-probability_1" class="md-nav__link">
|
||||
<a href="#computing-the-poisson-binomial-distribution" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Exact tail probability
|
||||
Computing the Poisson-binomial distribution
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -1780,10 +1668,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#approximation-with-equal-genome-sizes" class="md-nav__link">
|
||||
<a href="#comparing-observed-and-expected-sharing-in-the-index" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
Approximation with equal genome sizes
|
||||
Comparing observed and expected sharing in the index
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -1791,10 +1679,10 @@
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#false-discovery-rate" class="md-nav__link">
|
||||
<a href="#estimating-the-false-discovery-rate" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
False discovery rate
|
||||
Estimating the false discovery rate
|
||||
|
||||
</span>
|
||||
</a>
|
||||
@@ -1815,28 +1703,6 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#1-fdr-dun-ensemble-de-k-mers-selectionnes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
1. FDR d'un ensemble de k-mers sélectionnés
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#2-markov-dordre-0-avec-frequences-inegales" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
|
||||
2. Markov d'ordre 0 avec fréquences inégales
|
||||
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1857,104 +1723,66 @@
|
||||
|
||||
|
||||
<h1 id="k-mer-size">K-mer size</h1>
|
||||
<p>A k-mer is a DNA sequence of length <span class="arithmatex">\(k\)</span>. OBIKmer is designed to index large k-mers. Here, <em>large</em> refers to a k-mer length for which the probability of observing the same k-mer in several genomes by chance alone is sufficiently small. The k-mer length must therefore be large enough that, when a k-mer is observed in several genomes of the dataset, the probability that this shared occurrence is due to chance alone is sufficiently low for the match to be considered evidence of homology.</p>
|
||||
<p>A k-mer is a DNA sequence of length <span class="arithmatex">\(k\)</span>. OBIKmer is designed to index
|
||||
large k-mers. Here, <em>large</em> refers to a k-mer length for which the
|
||||
probability of observing the same k-mer in several genomes by chance
|
||||
alone is sufficiently small. The k-mer length must therefore be large
|
||||
enough that, when a k-mer is observed in several genomes of the dataset,
|
||||
the probability that this shared occurrence is due to chance alone is
|
||||
sufficiently low for the match to be considered evidence of homology.</p>
|
||||
<p>OBIKmer restricts <span class="arithmatex">\(k\)</span> to odd values in the range</p>
|
||||
<div class="arithmatex">\[
|
||||
11 \leq k \leq 31.
|
||||
\]</div>
|
||||
<p>These limits result from two different considerations. The upper bound is imposed by the representation used by OBIKmer, whereas the lower bound defines a practical range of k-mer lengths for genome-scale sequence comparisons. This range covers most practical applications: the lower limit is well below the k-mer size that can be considered large, even for the smallest bacterial genomes, whereas the upper limit provides sufficient specificity for most applications, including those involving very large genomes.</p>
|
||||
<p>These limits result from two different considerations. The upper bound
|
||||
is imposed by the representation used by OBIKmer, whereas the lower
|
||||
bound defines a practical range of k-mer lengths for genome-scale
|
||||
sequence comparisons. This range covers most practical applications: the
|
||||
lower limit is well below the k-mer size that can be considered large,
|
||||
even for the smallest bacterial genomes, whereas the upper limit
|
||||
provides sufficient specificity for most applications, including those
|
||||
involving very large genomes.</p>
|
||||
<h2 id="representation-limit">Representation limit</h2>
|
||||
<p>OBIKmer uses two bits to encode each nucleotide. Therefore, a k-mer requires <span class="arithmatex">\(2k\)</span> bits. To ensure computational efficiency, OBIKmer limits the representation of k-mers to a single 64-bit word, thereby restricting their length.</p>
|
||||
<p>OBIKmer uses two bits to encode each nucleotide. Therefore, a k-mer
|
||||
requires <span class="arithmatex">\(2k\)</span> bits. To ensure computational efficiency, OBIKmer limits
|
||||
the representation of k-mers to a single 64-bit word, thereby
|
||||
restricting their length.</p>
|
||||
<div class="arithmatex">\[
|
||||
2k \leq 64,
|
||||
\]</div>
|
||||
<p>This gives the hard representation limit: <span class="arithmatex">\(k \leq 32.\)</span> Furthermore, OBIKmer only considers odd values of <span class="arithmatex">\(k\)</span>, meaning the largest supported k-mer size is <span class="arithmatex">\(31\)</span>.</p>
|
||||
<h3 id="k-mer-specificity">K-mer specificity</h3>
|
||||
<p>One simple way to illustrate the effect of k-mer size is to consider a random DNA sequence in which the four nucleotides are independent and equally probable. There are <span class="arithmatex">\(4^k\)</span> possible k-mers, so a particular k-mer is expected to occur once every <span class="arithmatex">\(4^k\)</span> positions on average. In a sequence of length <span class="arithmatex">\(G\)</span>, the expected number of occurrences of a particular k-mer is approximately <span class="arithmatex">\(G \cdot 4^{-k}\)</span>. When k is large enough to ensure <span class="arithmatex">\(4^k >> G\)</span>, the chance of a second occurrence of the same k-mer becomes close to zero. Consequently, observing the same k-mer twice can only be explained by a homology relationship, except for low-complexity k-mers, which are overrepresented in genomes. </p>
|
||||
<h3 id="estimating-false-discovery-rate-on-homology-inference">Estimating False discovery rate on homology inference</h3>
|
||||
<p>OBIKmer uses k-mers long enough that their occurrence in multiple indexed genomes provides evidence of homology. The corresponding false discovery rate (FDR) can be expressed in terms of the probability of observing a k-mer in at least <span class="arithmatex">\(R\)</span> of the <span class="arithmatex">\(S\)</span> indexed genomes under a purely random model.</p>
|
||||
<h4 id="the-random-model">The random model</h4>
|
||||
<p>The random model, or null hypothesis, assumes that the <span class="arithmatex">\(S\)</span> genomes are unrelated and that each genome is an independent random sequence in which each nucleotide occurs with equal probability. Rejecting this hypothesis for a given k-mer indicates that its presence in multiple genomes is unlikely to be explained by chance alone, providing evidence for homology.</p>
|
||||
<p>For a genome of size <span class="arithmatex">\(G\)</span>, the number of occurrences of a given canonical k-mer <span class="arithmatex">\(K\)</span> is approximated by a Poisson distribution with parameter</p>
|
||||
<div class="arithmatex">\[ \lambda = 2\frac{G}{4^k}, \]</div>
|
||||
<p>which is also the expected number of occurrences under the random model. The factor of two accounts for k-mer canonicalisation, which halves the k-mer space when <span class="arithmatex">\(k\)</span> is odd.</p>
|
||||
<p>The probability of observing at least one occurrence of this k-mer is therefore</p>
|
||||
<p>This gives the hard representation limit: <span class="arithmatex">\(k \leq 32.\)</span> Furthermore,
|
||||
OBIKmer only considers odd values of <span class="arithmatex">\(k\)</span>, meaning the largest supported
|
||||
k-mer size is <span class="arithmatex">\(31\)</span>.</p>
|
||||
<h2 id="odd-k-mer-lengths">Odd k-mer lengths</h2>
|
||||
<p>OBIKmer additionally requires <span class="arithmatex">\(k\)</span> to be odd. This constraint is
|
||||
independent of the specificity considerations discussed below.</p>
|
||||
<p>For an odd-length DNA sequence, a k-mer cannot be identical to its own
|
||||
reverse complement. Every k-mer therefore belongs to a pair of distinct
|
||||
orientations, which can be represented by a single canonical k-mer. For
|
||||
even <span class="arithmatex">\(k\)</span>, self-reverse-complementary sequences exist.</p>
|
||||
<p>Odd <span class="arithmatex">\(k\)</span> is not required for canonicalization itself: the canonical form</p>
|
||||
<div class="arithmatex">\[
|
||||
\begin{aligned}
|
||||
P(n_K > 0) &= 1-e^{-\lambda} \\
|
||||
&= 1-e^{-2G/4^k}.
|
||||
\end{aligned}
|
||||
s^c=\min_{\mathrm{lex}}\left(s,\operatorname{RC}(s)\right)
|
||||
\]</div>
|
||||
<p>Assuming equal genome lengths, the number of genomes containing at least one occurrence of <span class="arithmatex">\(K\)</span> among the <span class="arithmatex">\(S\)</span> sequences follows a binomial distribution. The probability of observing <span class="arithmatex">\(K\)</span> in at least <span class="arithmatex">\(r\)</span> genomes is therefore</p>
|
||||
<div class="arithmatex">\[
|
||||
P(X \geq r)=\sum_{j=r}^{S}\binom{S}{j}\left(1-e^{-2G/4^k}\right)^j\left(e^{-2G/4^k}\right)^{S-j}.
|
||||
\]</div>
|
||||
<p>This sum is the regularized incomplete beta function <span class="arithmatex">\(I_p(r,\,S-r+1)\)</span>, where</p>
|
||||
<div class="arithmatex">\[
|
||||
p = 1-e^{-2G/4^k}.
|
||||
\]</div>
|
||||
<p>Different genome sizes</p>
|
||||
<p>When genome sizes differ, the probability of observing a given k-mer also differs between genomes. A simple approximation is to replace the individual genome sizes <span class="arithmatex">\(G_i\)</span> by their mean</p>
|
||||
<div class="arithmatex">\[ \bar G = \frac{1}{S}\sum_{i=1}^{S}G_i. \]</div>
|
||||
<p>This gives a common probability</p>
|
||||
<div class="arithmatex">\[ \bar p = 1-e^{-2\bar G/4^k}, \]</div>
|
||||
<p>and the number of genomes containing the k-mer can then be approximated by a binomial distribution:</p>
|
||||
<div class="arithmatex">\[ P(X\geq r)=\sum_{j=r}^{S}\binom{S}{j}\bar p^j(1-\bar p)^{S-j}. \]</div>
|
||||
<p>This approximation is conservative for the upper tail. Hoeffding (1956 p. 717, Eq. 26)<sup id="fnref:Hoeffding1956-bx"><a class="footnote-ref" href="#fn:Hoeffding1956-bx">1</a></sup> shows that, for a fixed mean, the binomial upper tail is at least as large as the corresponding Poisson-binomial tail for</p>
|
||||
<div class="arithmatex">\[ r\geq S\bar p+1. \]</div>
|
||||
<p>Using the mean genome size therefore provides a conservative estimate of the FDR.</p>
|
||||
<p>When genome sizes differ substantially, however, this approximation can become overly conservative. In that case, the exact Poisson-binomial distribution can be computed directly from the individual genome-specific probabilities <span class="arithmatex">\(p_i\)</span>.</p>
|
||||
<h3 id="exact-tail-probability">Exact tail probability</h3>
|
||||
<p>With genome-specific probabilities <span class="arithmatex">\(p_i\)</span>, the number of genomes containing the k-mer follows a Poisson-binomial distribution. Writing the probability of exactly <span class="arithmatex">\(j\)</span> presences as a sum over all subsets of <span class="arithmatex">\(j\)</span> genomes would be impractical, since there can be up to <span class="arithmatex">\(2^S\)</span> subsets. The distribution can instead be obtained by adding the genomes one at a time.</p>
|
||||
<p>Let <span class="arithmatex">\(d_j\)</span> be the probability that exactly <span class="arithmatex">\(j\)</span> of the genomes processed so far contain the k-mer. Adding genome <span class="arithmatex">\(i\)</span> leaves <span class="arithmatex">\(j\)</span> unchanged if the genome does not contain the k-mer, and moves <span class="arithmatex">\(j-1\)</span> to <span class="arithmatex">\(j\)</span> if it does:</p>
|
||||
<div class="arithmatex">\[
|
||||
\left \{
|
||||
\begin{aligned}
|
||||
d'_j &= d_j(1-p_i) + d_{j-1}p_i, \\
|
||||
d_0&=1
|
||||
\end{aligned}
|
||||
\right .
|
||||
\]</div>
|
||||
<p>before processing the first genome.</p>
|
||||
<p>The table <span class="arithmatex">\(d\)</span> only needs to record how many genomes contain the k-mer, not which ones, reducing the computational cost to <span class="arithmatex">\(O(S^2)\)</span>. The result is independent of the order in which the genomes are processed and of the k-mer itself, so it can be computed once per index. The upper tail is then</p>
|
||||
<div class="arithmatex">\[
|
||||
P(X\geq r)=1-\sum_{j=0}^{r-1}d_j.
|
||||
\]</div>
|
||||
<p>Only <span class="arithmatex">\(d_0,\ldots,d_{r-1}\)</span> are needed, reducing the cost to <span class="arithmatex">\(O(Sr)\)</span>.</p>
|
||||
<p>When all <span class="arithmatex">\(p_i\)</span> are small, as is typically the case for large <span class="arithmatex">\(k\)</span>, the Poisson-binomial distribution can also be approximated by a Poisson distribution with mean</p>
|
||||
<div class="arithmatex">\[
|
||||
\lambda=\sum_{i=1}^{S}p_i.
|
||||
\]</div>
|
||||
<p>The approximation error is bounded in terms of <span class="arithmatex">\(\sum_i p_i^2\)</span> by Le Cam's inequality (<strong>LeCam1960-pe?</strong>).</p>
|
||||
<hr />
|
||||
<p>This probability decreases by a factor of four for every additional nucleotide in the k-mer. Conversely, it increases linearly with the amount of sequence searched.</p>
|
||||
<p>This simple model already shows why very short k-mers provide limited specificity for genome-scale analyses. With <span class="arithmatex">\(k=11\)</span>,</p>
|
||||
<div class="arithmatex">\[
|
||||
4^{11}\simeq4.2\times10^6,
|
||||
\]</div>
|
||||
<p>which is a small combinatorial space even compared with the size of very small bacterial genomes. In contrast,</p>
|
||||
<div class="arithmatex">\[
|
||||
4^{31}\simeq4.6\times10^{18},
|
||||
\]</div>
|
||||
<p>which is vastly larger than the number of k-mer positions even in very large genomes. Thus, increasing <span class="arithmatex">\(k\)</span> from 11 to 31 provides an enormous increase in sequence specificity.</p>
|
||||
<p>The estimate above is intentionally simplistic. Real genomes do not consist of independent, equiprobable nucleotides: nucleotide composition and sequence dependencies affect the probability of observing particular words. More accurate estimates of the probability of observing matches by chance therefore take sequence length and nucleotide composition into account.</p>
|
||||
<p>Karlin and Ost provide an analytical framework for this problem based on the distribution of the longest exact match expected between random sequences. If <span class="arithmatex">\(L_{\max}\)</span> denotes the length of the longest seed observed in random sequences of given size and nucleotide composition, the corresponding seed-level probability is</p>
|
||||
<div class="arithmatex">\[
|
||||
P_{\mathrm{seeds}}(L)=P(L_{\max}\geq L).
|
||||
\]</div>
|
||||
<p>Conversely, for a chosen false-positive probability <span class="arithmatex">\(P\)</span>, one can determine the minimum seed length <span class="arithmatex">\(L_{\min}\)</span> such that matches of length <span class="arithmatex">\(L_{\min}\)</span> or greater are not expected to occur by chance. This is the approach used by Repseek to determine statistically significant seed lengths.</p>
|
||||
<p>The simple <span class="arithmatex">\(G/4^k\)</span> estimate and the Karlin–Ost statistics therefore describe the same fundamental effect at different levels of approximation: the probability of a chance match decreases rapidly with k-mer length, while the amount of sequence being searched increases the opportunity for such matches.</p>
|
||||
<p>Consequently, the appropriate value of <span class="arithmatex">\(k\)</span> depends on the total amount of sequence being compared and its nucleotide composition. Choosing <span class="arithmatex">\(k\)</span> appropriately allows the false-positive rate of homology inference to be controlled.</p>
|
||||
<p>Considering that bacterial genomes are typically a few megabases long, with the smallesr plublished today <em>Mycoplasma genitalium</em> having a size <span class="arithmatex">\(G=580\,Mb\)</span> (Fraser <em>et al.</em> 1995)<sup id="fnref:Fraser1995-jc"><a class="footnote-ref" href="#fn:Fraser1995-jc">2</a></sup>, and the largest <span class="arithmatex">\(13\,Mb\)</span> in <em>Sorangium cellulosum</em> (Schneiker <em>et al.</em> 2007)<sup id="fnref:Schneiker2007-gs"><a class="footnote-ref" href="#fn:Schneiker2007-gs">3</a></sup>. For such genomes, the space of 11-mers is already to small to get a reasonable false positive rate:</p>
|
||||
<div class="arithmatex">\[
|
||||
\begin{aligned}
|
||||
P(C\geq1) &= 1- e^{-\frac{580.000^2}{2 \cdot 4^{11}}} \\
|
||||
&\simeq 1
|
||||
\end{aligned}
|
||||
\]</div>
|
||||
<p>, whereas 21-mers already provide a space of several trillion possible sequences.</p>
|
||||
<p>Plant genomes illustrate the opposite situation. Plant genome sizes span several orders of magnitude, from the smallest angiosperm genomes present in the carnivorous plans genus (Fleischmann <em>et al.</em> 2014)<sup id="fnref:Fleischmann2014-ed"><a class="footnote-ref" href="#fn:Fleischmann2014-ed">4</a></sup> about 60 Mb to the largest one 160 Gb in Tmesipteris oblanceolata, a New Caledonian fork fern (Fernández <em>et al.</em> 2024)<sup id="fnref:Fernandez2024-kd"><a class="footnote-ref" href="#fn:Fernandez2024-kd">5</a></sup>, and large genomes often contain substantial amounts of repeated sequence. Even at <span class="arithmatex">\(k=31\)</span>, however, the theoretical k-mer space remains vastly larger than any individual genome. At these lengths, the limiting factor is therefore not exhaustion of the theoretical k-mer space but the biological repetitiveness and non-random composition of the genome.</p>
|
||||
<p>For example, the number of possible k-mers grows as follows:</p>
|
||||
<p>is well defined for both odd and even lengths. Restricting <span class="arithmatex">\(k\)</span> to odd
|
||||
values guarantees that the two orientations are always distinct,
|
||||
simplifying the representation and orientation handling used by OBIKmer.</p>
|
||||
<h2 id="k-mer-specificity">K-mer specificity</h2>
|
||||
<p>A simple way to illustrate the effect of k-mer size is to consider a
|
||||
random DNA sequence in which the four nucleotides are independent and
|
||||
equally probable. There are <span class="arithmatex">\(4^k\)</span> possible oriented k-mers, so the
|
||||
expected number of occurrences of a particular oriented k-mer in a
|
||||
sequence of length <span class="arithmatex">\(G\)</span> is approximately <span class="arithmatex">\(G/4^k\)</span>. For canonical k-mers,
|
||||
the corresponding number of possible sequences is halved, and the
|
||||
expected number of occurrences is approximately <span class="arithmatex">\(2G/4^k\)</span>.</p>
|
||||
<p>Increasing <span class="arithmatex">\(k\)</span> therefore reduces the probability that a particular k-mer
|
||||
occurs by chance. However, the probability of a match somewhere in a
|
||||
collection of sequences also depends on the amount of sequence searched
|
||||
and on the number of possible k-mers considered. The following sections
|
||||
formalize this distinction and describe how chance sharing can be
|
||||
assessed across an indexed set of genomes.</p>
|
||||
<h2 id="choosing-an-appropriate-k-mer-size">Choosing an appropriate k-mer size</h2>
|
||||
<p>The theoretical k-mer space grows exponentially with <span class="arithmatex">\(k\)</span>. Thus, increasing <span class="arithmatex">\(k\)</span> from 11 to 31 greatly expands the sequence space and reduces the probability that unrelated sequences share a particular k-mer by chance. The following table gives the size of the theoretical k-mer space and, after canonicalization, the number of distinct representations.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -1991,201 +1819,207 @@ P(C\geq1) &= 1- e^{-\frac{580.000^2}{2 \cdot 4^{11}}} \\
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Canonicalization approximately halves the number of possible representations because a k-mer and its reverse complement are represented by the same canonical form.</p>
|
||||
<p>The distinction between the simple <span class="arithmatex">\(4^k\)</span> model and the Karlin--Ost framework is important. The former describes the size of the combinatorial k-mer space; the latter describes the probability of observing long matches in sequences whose composition may depart from the uniform random model. Consequently, the value of <span class="arithmatex">\(k\)</span> cannot be selected from genome size alone.</p>
|
||||
<p>These scales have very different implications for different genome sizes. </p>
|
||||
<p>The random-sequence calculation is only a null model. Real genomes exhibit strong and reproducible oligonucleotide composition biases. Karlin and colleagues showed that relative abundances of short oligonucleotides, in particular dinucleotides, form characteristic genomic signatures that remain relatively stable within genomes and differ between organisms (<strong>Karlin1995?</strong>; <strong>Karlin1997?</strong>). More generally, short k-mer frequencies can therefore capture compositional properties of genomes rather than provide highly specific sequence identifiers.</p>
|
||||
<p>This distinction is important for whole-genome k-mer comparison. Increasing <span class="arithmatex">\(k\)</span> increases the theoretical diversity of the k-mer space exponentially and generally increases the proportion of k-mers that occur at unique genomic positions. Conversely, shorter k-mers occur more frequently and are more strongly influenced by genomic composition and repeated sequence. Empirical studies of k-mer spectra show this transition clearly: for example, k-mers of length <span class="arithmatex">\(k\leq11\)</span> can behave primarily as genomic-composition signatures, whereas longer k-mers progressively provide greater sequence specificity.</p>
|
||||
<p>The supported range <span class="arithmatex">\(11\leq k\leq31\)</span> should therefore be understood as an engineering compromise rather than as a universal biological optimum. Smaller values increase the probability that unrelated genomic regions share the same k-mers, while larger values increase specificity but also make the representation more sensitive to substitutions, indels, and incomplete homology. The appropriate value within this range consequently depends on the biological scale and comparison task.</p>
|
||||
<h2 id="odd-k-mer-lengths">Odd k-mer lengths</h2>
|
||||
<p>OBIKmer additionally requires <span class="arithmatex">\(k\)</span> to be odd. This constraint is independent of the resolution argument above.</p>
|
||||
<p>For an odd-length DNA sequence, a k-mer cannot be identical to its own reverse complement. Consequently, every k-mer has two distinct orientations, which can be unambiguously collapsed into a canonical representation. For even <span class="arithmatex">\(k\)</span>, self-reverse-complementary sequences exist, so a k-mer can coincide with its own reverse complement.</p>
|
||||
<p>Odd <span class="arithmatex">\(k\)</span> is therefore <strong>not required for canonicalization itself</strong>: the canonical form</p>
|
||||
<p>Genome sizes illustrate the range of sequence scales for which k-mers may be used. Bacterial genomes are typically a few megabases long, although some symbiotic bacteria have much smaller genomes, while other bacteria have genomes exceeding ten megabases. Plant genomes span an even wider range, from tens of megabases to more than one hundred gigabases. In very large and repeat-rich genomes, the main limitation is not necessarily the exhaustion of the theoretical k-mer space, but the non-uniform distribution of k-mers caused by sequence composition and repeated DNA.</p>
|
||||
<p>The supported range <span class="arithmatex">\(11\leq k\leq31\)</span> should therefore be understood as an engineering and application-oriented compromise, not as a universal biological optimum. Shorter k-mers are more likely to be shared by unrelated regions, whereas longer k-mers provide greater sequence specificity. However, longer k-mers are also more sensitive to substitutions and indels: a single difference can disrupt an exact match across the whole k-mer. The appropriate value within the supported range consequently depends on the size and characteristics of the genomes being compared, as well as on the biological question.</p>
|
||||
<p>The following section introduces a random-sequence model to quantify the probability of chance sharing across an indexed set of genomes. This provides a formal basis for assessing how the choice of <span class="arithmatex">\(k\)</span> affects the interpretation of shared k-mers.</p>
|
||||
<h2 id="chance-sharing-across-genomes">Chance sharing across genomes</h2>
|
||||
<p>OBIKmer indexes distinct canonical k-mers and records the genomes in
|
||||
which each k-mer occurs. This makes it possible to compare the observed
|
||||
sharing of k-mers with the sharing expected under a random-sequence
|
||||
model. The same probability model can be used for two related purposes:
|
||||
measuring the excess of sharing among k-mers present in the index, and
|
||||
estimating the number of chance k-mers among those shared by at least a
|
||||
specified number of genomes.</p>
|
||||
<h3 id="the-null-model-and-genome-specific-probabilities">The null model and genome-specific probabilities</h3>
|
||||
<p>The null hypothesis assumes that the <span class="arithmatex">\(S\)</span> indexed genomes are unrelated
|
||||
and that each genome is an independent random sequence in which
|
||||
nucleotides are independent and equiprobable.</p>
|
||||
<p>Since OBIKmer uses odd-length canonical k-mers, reverse-complement
|
||||
canonicalization reduces the number of possible k-mers by half. The size
|
||||
of the canonical k-mer space is therefore</p>
|
||||
<div class="arithmatex">\[
|
||||
s^c=\min_{\mathrm{lex}}\left(s,\operatorname{RC}(s)\right)
|
||||
M_k=\frac{4^k}{2}.
|
||||
\]</div>
|
||||
<p>remains well defined for even <span class="arithmatex">\(k\)</span>. The odd-<span class="arithmatex">\(k\)</span> restriction instead guarantees that the two orientations are always distinct, which simplifies the representation and orientation handling used by OBIKmer.</p>
|
||||
<h2 id="karlin-ost-1988-formula">Karlin--Ost (1988) formula</h2>
|
||||
<p>(Karlin & Ost 1988)<sup id="fnref:Karlin1988"><a class="footnote-ref" href="#fn:Karlin1988">6</a></sup> considers <span class="arithmatex">\(s\)</span> independent stationary letter sequences over a finite alphabet and studies <span class="arithmatex">\(K_{r,s}(N)\)</span>, the length of the longest word common to <span class="arithmatex">\(r\)</span> of the <span class="arithmatex">\(s\)</span> sequences, each of length <span class="arithmatex">\(N\)</span>. For i.i.d. equiprobable letters over an alphabet of size <span class="arithmatex">\(m\)</span> (here <span class="arithmatex">\(m=4\)</span> for DNA), the characteristic local match parameter reduces to</p>
|
||||
<p>Let <span class="arithmatex">\(N_i\)</span> be the number of distinct canonical k-mers recorded for genome
|
||||
<span class="arithmatex">\(i\)</span> in the index. Under the null model, these can be regarded as a
|
||||
uniform sample without replacement from the <span class="arithmatex">\(M_k\)</span> possible canonical
|
||||
k-mers. The probability that a given canonical k-mer is present in
|
||||
genome <span class="arithmatex">\(i\)</span> is then</p>
|
||||
<div class="arithmatex">\[
|
||||
\lambda^{[r]} = m^{1-r},
|
||||
p_i=\frac{N_i}{M_k}=\frac{2N_i}{4^k}.
|
||||
\]</div>
|
||||
<p>so for <span class="arithmatex">\(r=2\)</span> (a word shared by two occurrences), <span class="arithmatex">\(\lambda = m^{-1} = 1/4\)</span>.</p>
|
||||
<p>The expected number of common words of length <span class="arithmatex">\(k\)</span> among the <span class="arithmatex">\(\binom{s}{r}\)</span> relevant groups of sequences is</p>
|
||||
<p>This is the inclusion probability for a distinct k-mer. It differs from
|
||||
the probability of at least one occurrence in a positional model,
|
||||
because repeated occurrences within a genome are not counted separately.</p>
|
||||
<p>Let <span class="arithmatex">\(X\)</span> denote the number of genomes, among the <span class="arithmatex">\(S\)</span> indexed genomes,
|
||||
that contain a given canonical k-mer under the null model. Since genomes
|
||||
are assumed to be independent, <span class="arithmatex">\(X\)</span> is a sum of independent presence
|
||||
indicators with probabilities <span class="arithmatex">\(p_1,\ldots,p_S\)</span>. When these probabilities
|
||||
differ, <span class="arithmatex">\(X\)</span> follows a Poisson-binomial distribution.</p>
|
||||
<h3 id="computing-the-poisson-binomial-distribution">Computing the Poisson-binomial distribution</h3>
|
||||
<p>The distribution of <span class="arithmatex">\(X\)</span> can be computed by processing genomes one at a
|
||||
time. Let <span class="arithmatex">\(P_i(j)\)</span> denote the probability that the k-mer occurs in
|
||||
exactly <span class="arithmatex">\(j\)</span> of the first <span class="arithmatex">\(i\)</span> genomes. Initially,</p>
|
||||
<div class="arithmatex">\[
|
||||
S_1(N,k) = N^{r}\binom{s}{r}\gamma\,\lambda^{k}\,(1+o(1)),
|
||||
P_0(0)=1,\qquad P_0(j)=0 \quad (j>0).
|
||||
\]</div>
|
||||
<p>with <span class="arithmatex">\(\gamma=1\)</span> exactly in the i.i.d. equiprobable case. Theorem 2.2 gives the limiting distribution of <span class="arithmatex">\(K_{r,s}(N)\)</span>, with <span class="arithmatex">\(k\)</span> set on the scale <span class="arithmatex">\(k=\left[\dfrac{\log N^{r}}{-\log\lambda^{*}}+x+1\right]\)</span>:</p>
|
||||
<p>When genome <span class="arithmatex">\(i\)</span> is added, the k-mer is either absent, with probability
|
||||
<span class="arithmatex">\(1-p_i\)</span>, or present, with probability <span class="arithmatex">\(p_i\)</span>. Thus,</p>
|
||||
<div class="arithmatex">\[
|
||||
\lim_{N\to\infty}\left[\Pr\{K_{r,s}(N)<k\} - \exp\{-(1-\lambda^{*})\,S_1(N,k)\}\right] = 0,
|
||||
P_i(j)=(1-p_i)P_{i-1}(j)+p_iP_{i-1}(j-1).
|
||||
\]</div>
|
||||
<p>equivalently</p>
|
||||
<p>This recurrence avoids enumerating the subsets of genomes. Computing the
|
||||
complete distribution requires <span class="arithmatex">\(O(S^2)\)</span> operations and <span class="arithmatex">\(O(S)\)</span> memory. To
|
||||
compute the upper-tail probability, only the probabilities for fewer
|
||||
than <span class="arithmatex">\(r\)</span> presences need to be tracked:</p>
|
||||
<div class="arithmatex">\[
|
||||
\frac{-\log\Pr\{K_{r,s}(N)<k\}}{(\lambda^{*})^{\rho(N,x)}} \xrightarrow[N\to\infty]{} (1-\lambda^{*})\,\gamma^{*}(\lambda^{*})^{x}.
|
||||
P_{\mathrm{null}}(X\geq r)=1-\sum_{j=0}^{r-1}P_S(j).
|
||||
\]</div>
|
||||
<p>The factor <span class="arithmatex">\((1-\lambda^{*})\)</span> multiplying <span class="arithmatex">\(S_1(N,k)\)</span> is the key correction over the naive pairwise-collision count: it de-clumps overlapping candidate matches, which are not independent events, into an effective Poisson rate. This theorem is stated for <span class="arithmatex">\(s\geq2\)</span> independent sequences (e.g. comparing two distinct genomes); the intra-sequence self-repeat case (a single genome compared to itself) is treated separately, via the reverse-complement match length <span class="arithmatex">\(R(N)\)</span>, in (Karlin & Ost 1985)<sup id="fnref:Karlin1985"><a class="footnote-ref" href="#fn:Karlin1985">7</a></sup>.</p>
|
||||
<p><span class="arithmatex">\(o(1)\)</span> (« petit o de 1 ») désigne une quantité qui <strong>tend vers 0 quand <span class="arithmatex">\(N\to\infty\)</span></strong>, mais dont on ne précise pas la vitesse exacte ni la formule exacte. C'est une façon d'écrire « il reste un terme d'erreur, mais il devient négligeable ».</p>
|
||||
<p>Concrètement dans <span class="arithmatex">\(S_1(N,k) = N^{r}\binom{s}{r}\gamma\,\lambda^{k}\,(1+o(1))\)</span> :</p>
|
||||
<ul>
|
||||
<li><span class="arithmatex">\(N^{r}\binom{s}{r}\gamma\,\lambda^{k}\)</span> est la valeur <strong>exacte à la limite</strong>, celle qu'on utilise en pratique (c'est elle qui redonne <span class="arithmatex">\(E[C]\)</span> de notre discussion).</li>
|
||||
<li><span class="arithmatex">\((1+o(1))\)</span> dit : « la vraie valeur de <span class="arithmatex">\(S_1(N,k)\)</span> n'est pas <em>exactement</em> égale à ce produit pour <span class="arithmatex">\(N\)</span> fini, mais le rapport entre les deux tend vers 1 quand <span class="arithmatex">\(N\to\infty\)</span> ». Autrement dit <span class="arithmatex">\(S_1(N,k) / \left[N^{r}\binom{s}{r}\gamma\lambda^{k}\right] \to 1\)</span>.</li>
|
||||
</ul>
|
||||
<p>Pourquoi ce terme existe : la formule <span class="arithmatex">\(F_\sigma(k)/\lambda^k \to \gamma\)</span> (éq. 2.8 du papier) est elle-même une limite quand <span class="arithmatex">\(k\to\infty\)</span> — pour <span class="arithmatex">\(k\)</span> fini, il y a un petit écart entre <span class="arithmatex">\(F_\sigma(k)\)</span> et <span class="arithmatex">\(\gamma\lambda^k\)</span>. C'est cet écart-là qui devient le <span class="arithmatex">\(o(1)\)</span>.</p>
|
||||
<p>Ce que ça implique pour l'usage pratique : dans le cas iid équiprobable que tu utilises (ADN, <span class="arithmatex">\(\gamma=1\)</span> exactement, pas seulement à la limite — je l'ai vérifié directement sur la dérivation : <span class="arithmatex">\(F_\sigma(k)=m^{-k}=\lambda^k\)</span> pour tout <span class="arithmatex">\(k\)</span>, pas juste asymptotiquement), le <span class="arithmatex">\(o(1)\)</span> est en réalité <strong>nul</strong> dans ce cas précis, pas juste négligeable. La formule <span class="arithmatex">\(S_1(N,k)=N^r\binom{s}{r}\lambda^k\)</span> est donc exacte (à l'asymptotique en <span class="arithmatex">\(N\)</span> près, qui elle vient d'ailleurs — de l'approximation de Poisson elle-même, pas de ce <span class="arithmatex">\(\gamma\)</span>).</p>
|
||||
<p>Les deux approches sont légitimes, mais elles répondent à des questions différentes — et il y a une relation algébrique exacte entre les deux qui vaut la peine d'être explicitée.</p>
|
||||
<p><strong>Ce que calcule l'approche naïve.</strong> Pour <strong>un k-mer <span class="arithmatex">\(w\)</span> déjà observé et fixé</strong>, <span class="arithmatex">\(p_i\simeq1-\exp(-G_i/4^k)\)</span> est la probabilité que <em>ce mot précis</em> apparaisse quelque part dans le génome <span class="arithmatex">\(i\)</span> par hasard, et <span class="arithmatex">\(P(R\geq r)\)</span> (Poisson-binomiale ou binomiale) est la probabilité que <em>ce mot précis</em> soit partagé par au moins <span class="arithmatex">\(r\)</span> des <span class="arithmatex">\(S\)</span> génomes par hasard. C'est une <strong>p-value par observation</strong> : « j'ai vu ce k-mer particulier dans 5 génomes sur 10, est-ce surprenant pour lui ? »</p>
|
||||
<p><strong>Ce que calcule Karlin-Ost.</strong> <span class="arithmatex">\(S_1(k)\)</span> et <span class="arithmatex">\(P(K_{r,s}\geq k)\)</span> répondent à : « parmi <strong>tous les <span class="arithmatex">\(4^k\)</span> mots possibles</strong>, quelle est la probabilité qu'au moins un seul d'entre eux atteigne ce seuil de partage par hasard, n'importe où dans les génomes ? » C'est une question <strong>globale sur tout l'espace des k-mers</strong>, pas sur un mot déjà identifié.</p>
|
||||
<p><strong>La relation exacte entre les deux.</strong> Reprenons le cas <span class="arithmatex">\(r=s=2\)</span>, génomes égaux de taille <span class="arithmatex">\(G\)</span> :</p>
|
||||
<ul>
|
||||
<li>Naïf (mot <span class="arithmatex">\(w\)</span> fixé) : <span class="arithmatex">\(P(R=2\mid w)\simeq p^2=(G\cdot4^{-k})^2=G^2\cdot4^{-2k}\)</span></li>
|
||||
<li>Karlin-Ost : <span class="arithmatex">\(S_1=G^2\cdot4^{-k}\)</span></li>
|
||||
</ul>
|
||||
<p>Le rapport est exactement <span class="arithmatex">\(S_1 / P(R=2\mid w) = 4^{k}\)</span> — c'est-à-dire le nombre de mots possibles. Ce n'est pas une coïncidence : <span class="arithmatex">\(S_1=N^r\binom{s}{r}\lambda^k\)</span> vient de <span class="arithmatex">\(\lambda^k=\sum_w \Pr\{w\}^r\)</span>, une somme explicite sur les <span class="arithmatex">\(4^k\)</span> mots, alors que le calcul naïf tel que présenté ne somme sur rien — il traite <span class="arithmatex">\(w\)</span> comme donné.</p>
|
||||
<p><strong>Donc l'approche naïve, formellement, c'est Karlin-Ost auquel il manque le facteur « nombre de k-mers testés ».</strong> Pour la rendre comparable à la question « dois-je m'attendre à <em>une</em> collision fortuite n'importe où dans mon jeu de données », il faudrait une correction à la Bonferroni : multiplier <span class="arithmatex">\(P(R\geq r\mid w)\)</span> par le nombre effectif de k-mers canoniques testables (<span class="arithmatex">\(\approx4^k/2\)</span>). Karlin-Ost fait cette correction analytiquement et correctement (avec en prime le facteur de déclumping <span class="arithmatex">\((1-\lambda)\)</span> qu'on a discuté, qui corrige le sur-comptage des matches chevauchants — une union bound brute comme le Bonferroni décrit ci-dessus le surestimerait légèrement).</p>
|
||||
<p><strong>Ce qui veut dire, en pratique, que les deux outils ne sont pas concurrents mais complémentaires :</strong>
|
||||
- <strong>Choix a priori de <span class="arithmatex">\(k\)</span> / FPR global du dataset</strong> (la question de <code>kmers.md</code> depuis le début de cette conversation) → Karlin-Ost, parce qu'il intègre nativement la multiplicité sur tous les mots possibles.
|
||||
- <strong>Score de significativité a posteriori pour un k-mer effectivement observé dans l'index</strong> (« ce hit précis, présent dans <span class="arithmatex">\(r\)</span> génomes sur <span class="arithmatex">\(S\)</span>, est-il compatible avec le hasard ? ») → l'approche Poisson-binomiale est exactement le bon outil, et même préférable à Karlin-Ost pour cet usage : elle gère nativement des <span class="arithmatex">\(G_i\)</span> inégaux sans les subtilités de convergence du théorème 2.2, et elle donne directement une p-value par hit exploitable pour filtrer les résultats d'un index présence/absence — ce qui correspond bien à l'usage qu'a en tête ton correspondant.</p>
|
||||
<p>Une seule réserve sur le texte proposé tel quel : <span class="arithmatex">\(p_i\simeq1-\exp(-G_i/4^k)\)</span> souffre du même biais que celui identifié plus tôt dans notre discussion — un mot de longueur <span class="arithmatex">\(k\)</span> n'est pas indépendant à chaque position (chevauchement), donc ce <span class="arithmatex">\(p_i\)</span> est un peu optimiste (légèrement trop haut) pour les mêmes raisons que <span class="arithmatex">\(E[C]\)</span> l'était. Négligeable pour <span class="arithmatex">\(k\geq21\)</span>, plus discutable à <span class="arithmatex">\(k=11\)</span>.</p>
|
||||
<h2 id="chance-sharing-across-genomes-and-the-fdr-of-homology">Chance sharing across genomes and the FDR of homology</h2>
|
||||
<p>The formulas above ask how likely a match is between two sequences. The question OBIKmer actually has to answer is different: a k-mer is found in <span class="arithmatex">\(r\)</span> of the <span class="arithmatex">\(S\)</span> indexed genomes, and one wants to know whether this sharing can be explained by chance or whether it is evidence of homology. This section builds a null model for that question and turns it into a false discovery rate (FDR) for the call "a k-mer shared by at least <span class="arithmatex">\(r\)</span> genomes is homologous".</p>
|
||||
<h3 id="the-null-model">The null model</h3>
|
||||
<p>The null hypothesis is that the <span class="arithmatex">\(S\)</span> genomes are unrelated, that is, that each one is an independent random sequence. Rejecting it for a k-mer means that chance alone cannot explain why the k-mer is shared, which is the signal of homology one is looking for.</p>
|
||||
<p>The model only records whether a k-mer is present in a genome, not how many times. Two consequences follow. First, repeats inside a genome are irrelevant, and the size <span class="arithmatex">\(G_i\)</span> of genome <span class="arithmatex">\(i\)</span> is its number of <strong>distinct canonical k-mers</strong>. Second, a repeat family shared between genomes is paralogy, which is a form of homology; it is a true positive and not a false one. The only k-mers that could be shared by composition rather than by descent are low-complexity ones, which OBIKmer removes beforehand with its entropy filter.</p>
|
||||
<p>Everything takes place in canonical space. Because <span class="arithmatex">\(k\)</span> is odd, no k-mer equals its own reverse complement, so the <span class="arithmatex">\(4^k\)</span> k-mers pair up perfectly and the space contains exactly</p>
|
||||
<p>The computation can therefore be restricted to <span class="arithmatex">\(P_i(0),\ldots,P_i(r-1)\)</span>,
|
||||
requiring <span class="arithmatex">\(O(Sr)\)</span> operations and <span class="arithmatex">\(O(r)\)</span> memory. The resulting
|
||||
distribution depends on the genome-specific values <span class="arithmatex">\(N_i\)</span>, but not on the
|
||||
identity of the k-mer, and can thus be computed once for a given index
|
||||
and k-mer length.</p>
|
||||
<h3 id="comparing-observed-and-expected-sharing-in-the-index">Comparing observed and expected sharing in the index</h3>
|
||||
<p>The index contains only k-mers observed in at least one genome.
|
||||
Consequently, when comparing sharing proportions among the k-mers
|
||||
recorded in the index, the relevant null probability is conditional on
|
||||
at least one presence:</p>
|
||||
<div class="arithmatex">\[
|
||||
N=\frac{4^k}{2}
|
||||
q_r=P(X\geq r\mid X\geq 1)
|
||||
=\frac{P_{\mathrm{null}}(X\geq r)}{P_{\mathrm{null}}(X\geq 1)}.
|
||||
\]</div>
|
||||
<p>canonical k-mers. A given canonical k-mer is present in genome <span class="arithmatex">\(i\)</span> by chance with probability</p>
|
||||
<p>Let <span class="arithmatex">\(n_{\geq r}\)</span> be the number of distinct canonical k-mers observed in
|
||||
at least <span class="arithmatex">\(r\)</span> genomes, and let <span class="arithmatex">\(n_{\geq 1}\)</span> be the total number of
|
||||
distinct canonical k-mers recorded in the index. The observed proportion
|
||||
of indexed k-mers shared by at least <span class="arithmatex">\(r\)</span> genomes is</p>
|
||||
<div class="arithmatex">\[
|
||||
p_i = 1-\left(1-\frac1N\right)^{G_i}\simeq \frac{G_i}{N}=\frac{2\,G_i}{4^k}.
|
||||
O_r=\frac{n_{\geq r}}{n_{\geq 1}}.
|
||||
\]</div>
|
||||
<p>This is twice the <span class="arithmatex">\(G/4^k\)</span> used earlier in this page, because there <span class="arithmatex">\(G\)</span> is a number of positions on one strand, whereas <span class="arithmatex">\(G_i\)</span> here counts canonical k-mers, for which both strands are already merged.</p>
|
||||
<p>Let <span class="arithmatex">\(R\)</span> be the number of genomes, out of <span class="arithmatex">\(S\)</span>, that contain a given canonical k-mer by chance. Genomes are independent under the null, so <span class="arithmatex">\(R\)</span> is a sum of independent presence indicators, each with its own probability <span class="arithmatex">\(p_i\)</span>.</p>
|
||||
<h3 id="exact-tail-probability_1">Exact tail probability</h3>
|
||||
<p>When genome sizes differ, the <span class="arithmatex">\(p_i\)</span> differ, and <span class="arithmatex">\(R\)</span> follows a Poisson-binomial distribution. Writing the probability of exactly <span class="arithmatex">\(j\)</span> presences as a sum over all subsets of <span class="arithmatex">\(j\)</span> genomes would be hopeless, since there are up to <span class="arithmatex">\(2^S\)</span> subsets. The distribution is instead obtained by adding the genomes one at a time. Let <span class="arithmatex">\(d_j\)</span> be the probability that exactly <span class="arithmatex">\(j\)</span> of the genomes processed so far contain the k-mer. Adding genome <span class="arithmatex">\(i\)</span> leaves <span class="arithmatex">\(j\)</span> unchanged if the genome does not contain the k-mer, and moves <span class="arithmatex">\(j-1\)</span> to <span class="arithmatex">\(j\)</span> if it does:</p>
|
||||
<p>Under the random-sequence model, the expected proportion is <span class="arithmatex">\(q_r\)</span>. The
|
||||
difference</p>
|
||||
<div class="arithmatex">\[
|
||||
d'_j = d_j\,(1-p_i) + d_{j-1}\,p_i, \qquad d_0=1 \text{ before the first genome.}
|
||||
D_r=O_r-q_r
|
||||
\]</div>
|
||||
<p>The table <span class="arithmatex">\(d\)</span> only needs to remember how many genomes were hit, not which ones, and this brings the cost down to <span class="arithmatex">\(O(S^2)\)</span>. The result does not depend on the order in which the genomes are processed. It does not depend on the k-mer either, so it is computed once per index. The upper tail is then</p>
|
||||
<p>therefore measures the excess or deficit of sharing relative to the null
|
||||
expectation. Positive values indicate that k-mers are shared across
|
||||
genomes more frequently than expected by chance, whereas negative values
|
||||
indicate less frequent sharing. A value of zero indicates agreement with
|
||||
the random-sequence model.</p>
|
||||
<p>Since both <span class="arithmatex">\(O_r\)</span> and <span class="arithmatex">\(q_r\)</span> are proportions between zero and one, <span class="arithmatex">\(D_r\)</span>
|
||||
is bounded:</p>
|
||||
<div class="arithmatex">\[
|
||||
P_0(R\geq r) = 1-\sum_{j=0}^{r-1} d_j .
|
||||
-1\leq D_r\leq 1.
|
||||
\]</div>
|
||||
<p>Only <span class="arithmatex">\(d_0,\dots,d_{r-1}\)</span> are needed, so the cost is <span class="arithmatex">\(O(S\,r)\)</span>.</p>
|
||||
<h3 id="approximation-with-equal-genome-sizes">Approximation with equal genome sizes</h3>
|
||||
<p>If all genomes are given the same size, taken as the mean</p>
|
||||
<p>More precisely, for a given <span class="arithmatex">\(q_r\)</span>, its bounds are <span class="arithmatex">\(-q_r\)</span> and <span class="arithmatex">\(1-q_r\)</span>. By
|
||||
construction, <span class="arithmatex">\(D_1=0\)</span>, since all k-mers recorded in the index occur in
|
||||
at least one genome. Unlike a ratio-based measure, this difference
|
||||
remains defined when no k-mers are observed in at least <span class="arithmatex">\(r\)</span> genomes.</p>
|
||||
<h3 id="estimating-the-false-discovery-rate">Estimating the false discovery rate</h3>
|
||||
<p>The probability <span class="arithmatex">\(P_{\mathrm{null}}(X\geq r)\)</span> applies to one specified canonical k-mer.
|
||||
To estimate the number of k-mers that could reach this sharing threshold
|
||||
by chance across the entire canonical k-mer space, this probability must
|
||||
be considered over all <span class="arithmatex">\(M_k\)</span> possible canonical k-mers.</p>
|
||||
<p>The expected number of chance k-mers present in at least <span class="arithmatex">\(r\)</span> genomes is</p>
|
||||
<div class="arithmatex">\[
|
||||
\bar G=\frac1S\sum_{i=1}^{S}G_i, \qquad \bar p=\frac{2\bar G}{4^k},
|
||||
E[\mathrm{FP}(r)]=M_kP_{\mathrm{null}}(X\geq r).
|
||||
\]</div>
|
||||
<p>then <span class="arithmatex">\(R\)</span> follows a plain binomial distribution and the tail is</p>
|
||||
<p>The observed number of k-mers passing the threshold is <span class="arithmatex">\(n_{\geq r}\)</span>. An
|
||||
estimate of the false discovery rate (FDR) for this set is therefore</p>
|
||||
<div class="arithmatex">\[
|
||||
P_0(R\geq r)\simeq\sum_{j=r}^{S}\binom{S}{j}\,\bar p^{\,j}(1-\bar p)^{S-j}.
|
||||
\widehat{\mathrm{FDR}}(r)=
|
||||
\begin{cases}
|
||||
1 & \text{if } n_{\geq r}=0,\\[4pt]
|
||||
\displaystyle
|
||||
\min\left(1,
|
||||
\frac{M_k P_{\mathrm{null}}(X\geq r)}
|
||||
{n_{\geq r}}\right)
|
||||
& \text{otherwise}.
|
||||
\end{cases}
|
||||
\]</div>
|
||||
<p>This sum is the regularized incomplete beta function <span class="arithmatex">\(I_{\bar p}(r,\,S-r+1)\)</span>, available in standard statistical libraries. If it is summed by hand, the terms are obtained one from the next by <span class="arithmatex">\(t_{j+1}=t_j\,\frac{S-j}{j+1}\,\frac{\bar p}{1-\bar p}\)</span>.</p>
|
||||
<p>A theorem of Hoeffding (Hoeffding 1956)<sup id="fnref2:Hoeffding1956-bx"><a class="footnote-ref" href="#fn:Hoeffding1956-bx">1</a></sup> shows that this approximation errs on the safe side. For a fixed mean, the Poisson-binomial distribution is more concentrated than the binomial one, so for <span class="arithmatex">\(r\geq S\bar p+1\)</span> the binomial tail is never smaller than the exact tail. Using the mean genome size therefore overestimates the chance of sharing and can only make the FDR more pessimistic. Gleser (Gleser 1975)<sup id="fnref:Gleser1975-yu"><a class="footnote-ref" href="#fn:Gleser1975-yu">8</a></sup> refines this result: replacing the <span class="arithmatex">\(p_i\)</span> by any partial average of themselves, not only by their full mean, also moves the upper tail towards the binomial one, provided <span class="arithmatex">\(r-1\geq S\bar p+2\)</span>. Grouping genomes of similar size is therefore safe in the same sense. What it loses is power when genome sizes differ by orders of magnitude, since one large genome then weighs as much as several small ones in <span class="arithmatex">\(\bar p\)</span>.</p>
|
||||
<p>When all <span class="arithmatex">\(p_i\)</span> are small, which is the case for large <span class="arithmatex">\(k\)</span>, the number of hits is also well approximated by a Poisson distribution of mean <span class="arithmatex">\(\lambda=\sum_i p_i\)</span>, with an error bounded by <span class="arithmatex">\(\sum_i p_i^2\)</span> (Le Cam 1960)<sup id="fnref:Le-Cam1960-pe"><a class="footnote-ref" href="#fn:Le-Cam1960-pe">9</a></sup>.</p>
|
||||
<p>For the numerical evaluation, the tail that does not contain the mode <span class="arithmatex">\(S\bar p\)</span> should be summed directly. When <span class="arithmatex">\(r>S\bar p\)</span>, computing the sum from <span class="arithmatex">\(j=r\)</span> upwards is accurate even for very small probabilities, whereas computing <span class="arithmatex">\(1\)</span> minus the sum of the lower terms loses all precision once the tail falls below the machine epsilon.</p>
|
||||
<h3 id="false-discovery-rate">False discovery rate</h3>
|
||||
<p>The FDR of the call "present in at least <span class="arithmatex">\(r\)</span> genomes" is the fraction of retained k-mers expected to be pure chance:</p>
|
||||
<div class="arithmatex">\[
|
||||
\widehat{\mathrm{FDR}}(r)=\min\!\left(1,\ \frac{N\,P_0(R\geq r)}{n_{\geq r}}\right).
|
||||
\]</div>
|
||||
<p>The numerator is the number of k-mers expected to reach <span class="arithmatex">\(r\)</span> genomes by chance if the genomes were unrelated. Each of the <span class="arithmatex">\(N\)</span> canonical k-mers has probability <span class="arithmatex">\(P_0(R\geq r)\)</span> of doing so, and no further correction for multiple testing is needed because the number of tests is already in the product. The denominator <span class="arithmatex">\(n_{\geq r}\)</span> is the number of distinct k-mers actually observed in at least <span class="arithmatex">\(r\)</span> genomes, which is read directly from the index. The observed count mixes chance and true homology, so the ratio is an upper bound on the true FDR: it implicitly assumes that all k-mers are null, and it never underestimates the noise. The minimal <span class="arithmatex">\(r\)</span> for which <span class="arithmatex">\(\widehat{\mathrm{FDR}}(r)\)</span> falls below the accepted level, for example 5 %, is the sharing threshold to use.</p>
|
||||
<p>As an illustration, take <span class="arithmatex">\(k=21\)</span> (so <span class="arithmatex">\(N=2.2\times10^{12}\)</span>), <span class="arithmatex">\(S=10\)</span> genomes and <span class="arithmatex">\(G_i=10^9\)</span> distinct canonical k-mers each, hence <span class="arithmatex">\(p=4.5\times10^{-4}\)</span>. The number of k-mers expected to be shared by chance is:</p>
|
||||
<p>The numerator estimates the number of false positives under the null
|
||||
model, while the denominator is the observed number of k-mers passing
|
||||
the sharing threshold. This estimate assumes that all possible canonical
|
||||
k-mers are subject to the null model. It is therefore conservative in
|
||||
the sense that it does not attempt to estimate the proportion of the
|
||||
k-mer space corresponding to true homology. The estimate is capped at
|
||||
one because a proportion cannot exceed one.</p>
|
||||
<p>The distinction between <span class="arithmatex">\(D_r\)</span> and the FDR is important. <span class="arithmatex">\(D_r\)</span> compares
|
||||
the observed and expected proportions among k-mers already present in
|
||||
the index. The FDR estimate instead compares the expected number of
|
||||
chance k-mers in the entire canonical k-mer space with the observed
|
||||
number passing the sharing threshold.</p>
|
||||
<p>The smallest value of <span class="arithmatex">\(r\)</span> for which <span class="arithmatex">\(\widehat{\mathrm{FDR}}(r)\)</span> falls
|
||||
below a chosen threshold, for example 5%, can be used as a minimum
|
||||
sharing threshold. This interpretation is conditional on the assumptions
|
||||
of the null model and should not be taken as a model-independent
|
||||
guarantee of the biological false discovery rate.</p>
|
||||
<p>As an illustration, consider <span class="arithmatex">\(k=21\)</span>, for which
|
||||
<span class="arithmatex">\(M_k\simeq2.2\times10^{12}\)</span>, and an index containing <span class="arithmatex">\(S=10\)</span> genomes.
|
||||
Suppose that the numbers of distinct canonical k-mers in these genomes
|
||||
range from <span class="arithmatex">\(0.5\times10^9\)</span> to <span class="arithmatex">\(1.4\times10^9\)</span>, in increments of
|
||||
<span class="arithmatex">\(0.1\times10^9\)</span>. Applying the Poisson-binomial model with the
|
||||
corresponding genome-specific probabilities gives the following
|
||||
expected numbers of k-mers shared by chance:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: right;"><span class="arithmatex">\(r\)</span></th>
|
||||
<th style="text-align: right;"><span class="arithmatex">\(N\,P_0(R\geq r)\)</span></th>
|
||||
<th style="text-align: right;"><span class="arithmatex">\(M_kP_{\mathrm{null}}(X\geq r)\)</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: right;">2</td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(2\times10^{7}\)</span></td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(1.82\times10^7\)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: right;">3</td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(2.5\times10^{4}\)</span></td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(2.06\times10^4\)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: right;">4</td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(\approx 20\)</span></td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(15\)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: right;">5</td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(\approx 0.01\)</span></td>
|
||||
<td style="text-align: right;"><span class="arithmatex">\(0.0075\)</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Chance alone produces millions of pairwise shared 21-mers at this genome size, a few tens of thousands shared by three genomes, and almost none shared by five or more. Whether a given <span class="arithmatex">\(r\)</span> is acceptable then depends on how many k-mers the index actually reports at that level.</p>
|
||||
<p>In this example, chance alone can produce many pairwise shared 21-mers,
|
||||
whereas the expected number of k-mers shared by five or more genomes is
|
||||
very small. Whether a given sharing threshold is sufficiently stringent
|
||||
depends on the number of k-mers actually observed at that level.</p>
|
||||
<h3 id="limits-of-the-model">Limits of the model</h3>
|
||||
<ul>
|
||||
<li>The FDR is computed per k-mer. Neighbouring k-mers of a shared region overlap and are not independent, so a single homologous region contributes many correlated k-mers. A per-region FDR would count regions instead of k-mers and is not covered here.</li>
|
||||
<li>The probability <span class="arithmatex">\(p_i\)</span> assumes equiprobable, independent nucleotides. The composition biases discussed earlier in this page violate this assumption, and the resulting error is not accounted for.</li>
|
||||
</ul>
|
||||
<hr />
|
||||
<p>Je n'ai rien modifié. Voici la formalisation des deux points, à valider avant de l'écrire dans <code>kmers.md</code>.</p>
|
||||
<h2 id="1-fdr-dun-ensemble-de-k-mers-selectionnes">1. FDR d'un ensemble de k-mers sélectionnés</h2>
|
||||
<p><strong>Estimation de l'espérance du nombre de faux positifs.</strong> Soit <span class="arithmatex">\(M\)</span> le nombre de k-mers canoniques testés, <span class="arithmatex">\(M = 4^k/2\)</span> pour k impair. Soit <span class="arithmatex">\(q(r)=P(X\ge r)\)</span> la queue du modèle nul. Le nombre attendu de k-mers présents par hasard dans au moins <span class="arithmatex">\(r\)</span> génomes vaut</p>
|
||||
<div class="arithmatex">\[
|
||||
E[\mathrm{FP}(r)] = M\,q(r).
|
||||
\]</div>
|
||||
<p>Cette égalité est exacte par linéarité de l'espérance, même si les k-mers chevauchants sont dépendants. La dépendance n'affecte que la variance, pas l'espérance. Seule l'approximation de Poisson par génome reste une approximation.</p>
|
||||
<p><strong>FDR.</strong> Soit <span class="arithmatex">\(N(r)=\#\{i : r_i\ge r\}\)</span> le nombre observé de k-mers couvrant au moins <span class="arithmatex">\(r\)</span> génomes. Alors</p>
|
||||
<div class="arithmatex">\[
|
||||
\mathrm{FDR}(r)=\min\!\Big(1,\ \frac{M\,q(r)}{N(r)}\Big).
|
||||
\]</div>
|
||||
<p>Cette estimation est légèrement conservatrice. Elle suppose <span class="arithmatex">\(\pi_0=1\)</span>, c'est-à-dire que presque tout l'espace <span class="arithmatex">\(M\)</span> est nul, ce qui est vrai pour k grand.</p>
|
||||
<p><strong>Ensemble hétérogène en <span class="arithmatex">\(r_i\)</span>.</strong> Si le jeu n'est pas défini par un seuil unique, on utilise le local fdr par classe de couverture :</p>
|
||||
<div class="arithmatex">\[
|
||||
\mathrm{fdr}(r)=\frac{M\,P(X=r)}{N_r},\qquad N_r=\#\{i : r_i=r\}.
|
||||
\]</div>
|
||||
<p>Le FDR de l'ensemble est alors la moyenne <span class="arithmatex">\(\frac1N\sum_i \mathrm{fdr}(r_i)\)</span>. Pour un ensemble défini par seuil <span class="arithmatex">\(r_{\min}\)</span>, cela redonne exactement la formule précédente.</p>
|
||||
<p><strong>Remarque.</strong> <span class="arithmatex">\(M\,p\approx G\)</span>, d'où <span class="arithmatex">\(E[\mathrm{FP}(r)]\approx\binom{S}{r}\,G^r/M^{r-1}\)</span> en régime de petits <span class="arithmatex">\(p\)</span>. Cela donne une lecture directe de la quantité.</p>
|
||||
<h2 id="2-markov-dordre-0-avec-frequences-inegales">2. Markov d'ordre 0 avec fréquences inégales</h2>
|
||||
<p>Soit <span class="arithmatex">\(\pi_b\)</span> la fréquence du nucléotide <span class="arithmatex">\(b\)</span>. Pour un k-mer <span class="arithmatex">\(w\)</span> de composition <span class="arithmatex">\(n=(n_A,n_C,n_G,n_T)\)</span> avec <span class="arithmatex">\(\sum n_b=k\)</span>, on a <span class="arithmatex">\(P(w)=\prod_b \pi_b^{n_b}\)</span>.</p>
|
||||
<p><strong>Attendu par génome.</strong> Le k-mer canonique <span class="arithmatex">\(K=\{w,\overline w\}\)</span> est vu quand le brin direct porte <span class="arithmatex">\(w\)</span> ou <span class="arithmatex">\(\overline w\)</span>, donc</p>
|
||||
<div class="arithmatex">\[
|
||||
\lambda_K = G\,\big(P(w)+P(\overline w)\big)=G\Big(\prod_b\pi_b^{n_b}+\pi_A^{n_T}\pi_T^{n_A}\pi_C^{n_G}\pi_G^{n_C}\Big).
|
||||
\]</div>
|
||||
<p>Cela ne dépend que de la composition. Si <span class="arithmatex">\(\pi_A=\pi_T\)</span> et <span class="arithmatex">\(\pi_C=\pi_G\)</span>, on retrouve <span class="arithmatex">\(2P(w)\)</span>.</p>
|
||||
<p><strong>Faux positifs.</strong> Le test n'est plus homogène : chaque composition a sa propre <span class="arithmatex">\(p(n)=1-e^{-\lambda(n)}\)</span>. Il faut donc sommer sur les classes de composition (un k-mer et son complément inverse partagent le même <span class="arithmatex">\(\lambda\)</span>, d'où le facteur ½) :</p>
|
||||
<div class="arithmatex">\[
|
||||
E[\mathrm{FP}(r)]=\frac12\sum_{n}\binom{k}{n_A,n_C,n_G,n_T}\,P\big(X\ge r\mid p(n)\big).
|
||||
\]</div>
|
||||
<p>Cette somme porte sur <span class="arithmatex">\(\binom{k+3}{3}\)</span> compositions, soit 5 984 pour k = 31. Elle est donc légère avec la binomiale de la moyenne, ou avec une Poisson-binomiale par composition si les <span class="arithmatex">\(G_i\)</span> diffèrent. Si les <span class="arithmatex">\(\pi_b\)</span> varient d'un génome à l'autre (GC différent), les <span class="arithmatex">\(p_i(n)\)</span> se construisent par génome.</p>
|
||||
<p><strong>Effet attendu.</strong> La moyenne de <span class="arithmatex">\(\lambda_w\)</span> sur tous les k-mers reste <span class="arithmatex">\(2G/4^k\)</span>, car <span class="arithmatex">\(\sum_w P(w)=1\)</span>. Dans le régime de petits <span class="arithmatex">\(p\)</span>, le terme dominant <span class="arithmatex">\(\binom{S}{r}p^r\)</span> est convexe en <span class="arithmatex">\(\lambda\)</span>. Par Jensen, le modèle équiprobable est donc le minimum de <span class="arithmatex">\(E[\mathrm{FP}]\)</span>, et la déviation de composition ne peut qu'augmenter le FDR. Les k-mers riches en AT ou GC dominent la somme, ce qui rejoint ton remarque sur la faible complexité. C'est un résultat sur le terme dominant, pas une preuve pour la queue exacte.</p>
|
||||
<p><strong>Limites à signaler dans le texte.</strong> Markov 0 ignore les dinucléotides, comme les CpG ou les répétitions, et le <span class="arithmatex">\(M\)</span> du modèle nul reste celui de l'espace total.</p>
|
||||
<p>Veux-tu que j'écrive ces deux sections, avec les corrections de numérique évoquées plus haut (<code>expm1</code>, somme directe de la queue) ?</p>
|
||||
<p>The FDR estimate is based on a simplified null model and has two
|
||||
important limitations.</p>
|
||||
<p>First, the model assumes independent, equiprobable nucleotides. Real
|
||||
genomes exhibit nucleotide-composition biases, oligonucleotide
|
||||
dependencies, and repeated sequences. These properties can increase the
|
||||
probability of particular k-mers beyond the uniform expectation.
|
||||
Removing low-complexity k-mers reduces some of these effects but does
|
||||
not eliminate all compositional biases. Karlin and colleagues showed
|
||||
that relative oligonucleotide abundances, including dinucleotide
|
||||
frequencies, form characteristic genomic signatures that can differ
|
||||
between organisms and remain relatively stable within genomes
|
||||
(Karlin <em>et al.</em> 1994; Karlin & Burge 1995)<sup id="fnref:Karlin1995-lt"><a class="footnote-ref" href="#fn:Karlin1995-lt">1</a></sup> <sup id="fnref:Karlin1994-on"><a class="footnote-ref" href="#fn:Karlin1994-on">2</a></sup>.</p>
|
||||
<p>Second, the FDR is computed per k-mer. Consecutive k-mers extracted from
|
||||
the same homologous region overlap and are therefore not independent
|
||||
observations. A single homologous region can contribute many correlated
|
||||
k-mers to the index. The estimate presented here consequently describes
|
||||
the expected fraction of chance k-mers, not the fraction of false
|
||||
homologous regions. A region-level FDR would require a model that treats
|
||||
matching regions, rather than individual k-mers, as the units of
|
||||
observation.</p>
|
||||
<div class="footnote">
|
||||
<hr />
|
||||
<ol>
|
||||
<li id="fn:Hoeffding1956-bx">
|
||||
<p>Hoeffding W (1956) <a href="https://doi.org/10.1214/aoms/1177728178">[On the distribution of the number of successes in independent trials]{.nocase}</a>. <em>The Annals of Mathematical Statistics</em>, <strong>27</strong>, 713--721. <a class="footnote-backref" href="#fnref:Hoeffding1956-bx" title="Jump back to footnote 1 in the text">↩</a><a class="footnote-backref" href="#fnref2:Hoeffding1956-bx" title="Jump back to footnote 1 in the text">↩</a></p>
|
||||
<li id="fn:Karlin1995-lt">
|
||||
<p>Karlin S, Burge C (1995) <a href="https://doi.org/10.1016/s0168-9525(00)89076-9">[Dinucleotide relative abundance extremes: a genomic signature]{.nocase}</a>. <em>Trends in Genetics: TIG</em>, <strong>11</strong>, 283--290. <a class="footnote-backref" href="#fnref:Karlin1995-lt" title="Jump back to footnote 1 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Fraser1995-jc">
|
||||
<p>Fraser CM, Gocayne JD, White O, Adams MD, Clayton RA, Fleischmann RD, Bult CJ, Kerlavage AR, Sutton G, Kelley JM, Fritchman RD, Weidman JF, Small KV, Sandusky M, Fuhrmann J, Nguyen D, Utterback TR, Saudek DM, Phillips CA, Merrick JM, Tomb JF, Dougherty BA, Bott KF, Hu PC, Lucier TS, Peterson SN, Smith HO, Hutchison CA 3rd, Venter JC (1995) <a href="https://doi.org/10.1126/science.270.5235.397">The minimal gene complement of mycoplasma genitalium</a>. <em>Science (New York, N.Y.)</em>, <strong>270</strong>, 397--403. <a class="footnote-backref" href="#fnref:Fraser1995-jc" title="Jump back to footnote 2 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Schneiker2007-gs">
|
||||
<p>Schneiker S, Perlova O, Kaiser O, Gerth K, Alici A, Altmeyer MO, Bartels D, Bekel T, Beyer S, Bode E, Bode HB, Bolten CJ, Choudhuri JV, Doss S, Elnakady YA, Frank B, Gaigalat L, Goesmann A, Groeger C, Gross F, Jelsbak L, Jelsbak L, Kalinowski J, Kegler C, Knauber T, Konietzny S, Kopp M, Krause L, Krug D, Linke B, Mahmud T, Martinez-Arias R, McHardy AC, Merai M, Meyer F, Mormann S, Muñoz-Dorado J, Perez J, Pradella S, Rachid S, Raddatz G, Rosenau F, Rückert C, Sasse F, Scharfe M, Schuster SC, Suen G, Treuner-Lange A, Velicer GJ, Vorhölter F-J, Weissman KJ, Welch RD, Wenzel SC, Whitworth DE, Wilhelm S, Wittmann C, Blöcker H, Pühler A, Müller R (2007) <a href="https://doi.org/10.1038/nbt1354">Complete genome sequence of the myxobacterium sorangium cellulosum</a>. <em>Nature Biotechnology</em>, <strong>25</strong>, 1281--1289. <a class="footnote-backref" href="#fnref:Schneiker2007-gs" title="Jump back to footnote 3 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Fleischmann2014-ed">
|
||||
<p>Fleischmann A, Michael TP, Rivadavia F, Sousa A, Wang W, Temsch EM, Greilhuber J, Müller KF, Heubl G (2014) <a href="https://doi.org/10.1093/aob/mcu189">Evolution of genome size and chromosome number in the carnivorous plant genus genlisea (lentibulariaceae), with a new estimate of the minimum genome size in angiosperms</a>. <em>Annals of Botany</em>, <strong>114</strong>, 1651--1663. <a class="footnote-backref" href="#fnref:Fleischmann2014-ed" title="Jump back to footnote 4 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Fernandez2024-kd">
|
||||
<p>Fernández P, Amice R, Bruy D, Christenhusz MJM, Leitch IJ, Leitch AL, Pokorny L, Hidalgo O, Pellicer J (2024) <a href="https://doi.org/10.1016/j.isci.2024.109889">A 160 gbp fork fern genome shatters size record for eukaryotes</a>. <em>iScience</em>, <strong>27</strong>, 109889. <a class="footnote-backref" href="#fnref:Fernandez2024-kd" title="Jump back to footnote 5 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Karlin1988">
|
||||
<p>Karlin S, Ost F (1988) Maximal length of common words among random letter sequences. <em>The Annals of Probability</em>, <strong>16</strong>, 535--563. <a class="footnote-backref" href="#fnref:Karlin1988" title="Jump back to footnote 6 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Karlin1985">
|
||||
<p>Karlin S, Ost F (1985) Maximal segmental match length among random sequences from a finite alphabet. In: <em>Proceedings of the berkeley conference in honor of jerzy neyman and jack kiefer</em> (eds Le Cam LM, Olshen RA), pp. 225--243. Wadsworth, Monterey, CA. <a class="footnote-backref" href="#fnref:Karlin1985" title="Jump back to footnote 7 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Gleser1975-yu">
|
||||
<p>Gleser LJ (1975) <a href="https://doi.org/10.1214/aop/1176996461">[On the distribution of the number of successes in independent trials]{.nocase}</a>. <em>Annals of Probability</em>, <strong>3</strong>, 182--188. <a class="footnote-backref" href="#fnref:Gleser1975-yu" title="Jump back to footnote 8 in the text">↩</a></p>
|
||||
</li>
|
||||
<li id="fn:Le-Cam1960-pe">
|
||||
<p>Le Cam L (1960) <a href="https://doi.org/10.2140/pjm.1960.10.1181">[An approximation theorem for the Poisson binomial distribution]{.nocase}</a>. <em>Pacific Journal of Mathematics</em>, <strong>10</strong>, 1181--1197. <a class="footnote-backref" href="#fnref:Le-Cam1960-pe" title="Jump back to footnote 9 in the text">↩</a></p>
|
||||
<li id="fn:Karlin1994-on">
|
||||
<p>Karlin S, Ladunga I, Blaisdell BE (1994) <a href="https://doi.org/10.1073/pnas.91.26.12837">[Heterogeneity of genomes: measures and values]{.nocase}</a>. <em>Proceedings of the National Academy of Sciences of the United States of America</em>, <strong>91</strong>, 12837--12841. <a class="footnote-backref" href="#fnref:Karlin1994-on" title="Jump back to footnote 2 in the text">↩</a></p>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Minimizer selection - obikmer — User Guide</title>
|
||||
<title>Minimizer selection - 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>
|
||||
@@ -1590,7 +1590,7 @@ j=\underset{i}{\operatorname{argmin}}\;H(s_i^c).
|
||||
<p>In other words, the hash function defines the ordering of canonical m-mers, while the minimizer itself is the canonical form of the m-mer selected by that ordering.</p>
|
||||
<p>Applying the minimizer to consecutive k-mers partitions a sequence into super-kmers (see <a href="../superkmers/">Super-kmers</a>).</p>
|
||||
<h2 id="hash-based-minimizer-ordering">Hash-based minimizer ordering</h2>
|
||||
<p><code>obikmer</code> selects minimizers by hash order rather than plain lexicographic order. Ordering m-mers lexicographically on their 2-bit encoding systematically favors AT-rich m-mers (an all-A m-mer always encodes to 0), which causes low-complexity regions to dominate as minimizers and produces unbalanced partitions (Zheng <em>et al.</em> 2020, 2021; Kille <em>et al.</em> 2023; Pan & Reinert 2024; Golan & Shur 2025)<sup id="fnref:Zheng2020-ji"><a class="footnote-ref" href="#fn:Zheng2020-ji">2</a></sup> <sup id="fnref:Zheng2021-cc"><a class="footnote-ref" href="#fn:Zheng2021-cc">3</a></sup> <sup id="fnref:Pan2024-hb"><a class="footnote-ref" href="#fn:Pan2024-hb">4</a></sup> <sup id="fnref:Kille2023-px"><a class="footnote-ref" href="#fn:Kille2023-px">5</a></sup> <sup id="fnref:Golan2025-xf"><a class="footnote-ref" href="#fn:Golan2025-xf">6</a></sup>.</p>
|
||||
<p><code>obiskim</code> selects minimizers by hash order rather than plain lexicographic order. Ordering m-mers lexicographically on their 2-bit encoding systematically favors AT-rich m-mers (an all-A m-mer always encodes to 0), which causes low-complexity regions to dominate as minimizers and produces unbalanced partitions (Zheng <em>et al.</em> 2020, 2021; Kille <em>et al.</em> 2023; Pan & Reinert 2024; Golan & Shur 2025)<sup id="fnref:Zheng2020-ji"><a class="footnote-ref" href="#fn:Zheng2020-ji">2</a></sup> <sup id="fnref:Zheng2021-cc"><a class="footnote-ref" href="#fn:Zheng2021-cc">3</a></sup> <sup id="fnref:Pan2024-hb"><a class="footnote-ref" href="#fn:Pan2024-hb">4</a></sup> <sup id="fnref:Kille2023-px"><a class="footnote-ref" href="#fn:Kille2023-px">5</a></sup> <sup id="fnref:Golan2025-xf"><a class="footnote-ref" href="#fn:Golan2025-xf">6</a></sup>.</p>
|
||||
<p>Instead, a well-distributed hash function <span class="arithmatex">\(H\)</span> is applied to the canonical (lexicographically minimal) form of each m-mer, and the m-mer with the smallest <span class="arithmatex">\(H\)</span> value wins. Because <span class="arithmatex">\(H\)</span> is a bijective mixing function with good avalanche properties (Steele <em>et al.</em> 2014)<sup id="fnref:Steele2014-cz"><a class="footnote-ref" href="#fn:Steele2014-cz">7</a></sup>, its output behaves approximately as a composition-independent pseudorandom ordering of distinct m-mers. Under the usual random-hash assumption, each distinct m-mer in a window has approximately the same probability of being the minimum, independently of nucleotide composition.</p>
|
||||
<p>The canonical form used as input to <span class="arithmatex">\(H\)</span> is still the lexicographic minimum of forward/reverse-complement — hashing is applied on top of it, not used to redefine it. Defining canonicity by hash value instead would bias the <em>distribution of hash values themselves</em> toward small values (the minimum of two independent hashes is not uniformly distributed), reintroducing a bias one layer down.</p>
|
||||
<h3 id="hash-function">Hash function</h3>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Super-kmers - obikmer — User Guide</title>
|
||||
<title>Super-kmers - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Whole k-mer set distances - obikmer — User Guide</title>
|
||||
<title>Whole k-mer set distances - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Central-position SNP model - obikmer — User Guide</title>
|
||||
<title>Central-position SNP model - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Gamma rate heterogeneity - obikmer — User Guide</title>
|
||||
<title>Gamma rate heterogeneity - 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>
|
||||
@@ -1526,7 +1526,7 @@
|
||||
<div class="arithmatex">\[\hat\mu = \frac{\sum_i n_i}{\sum_i L_i} \qquad V = \frac{\sum_i L_i\,(R_i-\hat\mu)^2}{\sum_i L_i} \qquad \bar L = \frac{\sum_i L_i}{\text{number of partitions}}\]</div>
|
||||
<div class="arithmatex">\[\hat\alpha = \frac{\hat\mu^2}{V - \hat\mu/\bar L}\]</div>
|
||||
<p>If the measured variance <span class="arithmatex">\(V\)</span> doesn't exceed the Poisson floor <span class="arithmatex">\(\hat\mu/\bar L\)</span> (no detectable over-dispersion across partitions — the data are consistent with a single shared rate), <span class="arithmatex">\(\alpha\)</span> is left undefined: the correction is silently disabled for that run rather than applying a fabricated value, and a warning is logged.</p>
|
||||
<p><strong>This is not Jin & Nei's (1990) original estimator.</strong> Their publication defines the <span class="arithmatex">\(+\Gamma\)</span> distance formula itself and, absent an estimate, recommends the fixed default <span class="arithmatex">\(\alpha = 1\)</span> — it does not propose a way to estimate <span class="arithmatex">\(\alpha\)</span> from data. The method-of-moments estimator above is a standard consequence of the Poisson–Gamma relationship between substitution counts and gamma-distributed rate variation, applied per-partition; it is <code>obikmer</code>'s own addition, not part of the cited correction.</p>
|
||||
<p><strong>This is not Jin & Nei's (1990) original estimator.</strong> Their publication defines the <span class="arithmatex">\(+\Gamma\)</span> distance formula itself and, absent an estimate, recommends the fixed default <span class="arithmatex">\(\alpha = 1\)</span> — it does not propose a way to estimate <span class="arithmatex">\(\alpha\)</span> from data. The method-of-moments estimator above is a standard consequence of the Poisson–Gamma relationship between substitution counts and gamma-distributed rate variation, applied per-partition; it is <code>obiskim</code>'s own addition, not part of the cited correction.</p>
|
||||
<p>See <a href="../../../../usage/phylo/#distance-estimation-and-tree-reconstruction"><code>phylo</code></a> for how to select a fixed <span class="arithmatex">\(\alpha\)</span> or request automatic estimation.</p>
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Sampling design - obikmer — User Guide</title>
|
||||
<title>Sampling design - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Sankoff model - obikmer — User Guide</title>
|
||||
<title>Sankoff model - 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>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>annotate - obikmer — User Guide</title>
|
||||
<title>annotate - 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>
|
||||
@@ -1534,8 +1534,8 @@
|
||||
|
||||
<h1 id="annotate">annotate</h1>
|
||||
<p>Add or update genome metadata of an index from a CSV file, or dump the current metadata as CSV.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>annotate<span class="w"> </span>INDEX<span class="w"> </span>--csv<span class="w"> </span>FILE<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
obikmer<span class="w"> </span>annotate<span class="w"> </span>INDEX<span class="w"> </span>--dump
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>annotate<span class="w"> </span>INDEX<span class="w"> </span>--csv<span class="w"> </span>FILE<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
obiskim<span class="w"> </span>annotate<span class="w"> </span>INDEX<span class="w"> </span>--dump
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>convert - obikmer — User Guide</title>
|
||||
<title>convert - 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>
|
||||
@@ -1534,7 +1534,7 @@
|
||||
|
||||
<h1 id="convert">convert</h1>
|
||||
<p>Convert an existing index's evidence representation in place, between exact, approximate, and hybrid.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>convert<span class="w"> </span>INDEX<span class="w"> </span><span class="o">(</span>--exact-evidence<span class="w"> </span><span class="p">|</span><span class="w"> </span>--approx-evidence<span class="w"> </span>BITS<span class="w"> </span><span class="p">|</span><span class="w"> </span>--hybrid-evidence<span class="o">)</span><span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>convert<span class="w"> </span>INDEX<span class="w"> </span><span class="o">(</span>--exact-evidence<span class="w"> </span><span class="p">|</span><span class="w"> </span>--approx-evidence<span class="w"> </span>BITS<span class="w"> </span><span class="p">|</span><span class="w"> </span>--hybrid-evidence<span class="o">)</span><span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>dump - obikmer — User Guide</title>
|
||||
<title>dump - 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>
|
||||
@@ -1534,7 +1534,7 @@
|
||||
|
||||
<h1 id="dump">dump</h1>
|
||||
<p>Dump all kmers of an index as CSV, one row per kmer, with per-genome counts or presence.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>dump<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>dump<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>filter - obikmer — User Guide</title>
|
||||
<title>filter - 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>
|
||||
@@ -1556,7 +1556,7 @@
|
||||
|
||||
<h1 id="filter">filter</h1>
|
||||
<p>Apply row-level selection to an index: retain only kmers matching ingroup/outgroup predicates over genome membership, plus optional total-count and complexity thresholds. The output is a new, single-layer index.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span>SOURCE<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span>SOURCE<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>index - obikmer — User Guide</title>
|
||||
<title>index - 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>
|
||||
@@ -1578,7 +1578,7 @@
|
||||
|
||||
<h1 id="index">index</h1>
|
||||
<p>Build a genome index from one or more sequence files. Construction proceeds in phases (scatter → dereplicate → count → layered MPHF), described in <a href="../../formats/index_layout/">On-disk storage</a>.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>index<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span><span class="o">[</span>INPUTS...<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>index<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span><span class="o">[</span>INPUTS...<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>merge - obikmer — User Guide</title>
|
||||
<title>merge - 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>
|
||||
@@ -1600,7 +1600,7 @@
|
||||
|
||||
<h1 id="merge">merge</h1>
|
||||
<p>Merge multiple built indexes into a single index.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>merge<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span>SOURCE...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>merge<span class="w"> </span>-o<span class="w"> </span>OUTPUT<span class="w"> </span>SOURCE...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>pack - obikmer — User Guide</title>
|
||||
<title>pack - 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>
|
||||
@@ -1556,7 +1556,7 @@
|
||||
|
||||
<h1 id="pack">pack</h1>
|
||||
<p>Pack an index's per-column matrix files into a single-file format to reduce query-time I/O (fewer file opens per query).</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>pack<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>--sparse<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>pack<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>--sparse<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>phylo - obikmer — User Guide</title>
|
||||
<title>phylo - 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>
|
||||
@@ -2218,7 +2218,7 @@
|
||||
</ul>
|
||||
<p>Distance matrices can be used to build Neighbor-Joining or UPGMA trees. SNP-based analyses can also produce a pseudo-alignment and calibrated substitution costs, with exports for external phylogenetic tools (TNT, PhyG, IQ-TREE).</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>phylo<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>phylo<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
@@ -2340,7 +2340,7 @@
|
||||
<h2 id="snp-character-selection-and-sampling">SNP character selection and sampling</h2>
|
||||
<p>SNP-based analyses can use every eligible variable family, or a sample drawn from the index. The options below control which characters are selected, which genomes and states are kept, and how the sample is spread over the index.</p>
|
||||
<p><code>--n-sites</code>, <code>--free-loss</code>, <code>--no-ambiguity</code>, <code>--quartet</code>, <code>--pair-balance</code>, <code>--entropy</code>/<code>--entropy-sd</code> are shared by <code>--pseudo-alignment</code>, <code>--sankoff</code> (and everything it implies: <code>--tnt</code>/<code>--phyg</code>/<code>--iqtree</code>), and a <code>snp-*</code> <code>--distance</code> value — one draw feeds all of them in a single invocation. <code>--n-sites</code> is mandatory for <code>--pseudo-alignment</code>/<code>--sankoff</code>, where it takes either a number of sites or <code>all</code>; for a <code>snp-*</code> <code>--distance</code> value it is optional, and omitting it is the same as <code>all</code> (every non-monomorphic family in the index, not an approximation).</p>
|
||||
<p>Combining <code>--sankoff</code> (or <code>--tnt</code>/<code>--phyg</code>/<code>--iqtree</code>) with a <code>snp-*</code> <code>--distance</code> value in the same command reuses that one draw for both — the distance and the Sankoff calibration/alignment are guaranteed to be computed from the <em>identical</em> set of sampled sites, never two independent samples, so the two outputs are directly comparable. This only holds within a single command; running them as two separate <code>obikmer phylo</code> invocations draws two independent samples even with the same flags.</p>
|
||||
<p>Combining <code>--sankoff</code> (or <code>--tnt</code>/<code>--phyg</code>/<code>--iqtree</code>) with a <code>snp-*</code> <code>--distance</code> value in the same command reuses that one draw for both — the distance and the Sankoff calibration/alignment are guaranteed to be computed from the <em>identical</em> set of sampled sites, never two independent samples, so the two outputs are directly comparable. This only holds within a single command; running them as two separate <code>obiskim phylo</code> invocations draws two independent samples even with the same flags.</p>
|
||||
<p>Every invocation draws its own fresh random sample: running the same command twice gives two different (but equally valid) samples, which is useful for measuring sampling variance and is kept that way deliberately.</p>
|
||||
<p>With <code>--n-sites all</code> (or, for a <code>snp-*</code> <code>--distance</code> value, without <code>--n-sites</code>), every variable family (family size ≥ 2) that passes the other filters is used. With <code>--n-sites N</code>, roughly <code>N</code> families are kept instead (see <a href="../../theory/phylogeny/snp_based/sampling_design/">Sampling design</a> for how the draw stays representative of the whole index). If fewer than <code>N</code> candidate families remain, <code>--n-sites</code> has no effect.</p>
|
||||
<table>
|
||||
@@ -2453,7 +2453,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>--sibling-annex</code></td>
|
||||
<td>Build (or rebuild) the sibling-count/minorant annex. Rebuilding it makes the annexes derived from it obsolete, so they are dropped; then only the derived annexes that the other options of the same command read are rebuilt, each under the <code>--no-ambiguity</code> / <code>--only-diploid</code> convention given: <code>--entropy</code> the entropy annex, <code>--quartet</code> the quartet annex, <code>--pair-balance</code> the pair-weight and family-overlap annexes, <code>--family-overlap</code> or <code>--min-shared-family</code> the family-overlap annex. For example <code>--sibling-annex --quartet --only-diploid</code> prepares exactly the quartet annex of that convention, and <code>--sibling-annex</code> alone prepares none. An annex that is not prepared is built later, on demand, by the computation that reads it. Every option in this section needs the sibling annex, and builds it by itself, under an exclusive lock on the index, if it is missing (as it is after <code>migrate-mphf</code>); running <code>--sibling-annex</code> first does the same work once, which is the safe way to start several <code>phylo</code> runs on the same index at the same time</td>
|
||||
<td>Build (or rebuild) the sibling-count/minorant annex. Rebuilding it makes the annexes derived from it obsolete, so they are dropped; then only the derived annexes that the other options of the same command read are rebuilt, each under the <code>--no-ambiguity</code> / <code>--only-diploid</code> convention given: <code>--entropy</code> the entropy annex, <code>--quartet</code> the quartet annex, <code>--pair-balance</code> the pair-weight and family-overlap annexes, <code>--family-overlap</code> or <code>--min-shared-family</code> the family-overlap annex. For example <code>--sibling-annex --quartet --only-diploid</code> prepares exactly the quartet annex of that convention, and <code>--sibling-annex</code> alone prepares none. An annex that is not prepared is built later, on demand, by the computation that reads it. Every option in this section needs the sibling annex, and builds it by itself, under an exclusive lock on the index, if it is missing; running <code>--sibling-annex</code> first does the same work once, which is the safe way to start several <code>phylo</code> runs on the same index at the same time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--sibling-stats</code></td>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>Predicates and taxonomy paths - obikmer — User Guide</title>
|
||||
<title>Predicates and taxonomy paths - 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>
|
||||
@@ -1658,7 +1658,7 @@
|
||||
</table>
|
||||
<p>A rank-qualified query, <code>key@rank=value</code>, matches only when the path's segment at that specific rank equals <code>value</code>.</p>
|
||||
<h3 id="example">Example</h3>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>filter<span class="w"> </span><span class="nb">source</span><span class="w"> </span>-o<span class="w"> </span>output<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">"taxon~/Betulaceae/Betula"</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>filter<span class="w"> </span><span class="nb">source</span><span class="w"> </span>-o<span class="w"> </span>output<span class="w"> </span>--ingroup<span class="w"> </span><span class="s2">"taxon~/Betulaceae/Betula"</span>
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>query - obikmer — User Guide</title>
|
||||
<title>query - 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>
|
||||
@@ -1556,7 +1556,7 @@
|
||||
|
||||
<h1 id="query">query</h1>
|
||||
<p>Query an index with sequences and annotate each query with the kmer matches found.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>query<span class="w"> </span>INDEX<span class="w"> </span>INPUTS...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>query<span class="w"> </span>INDEX<span class="w"> </span>INPUTS...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>select - obikmer — User Guide</title>
|
||||
<title>select - 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>
|
||||
@@ -1578,7 +1578,7 @@
|
||||
|
||||
<h1 id="select">select</h1>
|
||||
<p>Project and/or aggregate the genome columns of an index into a new index. Where <a href="../filter/"><code>filter</code></a> selects rows (kmers), <code>select</code> operates on columns (genomes): grouping several genomes into one aggregated column, reordering columns, or dropping some.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>SOURCE<span class="w"> </span>--output<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>SOURCE<span class="w"> </span>--output<span class="w"> </span>OUTPUT<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
@@ -1664,7 +1664,7 @@
|
||||
<h2 id="disk-usage">Disk usage</h2>
|
||||
<p><code>select</code> always writes to a new output directory — there is no in-place mode. Each layer's kmer-identity files (MPHF, unitigs, evidence, fingerprint) never change under a column projection/aggregation, so they are hard-linked into the output rather than copied: no extra disk is used for them, even on a very large index. Linking falls back to a real copy automatically if it fails (e.g. <code>SOURCE</code>/<code>OUTPUT</code> on different filesystems). Use <code>--force-copy</code> to always copy instead — needed when the output must be able to survive independently of the source on disk (a hard link shares the same underlying data, so overwriting one path outside <code>select</code> itself would affect the other).</p>
|
||||
<p>To replace an index with a selected version of itself, select to a temporary directory and swap it in:</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span><span class="k">select</span><span class="w"> </span>INDEX<span class="w"> </span>--output<span class="w"> </span>INDEX.tmp<span class="w"> </span>--group<span class="w"> </span>...<span class="w"> </span>--group-op<span class="w"> </span>...<span class="w"> </span>--select<span class="w"> </span>...
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span><span class="k">select</span><span class="w"> </span>INDEX<span class="w"> </span>--output<span class="w"> </span>INDEX.tmp<span class="w"> </span>--group<span class="w"> </span>...<span class="w"> </span>--group-op<span class="w"> </span>...<span class="w"> </span>--select<span class="w"> </span>...
|
||||
rm<span class="w"> </span>-rf<span class="w"> </span>INDEX
|
||||
mv<span class="w"> </span>INDEX.tmp<span class="w"> </span>INDEX
|
||||
</code></pre></div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>superkmer - obikmer — User Guide</title>
|
||||
<title>superkmer - 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>
|
||||
@@ -1534,7 +1534,7 @@
|
||||
|
||||
<h1 id="superkmer">superkmer</h1>
|
||||
<p>Extract super-kmers from one or more sequence files and write them to stdout, without building a full index. Useful for inspecting or piping the super-kmer decomposition of a dataset.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>superkmer<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span><span class="o">[</span>INPUTS...<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>superkmer<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span><span class="w"> </span><span class="o">[</span>INPUTS...<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>unitig - obikmer — User Guide</title>
|
||||
<title>unitig - 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>
|
||||
@@ -1534,7 +1534,7 @@
|
||||
|
||||
<h1 id="unitig">unitig</h1>
|
||||
<p>Dump the unitigs of an index as FASTA. A unitig is a maximal non-branching path through the de Bruijn graph implied by the index's kmers; the concatenation of every unitig reconstructs every stored kmer exactly once.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>unitig<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>unitig<span class="w"> </span>INDEX<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
|
||||
<title>utils - obikmer — User Guide</title>
|
||||
<title>utils - 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>
|
||||
@@ -1534,7 +1534,7 @@
|
||||
|
||||
<h1 id="utils">utils</h1>
|
||||
<p>Miscellaneous index maintenance and inspection utilities.</p>
|
||||
<div class="highlight"><pre><span></span><code>obikmer<span class="w"> </span>utils<span class="w"> </span>INDEXES...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
<div class="highlight"><pre><span></span><code>obiskim<span class="w"> </span>utils<span class="w"> </span>INDEXES...<span class="w"> </span><span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</code></pre></div>
|
||||
<h2 id="arguments">Arguments</h2>
|
||||
<table>
|
||||
|
||||
Reference in new issue
Block a user