mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
requires that father.count > son.count
This commit is contained in:
@ -266,7 +266,7 @@ func reweightSequences(seqs *[]*seqPCR) {
|
|||||||
//var rfunc func(*seqPCR)
|
//var rfunc func(*seqPCR)
|
||||||
|
|
||||||
rfunc := func(node *seqPCR) {
|
rfunc := func(node *seqPCR) {
|
||||||
node.AddedSons=0
|
node.AddedSons = 0
|
||||||
nedges := len(node.Edges)
|
nedges := len(node.Edges)
|
||||||
if nedges > 0 {
|
if nedges > 0 {
|
||||||
swf := 0.0
|
swf := 0.0
|
||||||
@ -313,11 +313,13 @@ func buildSamplePairs(seqs *[]*seqPCR, workers int) int {
|
|||||||
|
|
||||||
for j := i + 1; j < nseq; j++ {
|
for j := i + 1; j < nseq; j++ {
|
||||||
father := (*seqs)[j]
|
father := (*seqs)[j]
|
||||||
d, pos, a1, a2 := obialign.D1Or0(son.Sequence, father.Sequence)
|
if father.Count > son.Count {
|
||||||
if d > 0 {
|
d, pos, a1, a2 := obialign.D1Or0(son.Sequence, father.Sequence)
|
||||||
son.Edges = append(son.Edges, makeEdge(j, d, pos, a2, a1))
|
if d > 0 {
|
||||||
father.SonCount++
|
son.Edges = append(son.Edges, makeEdge(j, d, pos, a2, a1))
|
||||||
|
father.SonCount++
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user