mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Changes to be committed:
modified: pkg/obialign/alignment.go modified: pkg/obialign/pairedendalign.go modified: pkg/obioptions/version.go modified: pkg/obitools/obipairing/pairing.go
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
)
|
||||
|
||||
// // A pool of byte slices.
|
||||
@ -158,19 +159,29 @@ func BuildQualityConsensus(seqA, seqB *obiseq.BioSequence, path []int, statOnMis
|
||||
|
||||
match := 0
|
||||
|
||||
left := obiutils.Abs(path[0])
|
||||
right := 0
|
||||
if path[len(path)-1] == 0 {
|
||||
right = path[len(path)-2]
|
||||
}
|
||||
|
||||
right = obiutils.Abs(right)
|
||||
|
||||
right = len(*bufferQA) - right
|
||||
|
||||
// log.Warnf("BuildQualityConsensus: left = %d right = %d\n", left, right)
|
||||
|
||||
for i, qA = range *bufferQA {
|
||||
nA := (*bufferSA)[i]
|
||||
nB := (*bufferSB)[i]
|
||||
qB = (*bufferQB)[i]
|
||||
|
||||
if statOnMismatch && nA != nB {
|
||||
if statOnMismatch && i >= left && i < right && nA != nB {
|
||||
if nA == ' ' {
|
||||
nA = '-'
|
||||
qA = 0
|
||||
}
|
||||
if nB == ' ' {
|
||||
nB = '-'
|
||||
qB = 0
|
||||
}
|
||||
mismatches[strings.ToUpper(fmt.Sprintf("(%c:%02d)->(%c:%02d)", nA, qA, nB, qB))] = i + 1
|
||||
}
|
||||
|
@ -625,6 +625,8 @@ func PEAlign(seqA, seqB *obiseq.BioSequence,
|
||||
&arena.pointer.scoreMatrix,
|
||||
&arena.pointer.pathMatrix)
|
||||
|
||||
score = scoreR
|
||||
|
||||
path = _Backtracking(arena.pointer.pathMatrix,
|
||||
len(rawSeqA), len(rawSeqB),
|
||||
&(arena.pointer.path))
|
||||
@ -641,6 +643,7 @@ func PEAlign(seqA, seqB *obiseq.BioSequence,
|
||||
len(rawSeqA), len(rawSeqB),
|
||||
&(arena.pointer.path))
|
||||
isLeftAlign = true
|
||||
score = scoreL
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
// corresponds to the last commit, and not the one when the file will be
|
||||
// commited
|
||||
|
||||
var _Commit = "d4209b4"
|
||||
var _Commit = "fb6f857"
|
||||
var _Version = "Release 4.2.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
|
@ -129,6 +129,7 @@ func AssemblePESequences(seqA, seqB *obiseq.BioSequence,
|
||||
}
|
||||
lcons := cons.Len()
|
||||
aliLength := lcons - _Abs(left) - _Abs(right)
|
||||
|
||||
identity := float64(match) / float64(aliLength)
|
||||
if aliLength == 0 {
|
||||
identity = 0
|
||||
|
Reference in New Issue
Block a user