[Biojava-dev] IsoelectricPointCalc bug?

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


On Tuesday 22 Jul 2003 5:02 pm, Pjm wrote:
> I think I have found a bug in the IsoeletricPoint code. The emboss code
> gives the below sequence a value of 13 but the biojava code gives the
> following error;
>
> org.biojava.bio.BioException: Illegal initial range limits.
>          at org.biojava.utils.math.BinarySearch.solve
> (BinarySearch.java:58) (pc 70)
>          at org.biojava.bio.proteomics.IsoelectricPointCalc.getPI
> (IsoelectricPointCalc.java:192) (pc 47)
>          at org.genedb.prelim.tests.IsoelectricPointBroken.main
> (IsoelectricPointBroken.java:43) (pc 46)
>
>
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);

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