comparison blast2html.py @ 78:c0804e6443c6 py2.6

comment
author Jan Kanis <jan.code@jankanis.nl>
date Thu, 19 Jun 2014 16:29:33 +0200
parents 7d0d46168fd5
children 9fb1a7d67317
comparison
equal deleted inserted replaced
77:05500bdd7376 78:c0804e6443c6
348 maxscore = "{0:.1f}".format(max(hsp_val('Hsp_bit-score'))), 348 maxscore = "{0:.1f}".format(max(hsp_val('Hsp_bit-score'))),
349 totalscore = "{0:.1f}".format(sum(hsp_val('Hsp_bit-score'))), 349 totalscore = "{0:.1f}".format(sum(hsp_val('Hsp_bit-score'))),
350 cover = "{0:.0%}".format(cover_count / query_length), 350 cover = "{0:.0%}".format(cover_count / query_length),
351 e_value = "{0:.4g}".format(min(hsp_val('Hsp_evalue'))), 351 e_value = "{0:.4g}".format(min(hsp_val('Hsp_evalue'))),
352 # FIXME: is this the correct formula vv? 352 # FIXME: is this the correct formula vv?
353 # float(...) because non-rounding division doesn't work with lxml elements in python 2.6 353 # float(...) because non-flooring division doesn't work with lxml elements in python 2.6
354 ident = "{0:.0%}".format(float(min(float(hsp.Hsp_identity) / blastxml_len(hsp) for hsp in hsps))), 354 ident = "{0:.0%}".format(float(min(float(hsp.Hsp_identity) / blastxml_len(hsp) for hsp in hsps))),
355 accession = hit.Hit_accession) 355 accession = hit.Hit_accession)
356 356
357 357
358 def main(): 358 def main():