mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch a bug leading to loose taxonomical identification (set to root) when best_id = 1
Former-commit-id: 8eb4f95d4df774563f5a5fe17d2c9c8836361caa
This commit is contained in:
@ -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
|
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)
|
bests, differences, identity, bestmatch, seqidxs := FindClosests(sequence, references, refcounts, runExact)
|
||||||
taxon := (*obitax.TaxNode)(nil)
|
taxon := (*obitax.TaxNode)(nil)
|
||||||
|
|
||||||
if identity >= 0.5 && differences > 0 {
|
if identity >= 0.5 && differences >= 0 {
|
||||||
newidx := 0
|
newidx := 0
|
||||||
for i, best := range bests {
|
for i, best := range bests {
|
||||||
idx := best.OBITagRefIndex()
|
idx := best.OBITagRefIndex()
|
||||||
|
Reference in New Issue
Block a user