gsva-rust 0.1.0

Pure-Rust port of the GSVA family of gene-set enrichment methods (GSVA, ssGSEA, z-score, PLAGE), validated for numeric parity against the Bioconductor GSVA package.
Documentation
//! `gsva-rust`: a pure-Rust port of the GSVA family of gene-set enrichment
//! methods — GSVA (Hänzelmann et al. 2013), ssGSEA (Barbie et al. 2009),
//! combined z-score (Lee et al. 2008), and PLAGE (Tomfohr et al. 2005) — as
//! exposed by the Bioconductor `GSVA` package, validated for numeric parity
//! against the original R implementation.
//!
//! Built with Claude Code (Anthropic). See the README for the AI-assistance
//! disclosure and licensing (Artistic-2.0, matching upstream GSVA).
//!
//! # Quick start
//!
//! ```
//! use gsva::{ExprMatrix, GeneSet, GeneSets, GsvaParams};
//!
//! // Expression as genes × samples, stored row-major.
//! let expr = ExprMatrix::new(
//!     vec!["TP53".into(), "EGFR".into(), "MYC".into(), "PTEN".into()],
//!     vec!["sample1".into(), "sample2".into(), "sample3".into()],
//!     vec![
//!         5.1, 6.2, 4.8, // TP53
//!         2.0, 9.1, 3.3, // EGFR
//!         7.7, 1.2, 8.0, // MYC
//!         4.4, 4.6, 4.5, // PTEN
//!     ],
//! );
//! let sets = GeneSets::new(vec![
//!     GeneSet::new("proliferation", vec!["MYC".into(), "EGFR".into()]),
//!     GeneSet::new("suppressors", vec!["TP53".into(), "PTEN".into()]),
//! ]);
//!
//! // The free function and the module share the name `gsva`, so call it
//! // qualified as `gsva::gsva` (or alias it on import).
//! let res = gsva::gsva(&expr, &sets, &GsvaParams::default());
//! assert_eq!(res.gene_sets, ["proliferation", "suppressors"]);
//! let _proliferation_s2 = res.score(0, 1); // (gene-set index, sample index)
//! ```
//!
//! Swap in [`ssgsea`], [`zscore`], or [`plage`] (with their `*Params`) for the
//! other methods — they share the `(&ExprMatrix, &GeneSets, &Params) ->
//! EnrichmentResult` shape.

pub mod geneset;
pub mod gsva;
pub mod io;
pub mod kcdf;
pub mod matrix;
mod par;
pub mod plage;
mod prep;
pub mod rank;
pub mod result;
pub mod ssgsea;
pub mod zscore;

pub use geneset::{GeneSet, GeneSets};
pub use gsva::{gsva, GsvaParams, Kcdf};
pub use matrix::ExprMatrix;
pub use plage::{plage, PlageParams};
pub use result::EnrichmentResult;
pub use ssgsea::{ssgsea, SsgseaParams};
pub use zscore::{zscore, ZscoreParams};