mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Change the API of workers
Former-commit-id: 9b07306edd8cf28266f86f95823948fa99d39ea9
This commit is contained in:
@ -14,7 +14,7 @@ func AhoCorazickWorker(slot string, patterns []string) obiseq.SeqWorker {
|
||||
fslot := slot + "_Fwd"
|
||||
rslot := slot + "_Rev"
|
||||
|
||||
f := func(s *obiseq.BioSequence) *obiseq.BioSequence {
|
||||
f := func(s *obiseq.BioSequence) (obiseq.BioSequenceSlice, error) {
|
||||
matchesF := len(matcher.FindAllByteSlice(s.Sequence()))
|
||||
matchesR := len(matcher.FindAllByteSlice(s.ReverseComplement(false).Sequence()))
|
||||
|
||||
@ -26,7 +26,7 @@ func AhoCorazickWorker(slot string, patterns []string) obiseq.SeqWorker {
|
||||
s.SetAttribute(rslot, matchesR)
|
||||
}
|
||||
|
||||
return s
|
||||
return obiseq.BioSequenceSlice{s}, nil
|
||||
}
|
||||
|
||||
return f
|
||||
|
Reference in New Issue
Block a user