code: def blat(args):
      
      p = OptionParser(blat.__doc__)
      p.set_align(pctid=95, hitlen=30)
      p.set_cpus()
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      reffasta, queryfasta = args
      blastfile = get_outfile(reffasta, queryfasta, suffix="blat")
  
      run_blat(infile=queryfasta, outfile=blastfile, db=reffasta,
               pctid=opts.pctid, hitlen=opts.hitlen, cpus=opts.cpus,
               overwrite=False)
  
      return blastfile
docs: %prog blat ref.fasta query.fasta
  
      Calls blat and filters BLAST hits.