code: def _run_snpeff(snp_in, out_format, data):
      
      snpeff_db, datadir = get_db(data)
      if not snpeff_db:
          return None, None
  
      assert os.path.exists(os.path.join(datadir, snpeff_db)), \
          "Did not find %s snpEff genome data in %s" % (snpeff_db, datadir)
      ext = utils.splitext_plus(snp_in)[1] if out_format == "vcf" else ".tsv"
      out_file = "%s-effects%s" % (utils.splitext_plus(snp_in)[0], ext)
      stats_file = "%s-stats.html" % utils.splitext_plus(out_file)[0]
      csv_file = "%s-stats.csv" % utils.splitext_plus(out_file)[0]
      if not utils.file_exists(out_file):
          config_args = " ".join(_snpeff_args_from_config(data))
          if ext.endswith(".gz"):
              bgzip_cmd = "| %s -c" % tools.get_bgzip_cmd(data["config"])
          else:
              bgzip_cmd = ""
          with file_transaction(data, out_file) as tx_out_file:
              snpeff_cmd = _get_snpeff_cmd("eff", datadir, data, tx_out_file)
              cmd = ("{snpeff_cmd} {config_args} -noLog -i vcf -o {out_format} "
                     "-csvStats {csv_file} -s {stats_file} {snpeff_db} {snp_in} {bgzip_cmd} > {tx_out_file}")
              do.run(cmd.format(**locals()), "snpEff effects", data)
      if ext.endswith(".gz"):
          out_file = vcfutils.bgzip_and_index(out_file, data["config"])
      return out_file, [stats_file, csv_file]
docs: Run effects prediction with snpEff, skipping if snpEff database not present.