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

Andreas Prlic andreas at sdsc.edu
Fri Aug 31 16:28:51 UTC 2012


Hi Don,

The values are shorts for performance reasons. Gap penalties and
substitution matrices are dependent on each other and can be scaled.
You could multiply everything by two and work with the short values
then...

Andreas

On Wed, Aug 29, 2012 at 3:36 PM, Don Naki <dnaki1 at cox.net> wrote:
>
> 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
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev




More information about the biojava-dev mailing list