Martinsos / edlib

Lightweight, super fast C/C++ (& Python) library for sequence alignment using edit (Levenshtein) distance.
http://martinsos.github.io/edlib
MIT License
506 stars 165 forks source link

Edlib hangs forever when query length is 0 #120

Closed nmiculinic closed 4 years ago

nmiculinic commented 6 years ago

Using python bindings: Version: edlib==1.2.3.post1

import edlib
print(edlib.align("", "AA"))

hangs forever.

Martinsos commented 6 years ago

@nmiculinic thanks for reporting this, I started working on support in Edlib for returning reasonable values in case one of the sequences is empty. Interesting enough, nobody reported this as an issue until now.

davidgfnet commented 6 years ago

Yeah just happened to me, weird that it's not something people would find out before, given how simple the test case is :D