From 418e7fc6d0d83e546a1793a74064a4edb6c6d62e Mon Sep 17 00:00:00 2001 From: Petr Danecek Date: Wed, 4 Sep 2024 10:55:54 +0100 Subject: [PATCH] Fix a bug in --strictly-novel When only one parent has the alternate read, the score was set to -inf --- plugins/trio-dnm2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/trio-dnm2.c b/plugins/trio-dnm2.c index 9e406349..63650435 100644 --- a/plugins/trio-dnm2.c +++ b/plugins/trio-dnm2.c @@ -974,7 +974,9 @@ static double process_trio_ACM(args_t *args, priors_t *priors, int nals, double int ial = *al1; if ( qs[iMOTHER][ial] + qs[iFATHER][ial] != 0 ) { - double tmp = subtract_log(0,qs[iMOTHER][ial]) + subtract_log(0,qs[iFATHER][ial]); + double tmp = 0; + if ( qs[iMOTHER][ial] ) tmp += subtract_log(0,qs[iMOTHER][ial]); + if ( qs[iFATHER][ial] ) tmp += subtract_log(0,qs[iFATHER][ial]); sum = sum_log(sum,tmp); max += tmp; #if DEBUG