Patch a bug in ngsfilter reading and sample matching

This commit is contained in:
2022-09-28 14:29:19 +02:00
parent ebefa28cc0
commit fe5d8e3340
2 changed files with 6 additions and 5 deletions

View File

@ -54,8 +54,8 @@ func _parseMainNGSFilterTags(text string) obingslibrary.TagPair {
}
return obingslibrary.TagPair{
Forward: tags[0],
Reverse: tags[1],
Forward: strings.ToLower(tags[0]),
Reverse: strings.ToLower(tags[1]),
}
}

View File

@ -3,9 +3,10 @@ package obingslibrary
import (
"errors"
"fmt"
log "github.com/sirupsen/logrus"
"strings"
log "github.com/sirupsen/logrus"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiapat"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
)
@ -110,7 +111,7 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
if len(match) > 0 {
sseq := sequence.String()
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{
ForwardMatch: direct,
@ -193,7 +194,7 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
} else {
ftag = ftag.ReverseComplement(true)
sftag = ftag.String()
sftag = strings.ToLower(ftag.String())
}
m.ForwardMatch = direct.String()