def query_ids_from_blast_result(blast_result, filter_fn=no_filter, DEBUG=False):
 ok_ids = []
 removed_ids = []
 for id in blast_result:
  for entry in blast_result[id]:
   for subentry in entry:
    if (not check_align_percent_field(subentry)):
     continue
    if (not filter_fn(subentry)):
     removed_ids.append(id)
     continue
    ok_ids.append(subentry['QUERY ID'])
 ok_ids = set(ok_ids)
 removed_ids = (set(removed_ids) - ok_ids)
 return (ok_ids, removed_ids)

def query_ids_from_blast_result ( blast_result , filter_fn = no_filter , DEBUG = False ) : ok_ids = [ ] removed_ids = [ ] for id in blast_result : for entry in blast_result [ id ] : for subentry in entry : if ( not check_align_percent_field ( subentry ) ) : continue if ( not filter_fn ( subentry ) ) : removed_ids . append ( id ) continue ok_ids . append ( subentry [ 'QUERY ID' ] ) ok_ids = set ( ok_ids ) removed_ids = ( set ( removed_ids ) - ok_ids ) return ( ok_ids , removed_ids )
returns a list of blast query ids .