1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! `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 use ;
pub use ;
pub use ExprMatrix;
pub use ;
pub use EnrichmentResult;
pub use ;
pub use ;