code: def blat(args):
      
      p = OptionParser(blat.__doc__)
      p.add_option("--minscore", default=100, type="int",
                   help="Matches minus mismatches gap penalty [default: %default]")
      p.add_option("--minid", default=98, type="int",
                   help="Minimum sequence identity [default: %default]")
      p.set_cpus()
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      oldfasta, newfasta = args
      twobitfiles = []
      for fastafile in args:
          tbfile = faToTwoBit(fastafile)
          twobitfiles.append(tbfile)
  
      oldtwobit, newtwobit = twobitfiles
      cmd = "pblat -threads={0}".format(opts.cpus) if which("pblat") else "blat"
      cmd += " {0} {1}".format(oldtwobit, newfasta)
      cmd += " -tileSize=12 -minScore={0} -minIdentity={1} ".\
                  format(opts.minscore, opts.minid)
      pslfile = "{0}.{1}.psl".format(*(op.basename(x).split('.')[0] \
                  for x in (newfasta, oldfasta)))
      cmd += pslfile
      sh(cmd)
docs: %prog blat old.fasta new.fasta
  
      Generate psl file using blat.