code: def header(args):
      
      from jcvi.formats.base import DictFile
  
      p = OptionParser(header.__doc__)
      p.add_option("--prefix", default="",
                   help="Prepend text to line number [default: %default]")
      p.add_option("--ids", help="Write ids to file [default: %default]")
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      mstmap, conversion_table = args
      data = MSTMap(mstmap)
      hd = data.header
      conversion = DictFile(conversion_table)
      newhd = [opts.prefix + conversion.get(x, x) for x in hd]
  
      print("\t".join(hd))
      print("--->")
      print("\t".join(newhd))
  
      ids = opts.ids
      if ids:
          fw = open(ids, "w")
          print("\n".join(newhd), file=fw)
          fw.close()
docs: %prog header map conversion_table
  
      Rename lines in the map header. The mapping of old names to new names are
      stored in two-column `conversion_table`.