Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions Formula/tigmint.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
class Tigmint < Formula
include Language::Python::Shebang

# cite Jackman_2018: "https://doi.org/10.1186/s12859-018-2425-6"
desc "Correct misassemblies using linked or long reads"
homepage "https://bcgsc.github.io/tigmint/"
url "https://github.com/bcgsc/tigmint/releases/download/v1.2.5/tigmint-1.2.5.tar.gz"
sha256 "15a56748f19732462c0445fe9df2f737a4bf8caa97dbc0fe6e943e3fd1c6b5f0"
homepage "https://github.com/bcgsc/tigmint"
url "https://github.com/bcgsc/tigmint/releases/download/v1.2.10/tigmint-1.2.10.tar.gz"
sha256 "8e7b5d424ff69d5da7b117bef9996463b02205078ce0fb6e3074ca6c9933efa9"
license "GPL-3.0-only"
head "https://github.com/bcgsc/tigmint.git"
head "https://github.com/bcgsc/tigmint.git", branch: "master"

bottle do
root_url "https://ghcr.io/v2/brewsci/bio"
Expand All @@ -14,24 +16,40 @@
end

depends_on "bedtools"
depends_on "btllib"

Check warning on line 19 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-15)

tigmint: new dependency impact

Adding `btllib` adds 1 new recursive dependency on arm64_sequoia (6.9MB).

Check warning on line 19 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-26)

tigmint: new dependency impact

Adding `btllib` adds 1 new recursive dependency on arm64_tahoe (6.9MB).

Check warning on line 19 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-14)

tigmint: new dependency impact

Adding `btllib` adds 1 new recursive dependency on arm64_sonoma (6.9MB).

Check warning on line 19 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (ubuntu-latest)

tigmint: new dependency impact

Adding `btllib` adds 1 new recursive dependency on x86_64_linux (8.7MB).
depends_on "libdeflate"
depends_on "minimap2"
depends_on "numpy"
depends_on "python@3.9"
depends_on "python@3.14"

Check warning on line 23 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-15)

tigmint: new dependency impact

Adding `python@3.14` adds 6 new recursive dependencies on arm64_sequoia (122.4MB).

Check warning on line 23 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-26)

tigmint: new dependency impact

Adding `python@3.14` adds 6 new recursive dependencies on arm64_tahoe (122.2MB).

Check warning on line 23 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-14)

tigmint: new dependency impact

Adding `python@3.14` adds 7 new recursive dependencies on arm64_sonoma (123MB).

Check warning on line 23 in Formula/tigmint.rb

View workflow job for this annotation

GitHub Actions / build-bottles (ubuntu-latest)

tigmint: new dependency impact

Adding `python@3.14` adds 5 new recursive dependencies on x86_64_linux (86MB).
depends_on "samtools"

on_linux do
depends_on "xz"
depends_on "zlib-ng-compat"
end

def install
ENV.prepend_path "PATH", libexec/"bin"
xy = Language::Python.major_minor_version "python3"
python = formula_opt_bin("python@3.14")/"python3.14"
xy = Language::Python.major_minor_version python
ENV.prepend_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages"
inreplace "bin/tigmint-cut", "/usr/bin/env python3", Formula["python@3.9"].bin/"python3.9"
inreplace "bin/tigmint_molecule.py", "/usr/bin/env python3", Formula["python@3.9"].bin/"python3.9"
inreplace "bin/tigmint_molecule_paf.py", "/usr/bin/env python3", Formula["python@3.9"].bin/"python3.9"
system "pip3", "install", "--prefix=#{libexec}", "-r", "requirements.txt", "--no-binary=pysam"
# btllib is provided by Homebrew (its PyPI pin is unsatisfiable on modern
# Python) and numpy comes from the numpy formula; drop both from the pip list.
inreplace "requirements.txt" do |s|
s.gsub!(/^btllib\b.*\n/, "")
s.gsub!(/^numpy\b.*\n/, "")
end
system python, "-m", "pip", "install", "--prefix=#{libexec}",
"-r", "requirements.txt", "--no-binary=pysam"
bin.install Dir["bin/*"]
rewrite_shebang python_shebang_rewrite_info(python), *bin.children
system "make", "-C", "src"
libexec_src = Pathname.new("#{libexec}/src")
libexec_src.install "src/long-to-linked-pe"
bin.env_script_all_files libexec/"bin", PYTHONPATH: Dir[libexec/"lib/python*/site-packages"].first
btllib_python = formula_opt_lib("btllib")/"btllib/python"
site_packages = Dir[libexec/"lib/python*/site-packages"].first
bin.env_script_all_files libexec/"bin",
PYTHONPATH: "#{site_packages}#{File::PATH_SEPARATOR}#{btllib_python}"
end

test do
Expand Down
Loading