code: def genestatus(args):
      
      p = OptionParser(genestatus.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      idsfile, = args
      data = get_tags(idsfile)
      key = lambda x: x[0].split(".")[0]
      for gene, cc in groupby(data, key=key):
          cc = list(cc)
          tags = [x[-1] for x in cc]
          if "complete" in tags:
              tag = "complete"
          elif "partial" in tags:
              tag = "partial"
          else:
              tag = "pseudogene"
          print("\t".join((gene, tag)))
docs: %prog genestatus diploid.gff3.exon.ids
  
      Tag genes based on translation from GMAP models, using fasta.translate()
      --ids.