def _set_qresult_hits(qresult, hit_rows=()):
 for hit_row in hit_rows:
  (hit_id, remainder) = hit_row.split(' ', 1)
  if (hit_id not in qresult):
   frag = HSPFragment(hit_id, qresult.id)
   hsp = HSP([frag])
   hit = Hit([hsp])
   qresult.append(hit)
 return qresult

def _set_qresult_hits ( qresult , hit_rows = ( ) ) : for hit_row in hit_rows : ( hit_id , remainder ) = hit_row . split ( ' ' , 1 ) if ( hit_id not in qresult ) : frag = HSPFragment ( hit_id , qresult . id ) hsp = HSP ( [ frag ] ) hit = Hit ( [ hsp ] ) qresult . append ( hit ) return qresult
helper function for appending hits without alignments into queryresults .