mengyao / Complete-Striped-Smith-Waterman-Library

298 stars 112 forks source link

missed mismatches #4

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hello,

Thank you for the great library.

Sometimes I see that it reports an incorrect number of mismatches. For example:

StripedSmithWaterman::Aligner aligner;
StripedSmithWaterman::Filter filter;
StripedSmithWaterman::Alignment al;
const std::string s1 = "CCGTTTATCGCA";
const std::string s2 = "CCTTTTATCGCA"; //mismatch, pos. 2
aligner.Align(s1.data(), s2.data(), s2.size(), filter, &al);
std::cout
<< al.sw_score << ' ' << al.mismatches << ' ' << al.cigar_string 
<< std::endl;

outputs "20 0 12M" Note that the score is correct, but the number of mismatches should be 1, not 0. Mismatches at other positions are sometimes counted correctly.

Still, a very useful library

Mikhail

wanpinglee commented 10 years ago

Hi Mikhail,

Thank you very much for the bug report. It has been resolved. Please pull the up-to-date version.

mengyao commented 10 years ago

Thank you, Wan-Ping. ;-)

On Jan 30, 2013, at 4:06 PM, Wan-Ping wrote:

Hi Mikhail,

Thank you very much for the bug report. It has been resolved. Please pull the up-to-date version.

— Reply to this email directly or view it on GitHub.

ghost commented 10 years ago

It works! Great! Thank you, guys!