From f3410317531e7b8d21dad07f0f0184f4d0d3fb56 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Wed, 22 Jun 2022 19:09:21 +0200 Subject: [PATCH] ranking: Fix total weight calculation --- R/ranking.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/ranking.R b/R/ranking.R index 2309ef3..7d5f089 100644 --- a/R/ranking.R +++ b/R/ranking.R @@ -21,9 +21,9 @@ rank_genes <- function(cross_sample_metric = "above_95", cross_sample_weight = 0.5, mean_expression_weight = 0.25, sd_expression_weight = -0.25) { - total_weight <- cross_sample_weight + - mean_expression_weight + - sd_expression_weight + total_weight <- abs(cross_sample_weight) + + abs(mean_expression_weight) + + abs(sd_expression_weight) data <- copy(ubigen::genes)