Martinsos / edlib

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

How to report all possibale positions not only the best one ? #216

Open cherryamme opened 1 year ago

cherryamme commented 1 year ago

Hello I try to get multiple possible positions at which the alignment ends, but it seems like edlib.align only report the most possible site. the k arg is just a cut steps to filter. can I get all possible positions ? for example : when I set a arg k=2 , it will report sites combine editDistance=0 editDistance=1 and editDistance=2. @Martinsos Thanks

Martinsos commented 1 year ago

Hi @cherryamme ! Sorry, I am not sure I understand the question. Did you say you would like to get the solution for distance = 0, distance = 1 and so on? That is not how edlib works -> it looks for the smallest edit distance. It can report multiple end locations, but they will all be optimal solutions.

Why would you be interested into finding suboptimal solutions?