[Biojava-dev] GapPenalty interface uses short type for penalties; precludes use of floating point penalties
Don Naki
dnaki1 at cox.net
Fri Aug 31 18:11:40 UTC 2012
Hi Andreas,
Ok, thanks for the info. I'll use the scaling workaround.
Perhaps I'll allow users of my app to enter 0.5 (and scale
matrix and penalties by 2) or else specify valid short values.
Thanks
Don
On Aug 31, 2012, at 9:28 AM, Andreas Prlic <andreas at sdsc.edu> wrote:
> 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