mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
obitag bug
Former-commit-id: e6f8750d8db74c0b175c4a93d5b58bd84f293d52
This commit is contained in:
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## Latest changes
|
## Latest changes
|
||||||
|
|
||||||
|
### Bug
|
||||||
|
|
||||||
|
- In `obitag`, correct the wrong assignation of the **obitag_bestmatch** attribute.
|
||||||
|
|
||||||
## April 2nd, 2024. Release 4.2.0
|
## April 2nd, 2024. Release 4.2.0
|
||||||
|
|
||||||
### New feature
|
### New feature
|
||||||
|
@ -120,6 +120,7 @@ func FindClosests(sequence *obiseq.BioSequence,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if lcs >= 0 {
|
||||||
//
|
//
|
||||||
// We have found a better candidate than never
|
// We have found a better candidate than never
|
||||||
//
|
//
|
||||||
@ -130,6 +131,7 @@ func FindClosests(sequence *obiseq.BioSequence,
|
|||||||
maxe = score // Memorize the best scores
|
maxe = score // Memorize the best scores
|
||||||
wordmin = max(0, max(sequence.Len(), ref.Len())-3-4*maxe)
|
wordmin = max(0, max(sequence.Len(), ref.Len())-3-4*maxe)
|
||||||
bestId = float64(lcs) / float64(alilength)
|
bestId = float64(lcs) / float64(alilength)
|
||||||
|
bestmatch = ref.Id()
|
||||||
// log.Warnln(sequence.Id(), ref.Id(), cw[order], maxe, bestId, wordmin)
|
// log.Warnln(sequence.Id(), ref.Id(), cw[order], maxe, bestId, wordmin)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +148,9 @@ func FindClosests(sequence *obiseq.BioSequence,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// log.Debugln("Closest Match", sequence.Id(), maxe, bestId, bestidxs, len(bests))
|
}
|
||||||
|
|
||||||
|
log.Debugln("Closest Match", sequence.Id(), maxe, bestId, references[bestidxs[0]].Id(), bestidxs, len(bests))
|
||||||
return bests, maxe, bestId, bestmatch, bestidxs
|
return bests, maxe, bestId, bestmatch, bestidxs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +172,7 @@ func Identify(sequence *obiseq.BioSequence,
|
|||||||
taxa obitax.TaxonSet,
|
taxa obitax.TaxonSet,
|
||||||
taxo *obitax.Taxonomy,
|
taxo *obitax.Taxonomy,
|
||||||
runExact bool) *obiseq.BioSequence {
|
runExact bool) *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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user