htslib: import from homebrew/science
Closes #18733. Signed-off-by: JCount <JCount42@gmail.com>
This commit is contained in:
parent
07fae22968
commit
3b1e811f4c
1 changed files with 24 additions and 0 deletions
24
Formula/htslib.rb
Normal file
24
Formula/htslib.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
class Htslib < Formula
|
||||
desc "C library for high-throughput sequencing data formats"
|
||||
homepage "http://www.htslib.org/"
|
||||
url "https://github.com/samtools/htslib/releases/download/1.6/htslib-1.6.tar.bz2"
|
||||
sha256 "9588be8be0c2390a87b7952d644e7a88bead2991b3468371347965f2e0504ccb"
|
||||
revision 1
|
||||
|
||||
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
|
Loading…
Reference in a new issue