Rename obikpartition crate to obikpartitionner

Update all dependent crates and internal imports to reference the renamed module. Expose configuration parameters and genome metadata through new public accessor methods in the index API, and update documentation comments to align with the new package name.
This commit is contained in:
Eric Coissac
2026-08-20 19:43:00 +02:00
parent f64ac14f0e
commit b5ec0122d0
49 changed files with 62 additions and 35 deletions
+1 -1
View File
@@ -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" }
+1 -1
View File
@@ -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`.
+28 -1
View File
@@ -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()
}
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -1,6 +1,6 @@
use std::collections::HashMap;
use obikpartition::GroupQuorumFilter;
use obikpartitionner::GroupQuorumFilter;
use obitaxonomy::{TaxPath, TaxPattern};
use crate::meta::{GenomeInfo, IndexMeta};
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -1,4 +1,4 @@
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obilayeredmap::{IndexMode, layer::Layer};
use obisys::{Reporter, Stage, progress_bar};
use std::fs;
+1 -1
View File
@@ -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;