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