mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-10 01:30:27 +00:00
work on obiclean chimera detection
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package obialign
|
||||
|
||||
import log "github.com/sirupsen/logrus"
|
||||
import (
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// buffIndex converts a pair of coordinates (i, j) into a linear index in a matrix
|
||||
// of size width x width. The coordinates are (-1)-indexed, and the linear index
|
||||
@@ -69,7 +72,7 @@ func LocatePattern(id string, pattern, sequence []byte) (int, int, int) {
|
||||
// Mismatch score = -1
|
||||
// Match score = 0
|
||||
match := -1
|
||||
if _samenuc(pattern[j], sequence[i]) {
|
||||
if obiseq.SameIUPACNuc(pattern[j], sequence[i]) {
|
||||
match = 0
|
||||
}
|
||||
|
||||
@@ -103,7 +106,7 @@ func LocatePattern(id string, pattern, sequence []byte) (int, int, int) {
|
||||
// Mismatch score = -1
|
||||
// Match score = 0
|
||||
match := -1
|
||||
if _samenuc(pattern[jmax], sequence[i]) {
|
||||
if obiseq.SameIUPACNuc(pattern[jmax], sequence[i]) {
|
||||
match = 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user