Daniel-Liu-c0deb0t / block-aligner

SIMD-accelerated library for computing global and X-drop affine gap penalty sequence-to-sequence or sequence-to-profile alignments using an adaptive block-based algorithm.
https://crates.io/crates/block_aligner
MIT License
124 stars 7 forks source link

Is using -0.5 as extend penalty supported? #5

Closed trevorpfiz closed 2 years ago

trevorpfiz commented 2 years ago

Hi!

I am newer to Rust so I may be misunderstanding something, but I was wondering if using an extend penalty of -0.5 was supported. I noticed that the Gaps struct takes i8 so I am guessing this is not possible?

Also, just curious, what led you to choose the scoring setup for proteins that you did in the paper? "For scoring, we use BLOSUM62 with (Gopen = -11, Gext = -1) for proteins"

Thanks for this library!

Daniel-Liu-c0deb0t commented 2 years ago

Fractional penalties are not supported, because internally, scores are computed using SIMD on 16-bit integers instead of floating point numbers. You can scale all of your scores by 2 to turn -0.5 into -1, which is a workaround for this problem. Or you can round your fractional penalities.

The scoring setup in the paper is pretty typical setup for protein alignments that I've seen in some papers. I'm fairly certain it is the default configuration for some protein search tools, but correct me if I'm wrong.

trevorpfiz commented 2 years ago

Awesome, thanks!