sequence alignment using edlib c++ library
0
1
Entering edit mode
5.8 years ago
BDK_compbio ▴ 140

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 • 1.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 2939 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6