homebrew-core/Formula/htslib.rb

31 lines
1 KiB
Ruby
Raw Normal View History

class Htslib < Formula
desc "C library for high-throughput sequencing data formats"
2018-02-15 18:16:26 +00:00
homepage "https://www.htslib.org/"
url "https://github.com/samtools/htslib/releases/download/1.8/htslib-1.8.tar.bz2"
sha256 "c0ef1eec954a98cc708e9f99f6037db85db45670b52b6ab37abcc89b6c057ca1"
2017-10-31 13:01:01 +00:00
bottle do
cellar :any
2018-04-03 22:04:42 +00:00
sha256 "9bbd0f83d2f5e7ea2d9889bfabb6f47aba7ea5d9dfb9070f0566bd7bba9e4f32" => :high_sierra
sha256 "5ec146ac61a5e7cff8c8f71f3a4ddf64871d4dd3dcfd043e4b5630292abe39fa" => :sierra
sha256 "b122c09b37bf213d9eca36ae852011af1c56210d755dc44103ca11882b4a9b7d" => :el_capitan
2017-10-31 13:01:01 +00:00
end
depends_on "xz"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
pkgshare.install "test"
end
test do
sam = pkgshare/"test/ce#1.sam"
assert_match "SAM", shell_output("#{bin}/htsfile #{sam}")
system "#{bin}/bgzip -c #{sam} > sam.gz"
assert_predicate testpath/"sam.gz", :exist?
system "#{bin}/tabix", "-p", "sam", "sam.gz"
assert_predicate testpath/"sam.gz.tbi", :exist?
end
end