This is a test version of Biostars. For the public version, visit https://www.biostars.org.
sequence alignment using edlib c++ library

I am using edlib library for sequence alignment using edit (Levenshtein) distance. It says that its infix(HW) alignment method does not penalize the start and end gaps. But it does not output the correct result when I use HW mode.

#include <cstdio>
#include "edlib.h"

int main() {
    EdlibAlignResult result  = edlibAlign("hello world", 11, "world!", 6, edlibNewAlignConfig(-1, EDLIB_MODE_HW, EDLIB_TASK_PATH, NULL, 0));
    if (result.status == EDLIB_STATUS_OK) {
        printf("edit_distance('hello world', 'world!') = %d\n", result.editDistance);
    }
    edlibFreeAlignResult(result); }

The edit distance should be zero, but it returns 5. I am wondering if I am missing something.

cpp alignment

0 answers

No answers yet.

Log in to answer this question.