<commit_before>require 'formula'

class Snpeff < Formula
  homepage 'http://snpeff.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/snpeff/snpEff_v4_0_core.zip'
  version '4.0e'
  sha1 '969fa41cd774a33629f63938f665ba1f83f9adcc'

  bottle do
    root_url "https://downloads.sf.net/project/machomebrew/Bottles/science"
    cellar :any
    sha1 "d663e17fc44066a66ae8f05a99d2b7e4fd1fdda8" => :yosemite
    sha1 "fdbf0db244297f35281850bb2381d7abbba0392e" => :mavericks
    sha1 "25acc2120b891e10c79530662578e24dc6ff20b8" => :mountain_lion
  end

  def install
    inreplace "scripts/snpEff" do |s|
      s.gsub! /^jardir=.*/, "jardir=#{libexec}"
      s.gsub! "${jardir}/snpEff.config", "#{share}/snpEff.config"
    end

    bin.install "scripts/snpEff"
    libexec.install "snpEff.jar", "SnpSift.jar"
    share.install "snpEff.config", "scripts", "galaxy"
  end

  def caveats; <<-EOS.undent
      Download the human database using the command
          snpEff download -v GRCh38.76<commit_msg>snpEff 4.1<commit_after>require 'formula'

class Snpeff < Formula
  homepage 'http://snpeff.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/snpeff/snpEff_v4_1_core.zip'
  version '4.1'
  sha1 "83e1d2e32bfc8b9104f1856e70f8b1112fa290ab"

  bottle do
    root_url "https://downloads.sf.net/project/machomebrew/Bottles/science"
    cellar :any
    sha1 "d663e17fc44066a66ae8f05a99d2b7e4fd1fdda8" => :yosemite
    sha1 "fdbf0db244297f35281850bb2381d7abbba0392e" => :mavericks
    sha1 "25acc2120b891e10c79530662578e24dc6ff20b8" => :mountain_lion
  end

  def install
    inreplace "scripts/snpEff" do |s|
      s.gsub! /^jardir=.*/, "jardir=#{libexec}"
      s.gsub! "${jardir}/snpEff.config", "#{share}/snpEff.config"
    end

    bin.install "scripts/snpEff"
    libexec.install "snpEff.jar", "SnpSift.jar"
    share.install "snpEff.config", "scripts", "galaxy"
  end

  def caveats; <<-EOS.undent
      Download the human database using the command
          snpEff download -v GRCh38.76
{'fraction_non_alphanumeric': 0.12276341948310139, 'fraction_numerical': 0.11133200795228629, 'mean_word_length': 3.921760391198044, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4275996', 'n_tokens_mistral': 977, 'n_tokens_neox': 862, 'n_words': 132}