Correct a bug when sequence length is shorter than kmer size in debruijngraph

Former-commit-id: 56cd670d24065d8774abdcbf685ff4a13e7c4132
This commit is contained in:
2023-06-07 17:43:32 +02:00
parent 68a290d564
commit 8895381c92

View File

@ -361,12 +361,13 @@ func (graph *DeBruijnGraph) Push(sequence *obiseq.BioSequence) {
init = append(init, key&graph.kmermask) init = append(init, key&graph.kmermask)
} }
f(0, key) if sequence.Len() > graph.kmersize {
f(0, key)
for _, idx := range init { for _, idx := range init {
graph.append(s[graph.kmersize:], idx) graph.append(s[graph.kmersize:], idx)
}
} }
} }
func (graph *DeBruijnGraph) Gml() string { func (graph *DeBruijnGraph) Gml() string {