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"
|
"strings"
|
||||||
|
|
||||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||||
|
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// // A pool of byte slices.
|
// // A pool of byte slices.
|
||||||
@ -158,19 +159,29 @@ func BuildQualityConsensus(seqA, seqB *obiseq.BioSequence, path []int, statOnMis
|
|||||||
|
|
||||||
match := 0
|
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 {
|
for i, qA = range *bufferQA {
|
||||||
nA := (*bufferSA)[i]
|
nA := (*bufferSA)[i]
|
||||||
nB := (*bufferSB)[i]
|
nB := (*bufferSB)[i]
|
||||||
qB = (*bufferQB)[i]
|
qB = (*bufferQB)[i]
|
||||||
|
|
||||||
if statOnMismatch && nA != nB {
|
if statOnMismatch && i >= left && i < right && nA != nB {
|
||||||
if nA == ' ' {
|
if nA == ' ' {
|
||||||
nA = '-'
|
nA = '-'
|
||||||
qA = 0
|
|
||||||
}
|
}
|
||||||
if nB == ' ' {
|
if nB == ' ' {
|
||||||
nB = '-'
|
nB = '-'
|
||||||
qB = 0
|
|
||||||
}
|
}
|
||||||
mismatches[strings.ToUpper(fmt.Sprintf("(%c:%02d)->(%c:%02d)", nA, qA, nB, qB))] = i + 1
|
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.scoreMatrix,
|
||||||
&arena.pointer.pathMatrix)
|
&arena.pointer.pathMatrix)
|
||||||
|
|
||||||
|
score = scoreR
|
||||||
|
|
||||||
path = _Backtracking(arena.pointer.pathMatrix,
|
path = _Backtracking(arena.pointer.pathMatrix,
|
||||||
len(rawSeqA), len(rawSeqB),
|
len(rawSeqA), len(rawSeqB),
|
||||||
&(arena.pointer.path))
|
&(arena.pointer.path))
|
||||||
@ -641,6 +643,7 @@ func PEAlign(seqA, seqB *obiseq.BioSequence,
|
|||||||
len(rawSeqA), len(rawSeqB),
|
len(rawSeqA), len(rawSeqB),
|
||||||
&(arena.pointer.path))
|
&(arena.pointer.path))
|
||||||
isLeftAlign = true
|
isLeftAlign = true
|
||||||
|
score = scoreL
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "d4209b4"
|
var _Commit = "fb6f857"
|
||||||
var _Version = "Release 4.2.0"
|
var _Version = "Release 4.2.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
@ -129,6 +129,7 @@ func AssemblePESequences(seqA, seqB *obiseq.BioSequence,
|
|||||||
}
|
}
|
||||||
lcons := cons.Len()
|
lcons := cons.Len()
|
||||||
aliLength := lcons - _Abs(left) - _Abs(right)
|
aliLength := lcons - _Abs(left) - _Abs(right)
|
||||||
|
|
||||||
identity := float64(match) / float64(aliLength)
|
identity := float64(match) / float64(aliLength)
|
||||||
if aliLength == 0 {
|
if aliLength == 0 {
|
||||||
identity = 0
|
identity = 0
|
||||||
|
Reference in New Issue
Block a user