homebrew-core/Formula/blast.rb
2018-10-15 17:34:58 +02:00

45 lines
1.7 KiB
Ruby

class Blast < Formula
desc "Basic Local Alignment Search Tool"
homepage "https://blast.ncbi.nlm.nih.gov/"
url "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.7.1+-src.tar.gz"
mirror "http://mirrors.vbi.vt.edu/mirrors/ftp.ncbi.nih.gov/blast/executables/LATEST/ncbi-blast-2.7.1+-src.tar.gz"
version "2.7.1"
sha256 "10a78d3007413a6d4c983d2acbf03ef84b622b82bd9a59c6bd9fbdde9d0298ca"
bottle do
rebuild 1
sha256 "1f0bdc5f64acf3ce913b36c3531ca631669bd2afbf5eaf8aa66d94432d497a31" => :mojave
sha256 "18545f187e9af022d46e20bccbf4666c0d89033c7a3fe471174dc9bfda4abf94" => :high_sierra
sha256 "243c089a32cce6871b3ca55da06749257e1de2cec3c8b46301b09a5135776711" => :sierra
end
depends_on "lmdb"
conflicts_with "proj", :because => "both install a `libproj.a` library"
def install
cd "c++" do
# Use ./configure --without-boost to fix
# error: allocating an object of abstract class type 'ncbi::CNcbiBoostLogger'
# Boost is used only for unit tests.
# See https://github.com/Homebrew/homebrew-science/pull/3537#issuecomment-220136266
system "./configure", "--prefix=#{prefix}",
"--without-debug",
"--without-boost"
# Fix the error: install: ReleaseMT/lib/*.*: No such file or directory
system "make"
system "make", "install"
end
end
test do
(testpath/"test.fasta").write <<~EOS
>U00096.2:1-70
AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC
EOS
output = shell_output("#{bin}/blastn -query test.fasta -subject test.fasta")
assert_match "Identities = 70/70", output
end
end