feat: add phylogenetic sampling, masking, and plain FASTA writer

Introduces configurable phylogenetic sampling and masking controls via new CLI flags (`--subsample`, `--entropy`, `--exclude-genome`, etc.). Adds a complete SNP pseudo-alignment pipeline featuring entropy-biased Gaussian sampling, post-hoc state masking, and proportional per-layer filtering. Extends the FASTA writer with a `write_plain_record` API for bare-header output without JSON annotations.
This commit is contained in:
Eric Coissac committed 2026-08-28 20:54:51 +02:00
1 parent 5a0b71d105
commit beb2951c20
12 files changed
+768 -27

No files matched your search

+14 -3
View File
@@ -7,19 +7,30 @@
//!
//! [`annex`] builds the sibling-count/minorant annex itself; [`family_scan`]
//! is the shared cross-partition traversal every other consumer
//! (`entropy`, and future ones — cardinality, alignment, stats) is built
//! on; [`minorant_selection`] and [`entropy`] are the first such consumer.
//! (`entropy`, [`subsample`], [`alignment`], and future ones — cardinality,
//! stats) is built on; [`minorant_selection`] is the cheap annex-only
//! groundwork both `entropy` and `subsample` share; [`masking`] is
//! `subsample`/`alignment`'s shared post-hoc survival check and character
//! encoding.
mod alignment;
mod annex;
mod entropy;
mod family_scan;
mod masking;
mod minorant_selection;
mod subsample;
use obikidxcache::index_cache::IndexCache;
pub use alignment::SnpAlignment;
pub use subsample::EntropyBias;
pub(crate) use alignment::snp_pseudo_alignment;
pub(crate) use annex::build_layer_sibling_annex;
pub(crate) use entropy::{ensure_layer_entropy_annex, family_entropy, family_entropy_4};
pub(crate) use entropy::{ensure_layer_entropy_annex, family_entropy, family_entropy_4, iter_full_entropy};
pub(crate) use family_scan::{Selection, scan_layer_families};
pub(crate) use subsample::sample_index;
/// Whether every layer number in `cache` fits in a `FamilyMask` field
/// (`< 7`) — a single fact about the whole index, decided once here so