[Bioperl-l] limiting E value - Argument "e-134" isn't numeric?
Chris Dwan (CCGB)
cdwan at mail.ahc.umn.edu
Tue Apr 6 09:55:01 EDT 2004
> You must be using NCBI-BLAST. NCBI has a problem in that they don't
> include the '1' before E-values less than or equal to 1e-100. So, any
> e-value you get back needs to be checked for '^e' and have a '1' added
> on so it evaluates as a number.
Once upon a time, I dug through the BLAST code to understand exactly this
issue (how e-values are formatted for printing). This was the code then,
though I make no representations about how it looks now:
if (evalue < 1.0e-180) { sprintf(eval_buff, "0.0"); }
else if (evalue < 1.0e-99) {
sprintf(eval_buff, "%2.0Le", evalue);
eval_buff_ptr++; /* Knock off digit. */
}
else if (evalue < 0.0009) { sprintf(eval_buff, "%3.0Le", evalue); }
else if (evalue < 0.1) { sprintf(eval_buff, "%4.3Lf", evalue); }
else if (evalue < 1.0) { sprintf(eval_buff, "%3.2Lf", evalue); }
else if (evalue < 10.0) { sprintf(eval_buff, "%2.1Lf", evalue); }
else { sprintf(eval_buff, "%5.0Lf", evalue); }
-Chris Dwan
More information about the Bioperl-l
mailing list