code: def refallele(args):
      
      p = OptionParser(refallele.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      vcffile, = args
      fp = open(vcffile)
      for row in fp:
          if row[0] == '#':
              continue
          atoms = row.split()
          marker = "{0}:{1}".format(*atoms[:2])
          ref = atoms[3]
          print("\t".join((marker, ref)))
docs: %prog refallele vcffile > out.refAllele
  
      Make refAllele file which can be used to convert PLINK file to VCF file.