[Bioperl-l] Rounding off to 100% in
Tools::Blast::Sbjct::frac_identical()
Benjamin Berman
benb@fruitfly.org
Mon, 01 Apr 2002 00:01:57 -0800
Steve
I guess I left it at two digits of precision because I always try to
preserve backwards-compatibility. Maybe someone relies on the fact that
there are only two digits (i.e. they print out the string directly). But I
think it would be nice to have three digits, so I'll go ahead and change it.
But I'm still going to round .9996 to .999 rather than "1.000".
ben.
At 08:59 PM 3/31/2002 -0800, Steve Chervitz wrote:
>Ben,
>
>There's no compelling reason that I can think of as to why the frac_identical
>and frac_conserved methods round to two significant figures. The only
>reason it
>is there is to avoid excessive sig figs (e.g., 0.92014402179). Since this is
>throwing out information, as you point out, this should be changed.
>
>As for your recommended fix, I would prefer simply changing the sprintf
>line to
>"0.3f", which will allow you to distinguish between 0.996, 0.998, and 1.000.
>
>Steve
------
Benjamin Berman
Rubin Lab, 539 Life Sciences Addition
Department of Molecular and Cell Biology
University of California, Berkeley
benb@fruitfly.org