code: def _clean_hits(reads):
      
      new_reads = defaultdict(realign)
      for r in reads:
          world = {}
          sc = 0
          for p in reads[r].precursors:
              world[p] = reads[r].precursors[p].get_score(len(reads[r].sequence))
              if sc < world[p]:
                  sc = world[p]
          new_reads[r] = reads[r]
          for p in world:
              logger.debug("score %s %s %s" % (r, p, world[p]))
              if sc != world[p]:
                  logger.debug("remove %s %s %s" % (r, p, world[p]))
                  new_reads[r].remove_precursor(p)
  
      return new_reads
docs: Select only best matches