Push zunrplorkwkt #70

Merged
coissac merged 93 commits from push-zunrplorkwkt into main 2026-08-28 23:15:38 +00:00
49 changed files with 62 additions and 35 deletions
Showing only changes of commit b5ec0122d0 - Show all commits
+4 -4
View File
@@ -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",
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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".
+1 -1
View File
@@ -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".
+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;
+1 -1
View File
@@ -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 }
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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)]
+1 -1
View File
@@ -1,6 +1,6 @@
use std::collections::HashMap;
use obikpartition::KmerDesc;
use obikpartitionner::KmerDesc;
use obikseq::CanonicalKmer;
use obiread::record::SeqRecord;
use obiskbuilder::SuperKmerIter;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
@@ -1,5 +1,5 @@
[package]
name = "obikpartition"
name = "obikpartitionner"
version = "0.1.0"
edition = "2024"
@@ -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
+1 -1
View File
@@ -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" }
+1 -1
View File
@@ -1,6 +1,6 @@
use std::sync::Arc;
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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};
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -29,7 +29,7 @@ use std::sync::Arc;
use ndarray::Array2;
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -2,7 +2,7 @@ use std::sync::Arc;
use rayon::prelude::*;
use obikpartition::KmerPartitions;
use obikpartitionner::KmerPartitions;
use obisys::progress_bar;
use obikindex::KmerIndex;
+1 -1
View File
@@ -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 {