From c6e939cfd5ce1c5ba5a22e545b83c0e10afbd4f6 Mon Sep 17 00:00:00 2001 From: John Elizarraras Date: Thu, 16 Nov 2023 17:10:11 -0600 Subject: [PATCH] fix rank percentile denominator --- webgestalt_lib/src/methods/multiomics.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webgestalt_lib/src/methods/multiomics.rs b/webgestalt_lib/src/methods/multiomics.rs index 533628e..2215a92 100644 --- a/webgestalt_lib/src/methods/multiomics.rs +++ b/webgestalt_lib/src/methods/multiomics.rs @@ -248,11 +248,12 @@ fn normalize(list: &mut Vec, method: NormalizationMethod) -> Vec = Vec::new(); for (i, item) in list.iter().enumerate() { final_list.push(RankListItem { analyte: item.analyte.clone(), - rank: (i as f64 - median) / median, + rank: (i as f64 - median) / len, }); } final_list