diff --git a/src/Cargo.lock b/src/Cargo.lock index e77fa39b..b90d56a3 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1600,7 +1600,7 @@ dependencies = [ "indicatif", "ndarray", "obicompactvec", - "obikpartition", + "obikpartitionner", "obikseq", "obilayeredmap", "obiread", @@ -1626,7 +1626,7 @@ dependencies = [ "obidebruinj", "obifastwrite", "obikindex", - "obikpartition", + "obikpartitionner", "obikphylo", "obikrope", "obikseq", @@ -1648,7 +1648,7 @@ dependencies = [ ] [[package]] -name = "obikpartition" +name = "obikpartitionner" version = "0.1.0" dependencies = [ "cacheline-ef", @@ -1685,7 +1685,7 @@ dependencies = [ "ndarray", "obicompactvec", "obikindex", - "obikpartition", + "obikpartitionner", "obikseq", "obilayeredmap", "obipipeline", diff --git a/src/Cargo.toml b/src/Cargo.toml index 54b49f0e..f34f6918 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -1,5 +1,5 @@ [workspace] resolver = "3" -members = ["obikseq", "obiread", "obiskbuilder", "obifastwrite", "obikmer","obikrope","obipipeline", "obikpartition","obiskio","obidebruinj","obilayeredmap", "obicompactvec", "obisys", "obikindex", "obitaxonomy", "obikentropy", "obikphylo"] +members = ["obikseq", "obiread", "obiskbuilder", "obifastwrite", "obikmer","obikrope","obipipeline", "obikpartitionner","obiskio","obidebruinj","obilayeredmap", "obicompactvec", "obisys", "obikindex", "obitaxonomy", "obikentropy", "obikphylo"] [profile.release] debug = 1 diff --git a/src/obicompactvec/src/bitmatrix/packed.rs b/src/obicompactvec/src/bitmatrix/packed.rs index bc1d3b9b..fcae6466 100644 --- a/src/obicompactvec/src/bitmatrix/packed.rs +++ b/src/obicompactvec/src/bitmatrix/packed.rs @@ -129,7 +129,7 @@ pub fn pack_bit_matrix(dir: &Path) -> io::Result<()> { // A `matrix.pbmx` can already exist here even though columnar data is // still pending — e.g. copied verbatim from a merge's base source // before this layer was widened with more genome columns (see - // `obikpartition::merge_partition`). Only skip (re-)packing if the + // `obikpartitionner::merge_partition`). Only skip (re-)packing if the // existing file already reflects the current column count; otherwise // the columnar files are newer and must be (re-)packed, overwriting the // stale one — never silently discarded as "leftover cleanup". diff --git a/src/obicompactvec/src/intmatrix.rs b/src/obicompactvec/src/intmatrix.rs index 96072be0..2131e461 100644 --- a/src/obicompactvec/src/intmatrix.rs +++ b/src/obicompactvec/src/intmatrix.rs @@ -232,7 +232,7 @@ pub fn pack_compact_int_matrix(dir: &Path) -> io::Result<()> { // A `matrix.pcmx` can already exist here even though columnar data is // still pending — e.g. copied verbatim from a merge's base source // before this layer was widened with more genome columns (see - // `obikpartition::merge_partition`). Only skip (re-)packing if the + // `obikpartitionner::merge_partition`). Only skip (re-)packing if the // existing file already reflects the current column count; otherwise // the columnar files are newer and must be (re-)packed, overwriting the // stale one — never silently discarded as "leftover cleanup". diff --git a/src/obikindex/Cargo.toml b/src/obikindex/Cargo.toml index ae8bda1f..e0707278 100644 --- a/src/obikindex/Cargo.toml +++ b/src/obikindex/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" [dependencies] obikseq = { path = "../obikseq" } -obikpartition = { path = "../obikpartition" } +obikpartitionner = { path = "../obikpartitionner" } obitaxonomy = { path = "../obitaxonomy" } obiskio = { path = "../obiskio" } obisys = { path = "../obisys" } diff --git a/src/obikindex/src/dump.rs b/src/obikindex/src/dump.rs index f5310ff8..756243fb 100644 --- a/src/obikindex/src/dump.rs +++ b/src/obikindex/src/dump.rs @@ -5,7 +5,7 @@ use rayon::prelude::*; use crate::error::{OKIError, OKIResult}; use crate::index::KmerIndex; -use obikpartition::KmerFilter; +use obikpartitionner::KmerFilter; impl KmerIndex { /// Write a CSV table of all indexed kmers to `out`. diff --git a/src/obikindex/src/index.rs b/src/obikindex/src/index.rs index 47e3ee16..b8e973ad 100644 --- a/src/obikindex/src/index.rs +++ b/src/obikindex/src/index.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use std::fs; use std::path::{Path, PathBuf}; -use obikpartition::{KmerPartitions, KmerSpectrum, PARTITIONS_SUBDIR}; +use obikpartitionner::{KmerPartitions, KmerSpectrum, PARTITIONS_SUBDIR}; use obisys::{Reporter, Stage, progress_bar}; use rayon::prelude::*; use tracing::info; @@ -157,6 +157,33 @@ impl KmerIndex { pub fn minimizer_size(&self) -> usize { self.meta.config.minimizer_size } + pub fn n_bits(&self) -> usize { + self.meta.config.n_bits + } + pub fn with_counts(&self) -> bool { + self.meta.config.with_counts + } + pub fn evidence_mode(&self) -> &obilayeredmap::IndexMode { + &self.meta.config.evidence + } + /// Coarse evidence mode (`Exact`/`Approx`/`Hybrid`, no `b`/`z` + /// parameters) — see [`evidence_mode`](Self::evidence_mode) for the + /// full `IndexMode`. Same discriminant as `Layer::evidence_kind`, so a + /// layer's own evidence kind can be compared directly against the + /// index's. + pub fn evidence_kind(&self) -> obilayeredmap::EvidenceKind { + match self.meta.config.evidence { + obilayeredmap::IndexMode::Exact => obilayeredmap::EvidenceKind::Exact, + obilayeredmap::IndexMode::Approx { .. } => obilayeredmap::EvidenceKind::Approx, + obilayeredmap::IndexMode::Hybrid { .. } => obilayeredmap::EvidenceKind::Hybrid, + } + } + pub fn block_bits(&self) -> u8 { + self.meta.config.block_bits + } + pub fn genomes(&self) -> &[GenomeInfo] { + &self.meta.genomes + } pub fn n_partitions(&self) -> usize { self.partition.n_partitions() } diff --git a/src/obikindex/src/merge.rs b/src/obikindex/src/merge.rs index 8943d9fe..444dc487 100644 --- a/src/obikindex/src/merge.rs +++ b/src/obikindex/src/merge.rs @@ -13,7 +13,7 @@ use crate::index::KmerIndex; use crate::meta::{GenomeInfo, IndexMeta}; use crate::state::{IndexState, SENTINEL_INDEXED}; -pub use obikpartition::MergeMode; +pub use obikpartitionner::MergeMode; // ── per-partition diagnostic record ────────────────────────────────────────── @@ -193,7 +193,7 @@ impl KmerIndex { let block_bits = dst.meta.config.block_bits; // Pre-build source list once (avoid rebuilding per partition) - let srcs: Vec<(&obikpartition::KmerPartitions, usize)> = remaining_sources + let srcs: Vec<(&obikpartitionner::KmerPartitions, usize)> = remaining_sources .iter() .map(|s| (&s.partition, s.meta.genomes.len())) .collect(); diff --git a/src/obikindex/src/predicate.rs b/src/obikindex/src/predicate.rs index 842f4534..b98286ef 100644 --- a/src/obikindex/src/predicate.rs +++ b/src/obikindex/src/predicate.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use obikpartition::GroupQuorumFilter; +use obikpartitionner::GroupQuorumFilter; use obitaxonomy::{TaxPath, TaxPattern}; use crate::meta::{GenomeInfo, IndexMeta}; diff --git a/src/obikindex/src/rebuild.rs b/src/obikindex/src/rebuild.rs index 06d4e052..3db37f2f 100644 --- a/src/obikindex/src/rebuild.rs +++ b/src/obikindex/src/rebuild.rs @@ -1,6 +1,6 @@ use std::path::Path; -use obikpartition::{KmerFilter, MergeMode}; +use obikpartitionner::{KmerFilter, MergeMode}; use obisys::{Reporter, Stage, progress_bar}; use tracing::info; diff --git a/src/obikindex/src/reindex.rs b/src/obikindex/src/reindex.rs index b8d9ab56..a58f6dee 100644 --- a/src/obikindex/src/reindex.rs +++ b/src/obikindex/src/reindex.rs @@ -1,4 +1,4 @@ -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obilayeredmap::{IndexMode, layer::Layer}; use obisys::{Reporter, Stage, progress_bar}; use std::fs; diff --git a/src/obikindex/src/select.rs b/src/obikindex/src/select.rs index 350e4f85..1f6591f5 100644 --- a/src/obikindex/src/select.rs +++ b/src/obikindex/src/select.rs @@ -1,6 +1,6 @@ use std::path::Path; -use obikpartition::{KmerPartitions, OutputCol}; +use obikpartitionner::{KmerPartitions, OutputCol}; use obisys::{Reporter, Stage, progress_bar}; use tracing::info; diff --git a/src/obikmer/Cargo.toml b/src/obikmer/Cargo.toml index 3a5434b1..bec904c2 100644 --- a/src/obikmer/Cargo.toml +++ b/src/obikmer/Cargo.toml @@ -15,7 +15,7 @@ obifastwrite = { path = "../obifastwrite" } obidebruinj = { path = "../obidebruinj" } obipipeline = { path = "../obipipeline" } obikrope = { path = "../obikrope" } -obikpartition = { path = "../obikpartition" } +obikpartitionner = { path = "../obikpartitionner" } obisys = { path = "../obisys" } obiskio = { path = "../obiskio" } obikindex = { path = "../obikindex", default-features = false } diff --git a/src/obikmer/src/cmd/filter/mod.rs b/src/obikmer/src/cmd/filter/mod.rs index 0edce233..b2ca626a 100644 --- a/src/obikmer/src/cmd/filter/mod.rs +++ b/src/obikmer/src/cmd/filter/mod.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use clap::Args; use obikindex::{KmerIndex, MergeMode}; -use obikpartition::filter::{MaxTotalCount, MinComplexity, MinTotalCount}; +use obikpartitionner::filter::{MaxTotalCount, MinComplexity, MinTotalCount}; use obisys::Reporter; use tracing::info; diff --git a/src/obikmer/src/cmd/predicate.rs b/src/obikmer/src/cmd/predicate.rs index 5cb786c2..6d0f953e 100644 --- a/src/obikmer/src/cmd/predicate.rs +++ b/src/obikmer/src/cmd/predicate.rs @@ -1,6 +1,6 @@ use clap::Args; use obikindex::{GroupFilterParams, IndexMeta, MetaPred}; -use obikpartition::KmerFilter; +use obikpartitionner::KmerFilter; /// CLI args for ingroup/outgroup filtering — embeddable in any command via `#[command(flatten)]`. #[derive(Args)] diff --git a/src/obikmer/src/cmd/query/batch.rs b/src/obikmer/src/cmd/query/batch.rs index 09b48fbb..55cd9452 100644 --- a/src/obikmer/src/cmd/query/batch.rs +++ b/src/obikmer/src/cmd/query/batch.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use obikpartition::KmerDesc; +use obikpartitionner::KmerDesc; use obikseq::CanonicalKmer; use obiread::record::SeqRecord; use obiskbuilder::SuperKmerIter; diff --git a/src/obikmer/src/cmd/query/chunk.rs b/src/obikmer/src/cmd/query/chunk.rs index f2e56fdb..509d84b1 100644 --- a/src/obikmer/src/cmd/query/chunk.rs +++ b/src/obikmer/src/cmd/query/chunk.rs @@ -1,7 +1,7 @@ use std::time::Instant; use obikindex::KmerIndex; -use obikpartition::{KmerDesc, QueryHit, QueryStats}; +use obikpartitionner::{KmerDesc, QueryHit, QueryStats}; use obikrope::Rope; use obikseq::CanonicalKmer; use obiread::record::parse_chunk; diff --git a/src/obikmer/src/cmd/select/mod.rs b/src/obikmer/src/cmd/select/mod.rs index 4f61960f..5f4180ad 100644 --- a/src/obikmer/src/cmd/select/mod.rs +++ b/src/obikmer/src/cmd/select/mod.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use clap::{Args, ValueEnum}; use obikindex::{IndexMeta, KmerIndex}; -use obikpartition::{AggOp, OutputCol}; +use obikpartitionner::{AggOp, OutputCol}; use obisys::Reporter; use tracing::info; diff --git a/src/obikmer/src/steps/scatter.rs b/src/obikmer/src/steps/scatter.rs index c8359260..a6b3b2f2 100644 --- a/src/obikmer/src/steps/scatter.rs +++ b/src/obikmer/src/steps/scatter.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use std::sync::atomic::{AtomicU32, AtomicU64, Ordering}; use std::time::Instant; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obipipeline::{ThrottleGuard, Throttled, throttle}; use obiread::NucPage; use obisys::spinner; diff --git a/src/obikpartition/Cargo.toml b/src/obikpartitionner/Cargo.toml similarity index 97% rename from src/obikpartition/Cargo.toml rename to src/obikpartitionner/Cargo.toml index b762afbe..310b746d 100644 --- a/src/obikpartition/Cargo.toml +++ b/src/obikpartitionner/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "obikpartition" +name = "obikpartitionner" version = "0.1.0" edition = "2024" diff --git a/src/obikpartition/src/common.rs b/src/obikpartitionner/src/common.rs similarity index 100% rename from src/obikpartition/src/common.rs rename to src/obikpartitionner/src/common.rs diff --git a/src/obikpartition/src/distance.rs b/src/obikpartitionner/src/distance.rs similarity index 100% rename from src/obikpartition/src/distance.rs rename to src/obikpartitionner/src/distance.rs diff --git a/src/obikpartition/src/dump_layer.rs b/src/obikpartitionner/src/dump_layer.rs similarity index 100% rename from src/obikpartition/src/dump_layer.rs rename to src/obikpartitionner/src/dump_layer.rs diff --git a/src/obikpartition/src/filter.rs b/src/obikpartitionner/src/filter.rs similarity index 100% rename from src/obikpartition/src/filter.rs rename to src/obikpartitionner/src/filter.rs diff --git a/src/obikpartition/src/graph_pipeline.rs b/src/obikpartitionner/src/graph_pipeline.rs similarity index 100% rename from src/obikpartition/src/graph_pipeline.rs rename to src/obikpartitionner/src/graph_pipeline.rs diff --git a/src/obikpartition/src/index_layer.rs b/src/obikpartitionner/src/index_layer.rs similarity index 100% rename from src/obikpartition/src/index_layer.rs rename to src/obikpartitionner/src/index_layer.rs diff --git a/src/obikpartition/src/kmer_sort.rs b/src/obikpartitionner/src/kmer_sort.rs similarity index 100% rename from src/obikpartition/src/kmer_sort.rs rename to src/obikpartitionner/src/kmer_sort.rs diff --git a/src/obikpartition/src/lib.rs b/src/obikpartitionner/src/lib.rs similarity index 100% rename from src/obikpartition/src/lib.rs rename to src/obikpartitionner/src/lib.rs diff --git a/src/obikpartition/src/merge_layer/mod.rs b/src/obikpartitionner/src/merge_layer/mod.rs similarity index 100% rename from src/obikpartition/src/merge_layer/mod.rs rename to src/obikpartitionner/src/merge_layer/mod.rs diff --git a/src/obikpartition/src/merge_layer/src_layer.rs b/src/obikpartitionner/src/merge_layer/src_layer.rs similarity index 100% rename from src/obikpartition/src/merge_layer/src_layer.rs rename to src/obikpartitionner/src/merge_layer/src_layer.rs diff --git a/src/obikpartition/src/partition/count.rs b/src/obikpartitionner/src/partition/count.rs similarity index 100% rename from src/obikpartition/src/partition/count.rs rename to src/obikpartitionner/src/partition/count.rs diff --git a/src/obikpartition/src/partition/dereplicate.rs b/src/obikpartitionner/src/partition/dereplicate.rs similarity index 100% rename from src/obikpartition/src/partition/dereplicate.rs rename to src/obikpartitionner/src/partition/dereplicate.rs diff --git a/src/obikpartition/src/partition/kmer_partition.rs b/src/obikpartitionner/src/partition/kmer_partition.rs similarity index 99% rename from src/obikpartition/src/partition/kmer_partition.rs rename to src/obikpartitionner/src/partition/kmer_partition.rs index e8ba9037..aad39b4f 100644 --- a/src/obikpartition/src/partition/kmer_partition.rs +++ b/src/obikpartitionner/src/partition/kmer_partition.rs @@ -197,7 +197,7 @@ impl KmerPartitions { } /// Partition `i`'s metadata (layer count, evidence mode) — the single - /// entry point for this, so that callers outside `obikpartition` + /// entry point for this, so that callers outside `obikpartitionner` /// never need to know it's a `meta.json` loaded via /// `obilayeredmap::meta::PartitionMeta`, nor handle its own recovery /// path for indexes built before that file existed (see diff --git a/src/obikpartition/src/partition/mod.rs b/src/obikpartitionner/src/partition/mod.rs similarity index 100% rename from src/obikpartition/src/partition/mod.rs rename to src/obikpartitionner/src/partition/mod.rs diff --git a/src/obikpartition/src/partition/tests.rs b/src/obikpartitionner/src/partition/tests.rs similarity index 100% rename from src/obikpartition/src/partition/tests.rs rename to src/obikpartitionner/src/partition/tests.rs diff --git a/src/obikpartition/src/query_layer.rs b/src/obikpartitionner/src/query_layer.rs similarity index 100% rename from src/obikpartition/src/query_layer.rs rename to src/obikpartitionner/src/query_layer.rs diff --git a/src/obikpartition/src/rebuild_layer.rs b/src/obikpartitionner/src/rebuild_layer.rs similarity index 100% rename from src/obikpartition/src/rebuild_layer.rs rename to src/obikpartitionner/src/rebuild_layer.rs diff --git a/src/obikpartition/src/select_layer.rs b/src/obikpartitionner/src/select_layer.rs similarity index 100% rename from src/obikpartition/src/select_layer.rs rename to src/obikpartitionner/src/select_layer.rs diff --git a/src/obikpartition/src/tests/query_layer.rs b/src/obikpartitionner/src/tests/query_layer.rs similarity index 100% rename from src/obikpartition/src/tests/query_layer.rs rename to src/obikpartitionner/src/tests/query_layer.rs diff --git a/src/obikphylo/Cargo.toml b/src/obikphylo/Cargo.toml index 38d52483..35b1f7f0 100644 --- a/src/obikphylo/Cargo.toml +++ b/src/obikphylo/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" [dependencies] obikindex = { path = "../obikindex", default-features = false } obikseq = { path = "../obikseq" } -obikpartition = { path = "../obikpartition" } +obikpartitionner = { path = "../obikpartitionner" } obiskio = { path = "../obiskio" } obisys = { path = "../obisys" } obicompactvec = { path = "../obicompactvec" } diff --git a/src/obikphylo/src/siblings/alignment.rs b/src/obikphylo/src/siblings/alignment.rs index 5f5f6ab6..754fd577 100644 --- a/src/obikphylo/src/siblings/alignment.rs +++ b/src/obikphylo/src/siblings/alignment.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obikphylo/src/siblings/build.rs b/src/obikphylo/src/siblings/build.rs index ee8d09c4..6d125e19 100644 --- a/src/obikphylo/src/siblings/build.rs +++ b/src/obikphylo/src/siblings/build.rs @@ -4,7 +4,7 @@ use std::sync::atomic::Ordering; use rayon::prelude::*; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obikseq::CanonicalKmer; use obilayeredmap::MphfLayer; use obilayeredmap::meta::IndexMode; diff --git a/src/obikphylo/src/siblings/cache.rs b/src/obikphylo/src/siblings/cache.rs index d00bdd12..8bc8f4f2 100644 --- a/src/obikphylo/src/siblings/cache.rs +++ b/src/obikphylo/src/siblings/cache.rs @@ -3,7 +3,7 @@ use rayon::prelude::*; use std::path::Path; use obicompactvec::{PersistentBitMatrix, PersistentCompactIntMatrix}; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obikseq::CanonicalKmer; use obilayeredmap::meta::IndexMode; use obilayeredmap::{Layer, OLMResult}; diff --git a/src/obikphylo/src/siblings/cardinality.rs b/src/obikphylo/src/siblings/cardinality.rs index 6f296d24..211a1f63 100644 --- a/src/obikphylo/src/siblings/cardinality.rs +++ b/src/obikphylo/src/siblings/cardinality.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use ndarray::Array2; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obikphylo/src/siblings/distance.rs b/src/obikphylo/src/siblings/distance.rs index 9426bd2c..8b8b15e6 100644 --- a/src/obikphylo/src/siblings/distance.rs +++ b/src/obikphylo/src/siblings/distance.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use ndarray::Array2; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obikphylo/src/siblings/entropy.rs b/src/obikphylo/src/siblings/entropy.rs index 1d1140b0..16aef5e3 100644 --- a/src/obikphylo/src/siblings/entropy.rs +++ b/src/obikphylo/src/siblings/entropy.rs @@ -13,7 +13,7 @@ use std::io::{BufWriter, Write}; use std::path::{Path, PathBuf}; use std::sync::Arc; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obikphylo/src/siblings/sankoff_bundle.rs b/src/obikphylo/src/siblings/sankoff_bundle.rs index 36c3dfc8..b360721b 100644 --- a/src/obikphylo/src/siblings/sankoff_bundle.rs +++ b/src/obikphylo/src/siblings/sankoff_bundle.rs @@ -29,7 +29,7 @@ use std::sync::Arc; use ndarray::Array2; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obikphylo/src/siblings/stats.rs b/src/obikphylo/src/siblings/stats.rs index dd71ccf6..2a636187 100644 --- a/src/obikphylo/src/siblings/stats.rs +++ b/src/obikphylo/src/siblings/stats.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use rayon::prelude::*; -use obikpartition::KmerPartitions; +use obikpartitionner::KmerPartitions; use obisys::progress_bar; use obikindex::KmerIndex; diff --git a/src/obilayeredmap/src/layer.rs b/src/obilayeredmap/src/layer.rs index f056375a..eea8ed81 100644 --- a/src/obilayeredmap/src/layer.rs +++ b/src/obilayeredmap/src/layer.rs @@ -33,7 +33,7 @@ pub trait LayerData: Sized { /// /// `obilayeredmap` operates within a single partition's index root; it has /// no notion of "partition" at all. Turning a partition number into that -/// root is `obikpartition::KmerPartition::part_dir`'s job, one layer up +/// root is `obikpartitionner::KmerPartition::part_dir`'s job, one layer up /// — callers here only ever name a layer *number*, never build the path /// themselves. pub fn layer_dir(root: &Path, i: usize) -> PathBuf {