smarco/WFA2-lib

Right score for score-only alignment?

Closed this issue · 2 comments

Hi Smarco,
I'm testing the examples/basic.c to test the score-only alignment(attributes.alignment_scope = compute_score;).

In the output, I got two scores.
Score1: alignment score (wf_aligner->cigar.score)
Score2:SCORE (RE)COMPUTED (cigar_score_gap_affine(&wf_aligner->cigar,&attributes.affine_penalties))

In normal full-cigar alignment mode, Score1 may equal to score2. But score2 is equal to the standard NW algorithm score.
In score-only mode, Score1 is available but not equal to standard NW algorithm score. Score2 is not available, possibly because this mode does not calculate cigar.

Is there a way to use score-only alignment mode to get the correct NW algorithm score?

Best regards,
Haojing

smarco commented

Hi,

Whether you get the score from wf_aligner->cigar.score or re-compute the score, the resulting score has to be the same (otherwise is a bug). Can you copy and paste the C-code example that reproduces the problem?

Thanks,

Thank you for your quick response. I solve this problem. My error code is in version V2.2. I get the same score when I use the newest version. :)