mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Finalyse the obimultiplex with indels
Former-commit-id: cef0ac39dac0e02d16d4bd321966a0f8a67f2c85
This commit is contained in:
@ -49,6 +49,10 @@ func FastLCSEGFScoreByte(bA, bB []byte, maxError int, endgapfree bool, buffer *[
|
|||||||
|
|
||||||
delta := lA - lB
|
delta := lA - lB
|
||||||
|
|
||||||
|
if endgapfree {
|
||||||
|
maxError += delta
|
||||||
|
}
|
||||||
|
|
||||||
// The difference of length is larger the maximum allowed errors
|
// The difference of length is larger the maximum allowed errors
|
||||||
if delta > maxError {
|
if delta > maxError {
|
||||||
return -1, -1
|
return -1, -1
|
||||||
@ -170,6 +174,9 @@ func FastLCSEGFScoreByte(bA, bB []byte, maxError int, endgapfree bool, buffer *[
|
|||||||
// score = _setout(score)
|
// score = _setout(score)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
if x == 0 || x == (even-1) {
|
||||||
|
score = _setout(score)
|
||||||
|
}
|
||||||
// // BEGINNING OF DEBUG CODE //
|
// // BEGINNING OF DEBUG CODE //
|
||||||
// if i < 2 && j < 5 {
|
// if i < 2 && j < 5 {
|
||||||
// log.Debugf("[%d,%d]\n",i,j)
|
// log.Debugf("[%d,%d]\n",i,j)
|
||||||
|
@ -370,10 +370,11 @@ func (pattern ApatPattern) BestMatch(sequence ApatSequence, begin, length int) (
|
|||||||
score, lali := obialign.FastLCSEGFScoreByte(
|
score, lali := obialign.FastLCSEGFScoreByte(
|
||||||
(*cseq)[start:end],
|
(*cseq)[start:end],
|
||||||
(*cpattern)[0:int(pattern.pointer.pointer.patlen)],
|
(*cpattern)[0:int(pattern.pointer.pointer.patlen)],
|
||||||
nerr*2, true, &buffer)
|
nerr, true, &buffer)
|
||||||
|
|
||||||
nerr = lali - score
|
nerr = lali - score
|
||||||
start = best[0] + int(pattern.pointer.pointer.patlen) - lali
|
start = best[0] + int(pattern.pointer.pointer.patlen) - lali
|
||||||
|
end = start + lali
|
||||||
log.Println("results", score, lali, start, nerr)
|
log.Println("results", score, lali, start, nerr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ func (marker *Marker) Match(sequence *obiseq.BioSequence) *DemultiplexMatch {
|
|||||||
|
|
||||||
m.ForwardMatch = direct.String()
|
m.ForwardMatch = direct.String()
|
||||||
m.ForwardTag = sftag
|
m.ForwardTag = sftag
|
||||||
m.ReverseMismatches = nerr
|
m.ForwardMismatches = nerr
|
||||||
m.BarcodeEnd = start
|
m.BarcodeEnd = start
|
||||||
|
|
||||||
sample, ok := marker.samples[TagPair{sftag, rtag}]
|
sample, ok := marker.samples[TagPair{sftag, rtag}]
|
||||||
|
Reference in New Issue
Block a user