Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions Formula/ntedit.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class Ntedit < Formula
# cite Warren_2019: "https://doi.org/10.1093/bioinformatics/btz400"
desc "Scalable genome assembly polishing"
homepage "https://github.com/bcgsc/ntEdit"
url "https://github.com/bcgsc/ntEdit.git",
tag: "v2.0.3",
revision: "d004dbc6166f044d7d576dac3f8f7c81c180e008"
tag: "v2.1.1",
revision: "1679c966d10f7805525633d7b9110aeff6585fa0"
license "GPL-3.0-or-later"
head "https://github.com/bcgsc/ntEdit.git"
head "https://github.com/bcgsc/ntEdit.git", branch: "master"

bottle do
root_url "https://ghcr.io/v2/brewsci/bio"
Expand All @@ -26,6 +26,7 @@
depends_on "brewsci/bio/btllib"
depends_on "brewsci/bio/ntcard"
depends_on "brewsci/bio/nthits"
depends_on "brewsci/bio/ntstat"

Check warning on line 29 in Formula/ntedit.rb

View workflow job for this annotation

GitHub Actions / build-bottles (ubuntu-latest)

ntedit: new dependency impact

Adding `brewsci/bio/ntstat` adds 1 new recursive dependency on x86_64_linux (0B, plus 1 unknown size).

Check warning on line 29 in Formula/ntedit.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-14)

ntedit: new dependency impact

Adding `brewsci/bio/ntstat` adds 1 new recursive dependency on arm64_sonoma (0B, plus 1 unknown size).

Check warning on line 29 in Formula/ntedit.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-15)

ntedit: new dependency impact

Adding `brewsci/bio/ntstat` adds 1 new recursive dependency on arm64_sequoia (0B, plus 1 unknown size).

Check warning on line 29 in Formula/ntedit.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-26)

ntedit: new dependency impact

Adding `brewsci/bio/ntstat` adds 1 new recursive dependency on arm64_tahoe (0B, plus 1 unknown size).
depends_on "python@3.13"
depends_on "snakemake"

Expand All @@ -38,7 +39,7 @@

def install
inreplace "run-ntedit", "#!/usr/bin/env python3",
"#!#{formula_opt_libexec("snakemake")}/bin/python3.13"
"#!#{formula_opt_libexec("snakemake")}/bin/python3"
system "meson", "setup", "build", "--prefix", prefix
cd "build" do
system "ninja", "install"
Expand Down
65 changes: 65 additions & 0 deletions Formula/ntstat.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
class Ntstat < Formula
desc "Compute k-mer statistics and Bloom filters from sequencing data"
homepage "https://github.com/bcgsc/ntstat"
url "https://github.com/bcgsc/ntstat/archive/refs/tags/v1.0.1.tar.gz"
sha256 "f5b365d4f8723ae108022fab7d7c67437aca70717ba81f4002eec13bab84c25a"
license "GPL-3.0-only"
head "https://github.com/bcgsc/ntstat.git", branch: "main"

depends_on "argparse" => :build
depends_on "cmake" => :build
depends_on "indicators" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pybind11" => :build
depends_on "tabulate" => :build
depends_on "btllib"
depends_on "python@3.13"

on_macos do
depends_on "libomp"
end

def install
# Pin the build to python@3.13 so the compiled extension modules match the
# interpreter that runs the installed launcher (python@3.13 only ships the
# versioned python3.13 / python3.13-config programs).
inreplace "meson.build" do |s|
s.gsub! "find_installation('python3')", "find_installation('python3.13')"
s.gsub! "find_program('python3-config')", "find_program('python3.13-config')"
end

# argparse, indicators and tabulate are header-only libraries. Homebrew ships
# them with CMake configs only, and meson's dependency() lookup fails in the
# build sandbox (the pkg-config shim is disabled and indicators' CMake config
# errors out). Point the module builds at their headers directly instead.
header_only = {
"argparse" => formula_opt_include("argparse"),
"indicators" => formula_opt_include("indicators"),
"tabulate" => formula_opt_include("tabulate"),
}
inreplace Dir["src/modules/{filter,count}/meson.build"] do |s|
header_only.each do |name, inc|
s.gsub! "dependency('#{name}')", "declare_dependency(compile_args: ['-I#{inc}'])"
end
end

# Disable LTO: it makes meson probe for llvm-ar (absent), and is unnecessary
# for these Python extension modules.
system "meson", "setup", "build", "--prefix", prefix, "-Db_lto=false"
system "meson", "install", "-C", "build"

# The launcher imports its bundled extension modules (ntstat.filter, ...),
# so point it at the packaged site-packages and the pinned interpreter.
site_packages = prefix/"lib/python3.13/site-packages"
libexec.install bin/"ntstat"
inreplace libexec/"ntstat", "#!/usr/bin/env python3",
"#!#{formula_opt_bin("python@3.13")}/python3.13"
(bin/"ntstat").write_env_script libexec/"ntstat", PYTHONPATH: site_packages
end

test do

Check failure on line 61 in Formula/ntstat.rb

View workflow job for this annotation

GitHub Actions / build-bottles (ubuntu-latest)

`brew test --verbose brewsci/bio/ntstat` failed on Linux x86_64!

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:66:in '<main>'

Check failure on line 61 in Formula/ntstat.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-14)

`brew test --verbose brewsci/bio/ntstat` failed on macOS Sonoma (14) on Apple Silicon!

/opt/homebrew/Library/Homebrew/test.rb:66:in '<main>'

Check failure on line 61 in Formula/ntstat.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-15)

`brew test --verbose brewsci/bio/ntstat` failed on macOS Sequoia (15) on Apple Silicon!

/opt/homebrew/Library/Homebrew/test.rb:66:in '<main>'

Check failure on line 61 in Formula/ntstat.rb

View workflow job for this annotation

GitHub Actions / build-bottles (macos-26)

`brew test --verbose brewsci/bio/ntstat` failed on macOS Tahoe (26) on Apple Silicon!

/opt/homebrew/Library/Homebrew/test.rb:66:in '<main>'
assert_match version.to_s, shell_output("#{bin}/ntstat --version")
assert_match "filter", shell_output("#{bin}/ntstat filter --help")
end
end
Loading