mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
rename goutils to obiutils
Former-commit-id: 2147f53db972bba571dfdae30c51b62d3e69cec5
This commit is contained in:
@ -13,9 +13,9 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/goutils"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obialign"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiutils"
|
||||
)
|
||||
|
||||
var _MaxPatLen = int(C.MAX_PAT_LEN)
|
||||
@ -355,8 +355,8 @@ func (pattern ApatPattern) BestMatch(sequence ApatSequence, begin, length int) (
|
||||
|
||||
start = best[0] - nerr
|
||||
end = best[0] + int(pattern.pointer.pointer.patlen) + nerr
|
||||
start = goutils.MaxInt(start, 0)
|
||||
end = goutils.MinInt(end, sequence.Len())
|
||||
start = obiutils.MaxInt(start, 0)
|
||||
end = obiutils.MinInt(end, sequence.Len())
|
||||
|
||||
cpattern := (*[1 << 30]byte)(unsafe.Pointer(pattern.pointer.pointer.cpat))
|
||||
cseq := (*[1 << 30]byte)(unsafe.Pointer(sequence.pointer.pointer.cseq))
|
||||
@ -374,7 +374,7 @@ func (pattern ApatPattern) BestMatch(sequence ApatSequence, begin, length int) (
|
||||
|
||||
nerr = lali - score
|
||||
start = best[0] + int(pattern.pointer.pointer.patlen) - lali
|
||||
end = start + lali
|
||||
end = start + lali
|
||||
log.Debugln("results", score, lali, start, nerr)
|
||||
return
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ package obiapat
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/goutils"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiutils"
|
||||
)
|
||||
|
||||
type _Options struct {
|
||||
@ -210,7 +210,7 @@ func _Pcr(seq ApatSequence,
|
||||
reverse := opt.pointer.reverse
|
||||
crev := opt.pointer.crev
|
||||
|
||||
forwardMatches := forward.FindAllIndex(seq,0,-1)
|
||||
forwardMatches := forward.FindAllIndex(seq, 0, -1)
|
||||
|
||||
if len(forwardMatches) > 0 {
|
||||
|
||||
@ -256,7 +256,7 @@ func _Pcr(seq ApatSequence,
|
||||
(opt.MaxLength() == 0 || length <= opt.MaxLength()) {
|
||||
amplicon, _ := sequence.Subsequence(fm[1], rm[0], opt.pointer.circular)
|
||||
annot := amplicon.Annotations()
|
||||
goutils.MustFillMap(annot, sequence.Annotations())
|
||||
obiutils.MustFillMap(annot, sequence.Annotations())
|
||||
annot["forward_primer"] = forward.String()
|
||||
|
||||
match, _ := sequence.Subsequence(fm[0], fm[1], opt.pointer.circular)
|
||||
@ -284,7 +284,7 @@ func _Pcr(seq ApatSequence,
|
||||
}
|
||||
}
|
||||
|
||||
forwardMatches = reverse.FindAllIndex(seq,0,-1)
|
||||
forwardMatches = reverse.FindAllIndex(seq, 0, -1)
|
||||
if forwardMatches != nil {
|
||||
|
||||
begin := forwardMatches[0][0]
|
||||
@ -331,7 +331,7 @@ func _Pcr(seq ApatSequence,
|
||||
amplicon = amplicon.ReverseComplement(true)
|
||||
|
||||
annot := amplicon.Annotations()
|
||||
goutils.MustFillMap(annot, sequence.Annotations())
|
||||
obiutils.MustFillMap(annot, sequence.Annotations())
|
||||
annot["forward_primer"] = forward.String()
|
||||
|
||||
match, _ := sequence.Subsequence(rm[0], rm[1], opt.pointer.circular)
|
||||
|
Reference in New Issue
Block a user