From 82040dbe555f5baef2d3ee98e8b5561ade16448d Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Thu, 30 Nov 2023 13:07:51 +0100 Subject: [PATCH] Patch a bug leading to loose taxonomical identification (set to root) when best_id = 1 Former-commit-id: 8eb4f95d4df774563f5a5fe17d2c9c8836361caa --- pkg/obitools/obitag/obitag.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/obitools/obitag/obitag.go b/pkg/obitools/obitag/obitag.go index 95e8fa5..d85fbdb 100644 --- a/pkg/obitools/obitag/obitag.go +++ b/pkg/obitools/obitag/obitag.go @@ -146,7 +146,7 @@ func FindClosests(sequence *obiseq.BioSequence, } - log.Debugln("Closest Match", sequence.Id(), maxe, bestId, bestidxs, len(bests)) + // log.Debugln("Closest Match", sequence.Id(), maxe, bestId, bestidxs, len(bests)) return bests, maxe, bestId, bestmatch, bestidxs } @@ -171,7 +171,7 @@ func Identify(sequence *obiseq.BioSequence, bests, differences, identity, bestmatch, seqidxs := FindClosests(sequence, references, refcounts, runExact) taxon := (*obitax.TaxNode)(nil) - if identity >= 0.5 && differences > 0 { + if identity >= 0.5 && differences >= 0 { newidx := 0 for i, best := range bests { idx := best.OBITagRefIndex()