mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-10 09:40:27 +00:00
Make obiconsensus using the count of the sequences
Former-commit-id: 7fc5292aeb225843a86cd85591a5405e35125e3d
This commit is contained in:
@@ -99,9 +99,19 @@ func BuildConsensus(seqs obiseq.BioSequenceSlice,
|
||||
}
|
||||
}
|
||||
|
||||
seq, err := graph.LongestConsensus(seqs[0].Source())
|
||||
id := seqs[0].Source()
|
||||
if id == "" {
|
||||
id = seqs[0].Id()
|
||||
}
|
||||
seq, err := graph.LongestConsensus(id)
|
||||
|
||||
seq.SetCount(len(seqs))
|
||||
sumCount := 0
|
||||
|
||||
for _, s := range seqs {
|
||||
sumCount += s.Count()
|
||||
}
|
||||
|
||||
seq.SetCount(sumCount)
|
||||
seq.SetAttribute("seq_length", seq.Len())
|
||||
seq.SetAttribute("kmer_size", kmer_size)
|
||||
seq.SetAttribute("kmer_min_occur", threshold)
|
||||
|
||||
Reference in New Issue
Block a user