Mercurial > repos > jankanis > blast2html
diff blast2html.py @ 119:591dc9c24824
tentative fix for Rikilt issue 10: don't sort hits ourselves but use blastxml ordering
author | Jan Kanis <jan.code@jankanis.nl> |
---|---|
date | Thu, 31 Jul 2014 13:26:34 +0200 |
parents | 7f3f8c10f44b |
children | 2729c2326235 |
line wrap: on
line diff
--- a/blast2html.py Thu Jul 31 13:09:30 2014 +0200 +++ b/blast2html.py Thu Jul 31 13:26:34 2014 +0200 @@ -219,10 +219,8 @@ @filter def hits(result): - # sort hits by longest hotspot first - return sorted(result.Iteration_hits.findall('Hit'), - key=lambda h: max(blastxml_len(hsp) for hsp in h.Hit_hsps.Hsp), - reverse=True) + # Use findall so we get an empty list if there are no Hit elements at all + return result.Iteration_hits.findall('Hit') @filter('params') def result_params(iteration):