Martinsos / edlib

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

Make it easier to prepare sequences for usage #44

Closed Martinsos closed 8 years ago

Martinsos commented 8 years ago

Currently sequences have to be transformed into numbers, that go from 0 to N-1 if alphabet has length N. This is a boring thing to implement and nobody should have to go through this trouble.

I should either implement some helper function to transform char sequence to unsigned char sequence of numbers from 0 to N-1, or I should put that transformation inside main function so nobody even knows about it.

What I could also do is create a simpler function, that will detect the length of alphabet and also do this transformation.

Finally, in case that my function accepts numbers as it was accepting them so far, I should check if they are in range 0 to N-1 and report an error if that is not the case!

Martinsos commented 8 years ago

Done