mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
few small correction
Former-commit-id: 9319387ef5379b66e008233dbd7b6ea60b5d3b1e
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package obiiter
|
||||
|
||||
import (
|
||||
"log"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func (b BioSequenceBatch) IsPaired() bool {
|
||||
|
@ -182,6 +182,11 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
|
||||
return &m
|
||||
}
|
||||
|
||||
//
|
||||
// At this point the forward primer didn't match.
|
||||
// We try now with the reverse primer
|
||||
//
|
||||
|
||||
start, end, nerr, matched = marker.reverse.BestMatch(aseq, marker.taglength, -1)
|
||||
|
||||
if matched {
|
||||
|
@ -124,7 +124,7 @@ func SplitPattern(sequence *obiseq.BioSequence,
|
||||
matches := LocatePatterns(sequence, patterns)
|
||||
|
||||
from := Pattern_match{
|
||||
name: "5extremity",
|
||||
name: "extremity",
|
||||
pattern: "",
|
||||
match: "",
|
||||
begin: 0,
|
||||
@ -169,10 +169,19 @@ func SplitPattern(sequence *obiseq.BioSequence,
|
||||
if from.name == to.name {
|
||||
sub.SetAttribute("obisplit_group", from.name)
|
||||
} else {
|
||||
sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", from.name, to.name))
|
||||
fname := from.name
|
||||
tname := to.name
|
||||
if tname == "extremity" {
|
||||
fname, tname = tname, fname
|
||||
} else {
|
||||
if tname < fname && fname != "extremity" {
|
||||
fname, tname = tname, fname
|
||||
}
|
||||
}
|
||||
sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", fname, tname))
|
||||
}
|
||||
|
||||
sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start, end))
|
||||
sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start+1, end))
|
||||
|
||||
sub.SetAttribute("obisplit_right_error", to.nerrors)
|
||||
sub.SetAttribute("obisplit_left_error", from.nerrors)
|
||||
@ -191,7 +200,7 @@ func SplitPattern(sequence *obiseq.BioSequence,
|
||||
|
||||
if from.end < sequence.Len() {
|
||||
to := Pattern_match{
|
||||
name: "3extremity",
|
||||
name: "extremity",
|
||||
pattern: "",
|
||||
match: "",
|
||||
begin: sequence.Len(),
|
||||
@ -218,9 +227,18 @@ func SplitPattern(sequence *obiseq.BioSequence,
|
||||
if from.name == to.name {
|
||||
sub.SetAttribute("obisplit_group", from.name)
|
||||
} else {
|
||||
sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", from.name, to.name))
|
||||
fname := from.name
|
||||
tname := to.name
|
||||
if tname == "extremity" {
|
||||
fname, tname = tname, fname
|
||||
} else {
|
||||
if tname < fname && fname != "extremity" {
|
||||
fname, tname = tname, fname
|
||||
}
|
||||
}
|
||||
sub.SetAttribute("obisplit_group", fmt.Sprintf("%s-%s", fname, tname))
|
||||
}
|
||||
sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start, end))
|
||||
sub.SetAttribute("obisplit_location", fmt.Sprintf("%d..%d", start+1, end))
|
||||
|
||||
sub.SetAttribute("obisplit_right_error", to.nerrors)
|
||||
sub.SetAttribute("obisplit_left_error", from.nerrors)
|
||||
|
Reference in New Issue
Block a user