From f0251cbfd494ccd4cbfcfc4c345d7e0ad8ad62b3 Mon Sep 17 00:00:00 2001 From: Martin Larralde <martin.larralde@embl.de> Date: Fri, 14 Jun 2024 21:51:13 +0200 Subject: [PATCH] Use substraction in `FrequencyMatrix.to_scoring` method --- lightmotif/src/pwm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightmotif/src/pwm.rs b/lightmotif/src/pwm.rs index f00a926..a56cabb 100644 --- a/lightmotif/src/pwm.rs +++ b/lightmotif/src/pwm.rs @@ -291,7 +291,7 @@ impl<A: Alphabet> FrequencyMatrix<A> { if f <= 0.0 { dst[j] = f32::NEG_INFINITY; } else { - dst[j] = (x / f).log2(); + dst[j] = x.log2() - f.log2(); } } } -- GitLab