mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch a bug in ngsfilter reading and sample matching
This commit is contained in:
@ -54,8 +54,8 @@ func _parseMainNGSFilterTags(text string) obingslibrary.TagPair {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return obingslibrary.TagPair{
|
return obingslibrary.TagPair{
|
||||||
Forward: tags[0],
|
Forward: strings.ToLower(tags[0]),
|
||||||
Reverse: tags[1],
|
Reverse: strings.ToLower(tags[1]),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,10 @@ package obingslibrary
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiapat"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiapat"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||||
)
|
)
|
||||||
@ -110,7 +111,7 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
|
|||||||
if len(match) > 0 {
|
if len(match) > 0 {
|
||||||
sseq := sequence.String()
|
sseq := sequence.String()
|
||||||
direct := sseq[match[0][0]:match[0][1]]
|
direct := sseq[match[0][0]:match[0][1]]
|
||||||
ftag := sseq[(match[0][0] - marker.taglength):match[0][0]]
|
ftag := strings.ToLower(sseq[(match[0][0] - marker.taglength):match[0][0]])
|
||||||
|
|
||||||
m := DemultiplexMatch{
|
m := DemultiplexMatch{
|
||||||
ForwardMatch: direct,
|
ForwardMatch: direct,
|
||||||
@ -193,7 +194,7 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
ftag = ftag.ReverseComplement(true)
|
ftag = ftag.ReverseComplement(true)
|
||||||
sftag = ftag.String()
|
sftag = strings.ToLower(ftag.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
m.ForwardMatch = direct.String()
|
m.ForwardMatch = direct.String()
|
||||||
|
Reference in New Issue
Block a user