mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Change path of the obitools pkg
Former-commit-id: 311cbf8df3b990b393c6f4885d62e74564423b65
This commit is contained in:
@ -3,14 +3,14 @@ package obicorazick
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"github.com/rrethy/ahocorasick"
|
||||
)
|
||||
|
||||
func AhoCorazickWorker(slot string, patterns []string) obiseq.SeqWorker {
|
||||
|
||||
matcher := ahocorasick.CompileStrings(patterns)
|
||||
|
||||
|
||||
fslot := slot + "_Fwd"
|
||||
rslot := slot + "_Rev"
|
||||
|
||||
@ -18,7 +18,7 @@ func AhoCorazickWorker(slot string, patterns []string) obiseq.SeqWorker {
|
||||
matchesF := len(matcher.FindAllByteSlice(s.Sequence()))
|
||||
matchesR := len(matcher.FindAllByteSlice(s.ReverseComplement(false).Sequence()))
|
||||
|
||||
log.Debugln("Macthes = ",matchesF,matchesR)
|
||||
log.Debugln("Macthes = ", matchesF, matchesR)
|
||||
matches := matchesF + matchesR
|
||||
if matches > 0 {
|
||||
s.SetAttribute(slot, matches)
|
||||
|
Reference in New Issue
Block a user