code: def omgparse(args):
      
      p = OptionParser(omgparse.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      work, = args
      omgfiles = glob(op.join(work, "gf*.out"))
      for omgfile in omgfiles:
          omg = OMGFile(omgfile)
          best = omg.best()
          for bb in best:
              genes, taxa = zip(*bb)
              print("\t".join((",".join(genes), ",".join(taxa))))
docs: %prog omgparse work
  
      Parse the OMG outputs to get gene lists.