refactor: rename obikmer to obiskim
Rename the `obikmer` binary, crate, and documentation to `obiskim`. This change updates all references in source code, build scripts, CI workflows, and user documentation to reflect the new tool name. - Move `src/obikmer` to `src/obiskim`, renaming the package and binary in `Cargo.toml` and updating `main.rs` and `cli.rs` to use the new name. - Update `src/Cargo.toml` and `src/Cargo.lock` to replace the `obikmer` workspace member with `obiskim`. - Update `Makefile` targets (`build`, `release`, `debug`, `profile-build`) and variables (`CARGO_TOML`, `bump-version`) to build and manage `obiskim`. - Update `.gitea/workflows/release.yml` to build and upload `obiskim` artifacts for Linux and macOS. - Rename all files in `src/obiskim/src/cmd/` from `obikmer` to `obiskim` paths, updating error messages and help text in `index/mod.rs`, `phylo/args/mod.rs`, and `phylo/tnt.rs`. - Update documentation in `UserDocMD/` (including `index.md`, `installation.md`, `architecture.md`, and usage guides) to reference `obiskim` commands and behavior. - Update `benchmark/` scripts and Python verification tools to use `obiskim` binary paths and arguments. - Update `scripts/` (including `smoke_test_*.sh`, `bench_merge_oracle.sh`, and Docker debug scripts) to test and build `obiskim`. - Update comments and error messages in library crates (`obicompactvec`, `obifastwrite`, `obikentropy`, `obikfilter`, `obikindex`, `obikindexer`, `obikphylo`, `obikselect`, `obikseq`, `obiread`, `obisys`) to reference `obiskim`.
This commit is contained in:
1 parent
a71e59d6f0
commit
42d5b881ec
106 files changed
+223
-223
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Architecture notes for advanced use
|
||||
|
||||
This page describes execution-level behavior relevant to sizing and running `obikmer` on large datasets or multi-socket machines. It complements the [index format](formats/index_layout.md) and [theory](theory/kmer_indexing/indexing_architecture.md) pages.
|
||||
This page describes execution-level behavior relevant to sizing and running `obiskim` on large datasets or multi-socket machines. It complements the [index format](formats/index_layout.md) and [theory](theory/kmer_indexing/indexing_architecture.md) pages.
|
||||
|
||||
## Sequence invariant
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Nothing here comes from a reference genome. The file has no real coordinates, an
|
||||
## Producing the file
|
||||
|
||||
```
|
||||
obikmer phylo --vcf --n-sites 5000000 -o run1 my_index
|
||||
obiskim phylo --vcf --n-sites 5000000 -o run1 my_index
|
||||
```
|
||||
|
||||
`--vcf` implies `--pseudo-alignment`, so `--n-sites N|all` is required, (the sibling annex it reads is built automatically if missing; see [`phylo`](../usage/phylo.md)). `--fasta` and `--vcf` 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 (`--free-loss`, `--no-ambiguity`, `--only-diploid`, `--quartet`, `--exclude-genome`, ...) applies to the VCF exactly as to the FASTA, since both describe the same sites.
|
||||
@@ -32,7 +32,7 @@ obikmer_0_0 1511 CACGANTGTAG A G,T . . . GT 0/0 0/0
|
||||
obikmer_0_1 9 TTACGNAGCTA C * . . . GT 0/0 0/0 1/1 0/0
|
||||
```
|
||||
|
||||
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 `--exclude-genome` or `--min-shared-family` has no column at all. `QUAL`, `FILTER` and `INFO` are always `.`: obikmer applies no variant filter and attaches no annotation, and leaving them empty keeps a file of millions of sites compact.
|
||||
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 `--exclude-genome` or `--min-shared-family` has no column at all. `QUAL`, `FILTER` and `INFO` are always `.`: obiskim applies no variant filter and attaches no annotation, and leaving them empty keeps a file of millions of sites compact.
|
||||
|
||||
## Coordinates: `CHROM` and `POS`
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
# obikmer
|
||||
# obiskim
|
||||
|
||||
`obikmer` 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.
|
||||
`obiskim` 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.
|
||||
|
||||
All functionality is exposed through a single binary, `obikmer`, organized as subcommands.
|
||||
All functionality is exposed through a single binary, `obiskim`, organized as subcommands.
|
||||
|
||||
## Core principles
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
### Rust toolchain
|
||||
|
||||
`obikmer` requires **Rust 1.85 or later** (edition 2024). Install or update via [rustup](https://rustup.rs):
|
||||
`obiskim` requires **Rust 1.85 or later** (edition 2024). Install or update via [rustup](https://rustup.rs):
|
||||
|
||||
```bash
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
@@ -13,7 +13,7 @@ rustup update stable
|
||||
|
||||
### C build environment (required for hwloc)
|
||||
|
||||
`obikmer` embeds [hwloc](https://www.open-mpi.org/projects/hwloc/) (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.
|
||||
`obiskim` embeds [hwloc](https://www.open-mpi.org/projects/hwloc/) (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.
|
||||
|
||||
#### Linux (Debian/Ubuntu)
|
||||
|
||||
@@ -47,11 +47,11 @@ brew install automake libtool autoconf pkg-config
|
||||
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd obikmer/src
|
||||
cd obiskim/src
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The compiled binary is at `target/release/obikmer`.
|
||||
The compiled binary is at `target/release/obiskim`.
|
||||
|
||||
### Building on HPC clusters (network filesystems)
|
||||
|
||||
@@ -66,7 +66,7 @@ CARGO_TARGET_DIR=/scratch/$USER/cargo-target cargo build --release
|
||||
Adapt the path to the scratch space available on your cluster (`/var/tmp`, `/tmp`, `/scratch/local`, etc.). Once built, copy the binary to a permanent location:
|
||||
|
||||
```bash
|
||||
cp /scratch/$USER/cargo-target/release/obikmer ~/bin/
|
||||
cp /scratch/$USER/cargo-target/release/obiskim ~/bin/
|
||||
```
|
||||
|
||||
## NUMA support
|
||||
@@ -80,5 +80,5 @@ NUMA-aware thread placement is active automatically on multi-socket Linux machin
|
||||
## Verifying the installation
|
||||
|
||||
```bash
|
||||
obikmer --help
|
||||
obiskim --help
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
# Low-complexity kmer filter
|
||||
|
||||
Low-complexity kmers (homopolymer runs, tandem repeats) can dominate an index without carrying useful information. `obikmer` detects and excludes them during index construction using a normalized Shannon entropy score.
|
||||
Low-complexity kmers (homopolymer runs, tandem repeats) can dominate an index without carrying useful information. `obiskim` detects and excludes them during index construction using a normalized Shannon entropy score.
|
||||
|
||||
## Sub-word frequencies
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Applying the minimizer to consecutive k-mers partitions a sequence into super-km
|
||||
|
||||
## Hash-based minimizer ordering
|
||||
|
||||
`obikmer` 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 [@Zheng2020-ji; @Zheng2021-cc; @Pan2024-hb; @Kille2023-px; @Golan2025-xf].
|
||||
`obiskim` 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 [@Zheng2020-ji; @Zheng2021-cc; @Pan2024-hb; @Kille2023-px; @Golan2025-xf].
|
||||
|
||||
Instead, a well-distributed hash function $H$ is applied to the canonical (lexicographically minimal) form of each m-mer, and the m-mer with the smallest $H$ value wins. Because $H$ is a bijective mixing function with good avalanche properties [@Steele2014-cz], 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.
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ $$\hat\alpha = \frac{\hat\mu^2}{V - \hat\mu/\bar L}$$
|
||||
|
||||
If the measured variance $V$ doesn't exceed the Poisson floor $\hat\mu/\bar L$ (no detectable over-dispersion across partitions — the data are consistent with a single shared rate), $\alpha$ is left undefined: the correction is silently disabled for that run rather than applying a fabricated value, and a warning is logged.
|
||||
|
||||
**This is not Jin & Nei's (1990) original estimator.** Their publication defines the $+\Gamma$ distance formula itself and, absent an estimate, recommends the fixed default $\alpha = 1$ — it does not propose a way to estimate $\alpha$ 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 `obikmer`'s own addition, not part of the cited correction.
|
||||
**This is not Jin & Nei's (1990) original estimator.** Their publication defines the $+\Gamma$ distance formula itself and, absent an estimate, recommends the fixed default $\alpha = 1$ — it does not propose a way to estimate $\alpha$ 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 `obiskim`'s own addition, not part of the cited correction.
|
||||
|
||||
See [`phylo`](../../../usage/phylo.md#distance-estimation-and-tree-reconstruction) for how to select a fixed $\alpha$ or request automatic estimation.
|
||||
@@ -3,8 +3,8 @@
|
||||
Add or update genome metadata of an index from a CSV file, or dump the current metadata as CSV.
|
||||
|
||||
```bash
|
||||
obikmer annotate INDEX --csv FILE [OPTIONS]
|
||||
obikmer annotate INDEX --dump
|
||||
obiskim annotate INDEX --csv FILE [OPTIONS]
|
||||
obiskim annotate INDEX --dump
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Convert an existing index's evidence representation in place, between exact, approximate, and hybrid.
|
||||
|
||||
```bash
|
||||
obikmer convert INDEX (--exact-evidence | --approx-evidence BITS | --hybrid-evidence) [OPTIONS]
|
||||
obiskim convert INDEX (--exact-evidence | --approx-evidence BITS | --hybrid-evidence) [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Dump all kmers of an index as CSV, one row per kmer, with per-genome counts or presence.
|
||||
|
||||
```bash
|
||||
obikmer dump INDEX [OPTIONS]
|
||||
obiskim dump INDEX [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
`estimate` has two independent uses. Without `--index`, it estimates approximate-index parameters (z, evidence bits, false-positive rate) before building an index with `--approx`, without touching any files. With `--index`, it compares the k-mer sharing observed in an existing index with the sharing expected by chance (see the last section).
|
||||
|
||||
```bash
|
||||
obikmer estimate [OPTIONS]
|
||||
obiskim estimate [OPTIONS]
|
||||
```
|
||||
|
||||
## Options
|
||||
@@ -20,7 +20,7 @@ Any two of `-z`, `--evidence-bits`, `--fp` may be given; the third is derived us
|
||||
## Comparing an index with random sharing
|
||||
|
||||
```bash
|
||||
obikmer estimate --index INDEX [--presence-threshold N] [-o FILE]
|
||||
obiskim estimate --index INDEX [--presence-threshold N] [-o FILE]
|
||||
```
|
||||
|
||||
With `--index`, `estimate` reads an existing index instead of computing approximate-index parameters, and it cannot be combined with `-k`, `-z`, `--evidence-bits` or `--fp`. 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 $k$ (see [K-mer size](../theory/kmer_indexing/kmers.md)).
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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.
|
||||
|
||||
```bash
|
||||
obikmer filter SOURCE -o OUTPUT [OPTIONS]
|
||||
obiskim filter SOURCE -o OUTPUT [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Build a genome index from one or more sequence files. Construction proceeds in phases (scatter → dereplicate → count → layered MPHF), described in [On-disk storage](../formats/index_layout.md).
|
||||
|
||||
```bash
|
||||
obikmer index -o OUTPUT [OPTIONS] [INPUTS...]
|
||||
obiskim index -o OUTPUT [OPTIONS] [INPUTS...]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Merge multiple built indexes into a single index.
|
||||
|
||||
```bash
|
||||
obikmer merge -o OUTPUT SOURCE... [OPTIONS]
|
||||
obiskim merge -o OUTPUT SOURCE... [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pack an index's per-column matrix files into a single-file format to reduce query-time I/O (fewer file opens per query).
|
||||
|
||||
```bash
|
||||
obikmer pack INDEX [--sparse]
|
||||
obiskim pack INDEX [--sparse]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -10,7 +10,7 @@ Distance matrices can be used to build Neighbor-Joining or UPGMA trees. SNP-base
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
obikmer phylo INDEX [OPTIONS]
|
||||
obiskim phylo INDEX [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
@@ -70,7 +70,7 @@ SNP-based analyses can use every eligible variable family, or a sample drawn fro
|
||||
|
||||
`--n-sites`, `--free-loss`, `--no-ambiguity`, `--quartet`, `--pair-balance`, `--entropy`/`--entropy-sd` are shared by `--pseudo-alignment`, `--sankoff` (and everything it implies: `--tnt`/`--phyg`/`--iqtree`), and a `snp-*` `--distance` value — one draw feeds all of them in a single invocation. `--n-sites` is mandatory for `--pseudo-alignment`/`--sankoff`, where it takes either a number of sites or `all`; for a `snp-*` `--distance` value it is optional, and omitting it is the same as `all` (every non-monomorphic family in the index, not an approximation).
|
||||
|
||||
Combining `--sankoff` (or `--tnt`/`--phyg`/`--iqtree`) with a `snp-*` `--distance` 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 *identical* 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 `obikmer phylo` invocations draws two independent samples even with the same flags.
|
||||
Combining `--sankoff` (or `--tnt`/`--phyg`/`--iqtree`) with a `snp-*` `--distance` 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 *identical* 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 `obiskim phylo` invocations draws two independent samples even with the same flags.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -42,5 +42,5 @@ A rank-qualified query, `key@rank=value`, matches only when the path's segment a
|
||||
### Example
|
||||
|
||||
```bash
|
||||
obikmer filter source -o output --ingroup "taxon~/Betulaceae/Betula"
|
||||
obiskim filter source -o output --ingroup "taxon~/Betulaceae/Betula"
|
||||
```
|
||||
@@ -3,7 +3,7 @@
|
||||
Query an index with sequences and annotate each query with the kmer matches found.
|
||||
|
||||
```bash
|
||||
obikmer query INDEX INPUTS... [OPTIONS]
|
||||
obiskim query INDEX INPUTS... [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Project and/or aggregate the genome columns of an index into a new index. Where [`filter`](filter.md) selects rows (kmers), `select` operates on columns (genomes): grouping several genomes into one aggregated column, reordering columns, or dropping some.
|
||||
|
||||
```bash
|
||||
obikmer select SOURCE --output OUTPUT [OPTIONS]
|
||||
obiskim select SOURCE --output OUTPUT [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
@@ -42,7 +42,7 @@ At least one output column must be defined; every name listed in `--select` must
|
||||
To replace an index with a selected version of itself, select to a temporary directory and swap it in:
|
||||
|
||||
```bash
|
||||
obikmer select INDEX --output INDEX.tmp --group ... --group-op ... --select ...
|
||||
obiskim select INDEX --output INDEX.tmp --group ... --group-op ... --select ...
|
||||
rm -rf INDEX
|
||||
mv INDEX.tmp INDEX
|
||||
```
|
||||
@@ -3,7 +3,7 @@
|
||||
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.
|
||||
|
||||
```bash
|
||||
obikmer superkmer [OPTIONS] [INPUTS...]
|
||||
obiskim superkmer [OPTIONS] [INPUTS...]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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.
|
||||
|
||||
```bash
|
||||
obikmer unitig INDEX [OPTIONS]
|
||||
obiskim unitig INDEX [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Miscellaneous index maintenance and inspection utilities.
|
||||
|
||||
```bash
|
||||
obikmer utils INDEXES... [OPTIONS]
|
||||
obiskim utils INDEXES... [OPTIONS]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
Reference in new issue
Block a user