eseraygun / python-alignment

Native Python library for generic sequence alignment
BSD 3-Clause "New" or "Revised" License
55 stars 14 forks source link

Long sequences run into RecursionError #11

Open bertsky opened 5 years ago

bertsky commented 5 years ago

Since backtraceFrom is implemented by recursion (instead of iteration), calling the aligner on "long" sequences (more than 1000 items) results in a RecursionError with Python defaults. Extending stack depth limit may cause other serious issues.

hadaev8 commented 4 years ago

Same here

hadaev8 commented 4 years ago

@bertsky may you advise similar but better package?

bertsky commented 4 years ago

@hadaev8 I'll try. Having tested several libraries available on PyPI (when searching with align or edit distance keywords) I finally reverted to the standard difflib.SequenceMatcher (with isjunk=None, autojunk=False) – although it is not optimising general global alignment (Needleman-Wunsch) but minimal visual difference (Ratcliff-Obershelp) – for the following reasons:

Generally, you want more than just correctness:

hadaev8 commented 4 years ago

@bertsky Thanks