comparison blast2html.py @ 23:6995a6f34f3f

fix sectioning, add footer
author Jan Kanis <jan.code@jankanis.nl>
date Thu, 15 May 2014 11:05:39 +0200
parents efce16c98650
children c8347745bbad
comparison
equal deleted inserted replaced
22:efce16c98650 23:6995a6f34f3f
230 query_length = blastxml_len(result) 230 query_length = blastxml_len(result)
231 skip = math.ceil(query_length / self.max_scale_labels) 231 skip = math.ceil(query_length / self.max_scale_labels)
232 percent_multiplier = 100 / query_length 232 percent_multiplier = 100 / query_length
233 for i in range(1, query_length+1): 233 for i in range(1, query_length+1):
234 if i % skip == 0: 234 if i % skip == 0:
235 yield dict(label = i, width = skip * percent_multiplier, shorter = False\) 235 yield dict(label = i, width = skip * percent_multiplier)
236 if query_length % skip != 0: 236 if query_length % skip != 0:
237 yield dict(label = query_length, 237 yield dict(label = query_length,
238 width = (query_length % skip) * percent_multiplier, 238 width = (query_length % skip) * percent_multiplier)
239 shorter = True)
240 239
241 @filter 240 @filter
242 def hit_info(self, result): 241 def hit_info(self, result):
243 242
244 query_length = blastxml_len(result) 243 query_length = blastxml_len(result)