[Biojava-dev] GapPenalty interface uses short type for penalties; precludes use of floating point penalties

Don Naki dnaki1 at cox.net
Wed Aug 29 22:36:58 UTC 2012


Hi folks, I'm using the Alignments.getPairwiseAlignment static method to compute a global alignment of two protein sequences, which uses the Needleman-Wunsch algorithm.

The method allows one to specify the gap penalties in the GapPenalty argument. However, the GapPenalty interface represents the open and extend gap penalties using the short primitive type. I need to specify the extension penalty to be 0.5, which is not possible with a short. I believe that 0.5 is the default extension penalty in many implementations of N-W.

I am relatively new to biojava, so it's possible that I'm missing something. Can someone confirm this as a limitation of biojava or provide an explanation as to why the short type is used, or possibly a workaround?

Thanks in advance
Don Naki



More information about the biojava-dev mailing list