[Biojava-dev] IsoelectricPointCalc bug?

David Huen smh1008 at cus.cam.ac.uk
Tue Jul 22 18:54:35 EDT 2003


On Tuesday 22 Jul 2003 5:48 pm, Pjm wrote:
> > Ah, OK.  I think the problem arises from a very small error in FP
> > computations.  The binary search algorithm that solves the isoelectric
> > point equation expects and requires that successive bounds of the
> > search fall on either side of zero.  I think what has happened is the
> > small error in computation has put both bounds on the same side of zero
> > causing it to foobar.
> >
> > I think we can prevent it by increasing the termination tolerance for
> > the pI computation.  Try changing in
> > org.biojava.bio.proteomics.IsoelectricPointCalc the line:-
> > double pI = BinarySearch.solve(1.0, 13.0, 0.001, computeObj);
> >
> > to:-
> > double pI = BinarySearch.solve(1.0, 13.0, 0.005, computeObj);
>
> Thanks for the quick reply.
>
> The binary search does a quick check before doing anything and this is
> where the error is thrown. The tolerance is not used I'm affraid. See
> this from org/biojava/utils/math/BinarySearch.java
>
You're right.

The problem is actually in the choice of bounds I used.  It expects an 
answer between 1-13 for pI.  In this case, the answer is probably beyond 
13.

I suggest using:-
double pI = BinarySearch.solve(0.3, 13.7, 0.001, computeObj);

That's one heck of a basic protein ;-)

Regards,
David Huen

-- 

David Huen, Ph.D.              Email: smh1008 at cus.cam.ac.uk
Dept. of Genetics              Fax  : +44 1223 333992
University of Cambridge        Phone: +44 1223 333982/766748
Cambridge, CB2 3UH
U.K.


More information about the biojava-dev mailing list