comparison blast_html.py @ 15:648b3b7437da

minor update
author Jan Kanis <jan.code@jankanis.nl>
date Mon, 12 May 2014 17:33:08 +0200
parents 0b33898bba45
children db7e4ee3be03
comparison
equal deleted inserted replaced
14:0b33898bba45 15:648b3b7437da
69 return hit.Hit_id.text.split('|', 2)[2] 69 return hit.Hit_id.text.split('|', 2)[2]
70 70
71 @filter 71 @filter
72 def alignment_pre(hsp): 72 def alignment_pre(hsp):
73 return ( 73 return (
74 "Query {:>7s} {} {}\n".format(hsp['Hsp_query-from'].text, hsp.Hsp_qseq, hsp['Hsp_query-to'].text) + 74 "Query {:>7s} {} {}\n".format(hsp['Hsp_query-from'].text, hsp.Hsp_qseq, hsp['Hsp_query-to']) +
75 " {:7s} {}\n".format('', hsp.Hsp_midline) + 75 " {:7s} {}\n".format('', hsp.Hsp_midline) +
76 "Subject{:>7s} {} {}".format(hsp['Hsp_hit-from'].text, hsp.Hsp_hseq, hsp['Hsp_hit-to'].text) 76 "Subject{:>7s} {} {}".format(hsp['Hsp_hit-from'].text, hsp.Hsp_hseq, hsp['Hsp_hit-to'])
77 ) 77 )
78 78
79 @filter('len') 79 @filter('len')
80 def hsplen(node): 80 def hsplen(node):
81 return int(node['Hsp_align-len']) 81 return int(node['Hsp_align-len'])