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:
@@ -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" }
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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,6 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use obikpartition::GroupQuorumFilter;
|
||||
use obikpartitionner::GroupQuorumFilter;
|
||||
use obitaxonomy::{TaxPath, TaxPattern};
|
||||
|
||||
use crate::meta::{GenomeInfo, IndexMeta};
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
use obikpartition::KmerPartitions;
|
||||
use obikpartitionner::KmerPartitions;
|
||||
use obilayeredmap::{IndexMode, layer::Layer};
|
||||
use obisys::{Reporter, Stage, progress_bar};
|
||||
use std::fs;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user