code: def phase(args):
      
      p = OptionParser(phase.__doc__)
      p.set_outfile()
  
      opts, args = p.parse_args(args)
  
      if len(args) < 1:
          sys.exit(not p.print_help())
  
      fw = must_open(opts.outfile, "w")
      for gbfile in args:
          for rec in SeqIO.parse(gbfile, "gb"):
              bac_phase, keywords = get_phase(rec)
              chr, clone = get_clone(rec)
              keyword_field = ";".join(keywords)
              print("\t".join((rec.id, str(bac_phase), keyword_field,
                      chr, clone)), file=fw)
docs: %prog phase genbankfiles
  
      Input has to be gb file. Search the `KEYWORDS` section to look for PHASE.
      Also look for "chromosome" and "clone" in the definition line.