<commit_before>require "formula"

class Delly < Formula
  homepage "https://github.com/tobiasrausch/delly"
  url "https://github.com/tobiasrausch/delly/archive/v0.5.6.tar.gz"
  sha1 "c23c079da1e2617a56b34ba543b765425b9b1533"

  option "with-binary", "Install a statically linked binary for 64-bit Linux" if OS.linux?

  if build.without? "binary"
    depends_on "bamtools"
    depends_on "boost"
    depends_on "htslib"
  end

  resource "linux-binary" do
    url "https://github.com/tobiasrausch/delly/releases/download/v0.5.6/delly_v0.5.6_CentOS5.4_x86_64bit"
    sha1 "6642bd407d0982a6a6d913e61ce2b50e8855bad5"
  end

  def install
    inreplace "Makefile" do |s|
      s.gsub! "${BAMTOOLS_ROOT}/include", "#{Formula["bamtools"].opt_include}/bamtools"
      s.gsub! "${BAMTOOLS_ROOT}/lib",     "#{Formula["bamtools"].opt_lib}"
      s.gsub! "${BOOST_ROOT}",            "#{Formula["boost"].opt_prefix}"
      s.gsub! "${SEQTK_ROOT}",            "#{Formula["htslib"].opt_include}/htslib"
    end

    if build.with? "binary"
      resource("linux-binary").stage { bin.install "delly_v0.5.6_CentOS5.4_x86_64bit" => "delly" }

    else
      system "make", "CXX=#{ENV.cxx}"
      bin.install "src/delly"
    end

    share.install %W[python/somaticFilter.py python/populationFilter.py human.hg19.excl.tsv]
    doc.install "README.md"
  end

  test do
    system 'delly 2>&1 |grep -q delly'
  end
end
<commit_msg>delly: update to 0.6.1, avoid bundled bamtools/htslib<commit_after>require "formula"

class Delly < Formula
  homepage "https://github.com/tobiasrausch/delly"
  url "https://github.com/tobiasrausch/delly/archive/v0.6.1.tar.gz"
  sha1 "7f01feb98ca8f7f68422762336ef36b4802c5a71"

  option "with-binary", "Install a statically linked binary for 64-bit Linux" if OS.linux?

  if build.without? "binary"
    depends_on "bamtools"
    depends_on "boost"
    depends_on "htslib"
  end

  resource "linux-binary-0.6.1" do
    url "https://github.com/tobiasrausch/delly/releases/download/v0.6.1/delly_v0.6.1_CentOS5.4_x86_64bit"
    sha1 "5941f6eaa528f5ab7d83e4ffa8c0c90ff01cb674"
  end

  def install
    inreplace "Makefile" do |s|
      s.gsub! "${BAMTOOLS_ROOT}/include", "#{Formula["bamtools"].opt_include}/bamtools"
      s.gsub! "${BAMTOOLS_ROOT}/lib",     "#{Formula["bamtools"].opt_lib}"
      s.gsub! "${BOOST_ROOT}",            "#{Formula["boost"].opt_prefix}"
      s.gsub! "${SEQTK_ROOT}",            "#{Formula["htslib"].opt_include}/htslib"
      s.gsub! ".htslib .bamtools",        ""
    end

    if build.with? "binary"
      resource("linux-binary-0.6.1").stage { bin.install "delly_v0.6.1_CentOS5.4_x86_64bit" => "delly" }

    else
      system "make", "CXX=#{ENV.cxx}"
      bin.install "src/delly"
    end

    share.install %W[python/somaticFilter.py python/populationFilter.py human.hg19.excl.tsv]
    doc.install "README.md"
  end

  test do
    system 'delly 2>&1 |grep -q delly'
  end
end

{'fraction_non_alphanumeric': 0.14936622130866736, 'fraction_numerical': 0.06029462144570058, 'mean_word_length': 3.37125748502994, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7495409', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1186, 'n_words': 191}