code: def tigrprepare(args):
      
      p = OptionParser(tigrprepare.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 4:
          sys.exit(not p.print_help())
  
      fastafile, asmbl_id, db, pasa_db = args
      if asmbl_id == 'all':
          idsfile = fastafile + ".ids"
          if need_update(fastafile, idsfile):
              ids([fastafile, "-o", idsfile])
      else:
          idsfile = asmbl_id
  
      oneid = open(idsfile).next().strip()
  
      weightsfile = "weights.txt"
      if need_update(idsfile, weightsfile):
          cmd = "$EVM/TIGR-only/create_sample_weights_file.dbi"
          cmd += " {0} {1} | tee weights.txt".format(db, oneid)
          sh(cmd)
  
      evs = ["gene_predictions.gff3", "transcript_alignments.gff3",
             "protein_alignments.gff3"]
      if need_update(weightsfile, evs):
          cmd = "$EVM/TIGR-only/write_GFF3_files.dbi"
          cmd += " --db {0} --asmbl_id {1} --weights {2}".\
                  format(db, idsfile, weightsfile)
          sh(cmd)
  
      evs[1] = fix_transcript()
  
      partition(evs)
      runfile = "run.sh"
      contents = EVMRUN.format(*evs)
      write_file(runfile, contents)
docs: %prog tigrprepare asmbl.fasta asmbl.ids db pasa.terminal_exons.gff3
  
      Run EVM in TIGR-only mode.