RES: [Bioperl-l] Mysql columns and Blast evalues

Aaron J. Mackey amackey at
Thu Mar 10 09:34:47 EST 2005

Many databases store mantissa and exponent separately, e.g. 4.5e-100 
gets stored as 4.5 (low-precision float) and -100 (signed "medium" 

That way you can continue to use native database filters:

FROM   hit
WHERE  hit.exponent <= -6
    OR  (hit.exponent = -5 AND hit.mantissa = 1)

This will identify all hits with E values less than or equal to 1e-5 
(if you don't care about those equal to exactly 1e-5, you can drop the 
OR clause).

This mechanism also allows you to format the mantissa for printing 
precision, without worrying about converting the entire thing to a 
less-precise double:

    my $evalue = sprintf(%0.1fe%d, $mantissa, $exponent);


On Mar 10, 2005, at 4:42 AM, davila wrote:

> I wonder to know what other (mysql) column types (any further details 
> would be appreciated) colleagues are using to store their Blast 
> evalues ?
Aaron J. Mackey, Ph.D.
Dept. of Biology, Goddard 212
University of Pennsylvania       email:  amackey at
415 S. University Avenue         office: 215-898-1205
Philadelphia, PA  19104-6017     fax:    215-746-6697

More information about the Bioperl-l mailing list