homebrew-core/Formula/mmseqs2.rb
2018-03-08 08:33:42 -08:00

55 lines
1.8 KiB
Ruby

class Mmseqs2 < Formula
desc "Software suite for very fast protein sequence search and clustering"
homepage "https://mmseqs.org/"
url "https://github.com/soedinglab/MMseqs2/archive/2-23394.tar.gz"
version "2-23394"
sha256 "36763fff4c4de1ab6cfc37508a2ee9bd2f4b840e0c9415bd1214280f67b67072"
bottle do
cellar :any
sha256 "7bb4f65a43a6ef0f0aa9cc252e8fe531e2d506d2f9eb9e974f8615b651f6bed6" => :high_sierra
sha256 "b512f8115a044f9461a756c45b4820d788ee84b5921c7e76db31be97d84961c4" => :sierra
sha256 "6ad606c732041c883472316877d6145fb1958209e16688cbd9bcdf011127e197" => :el_capitan
end
depends_on "cmake" => :build
depends_on "gcc"
cxxstdlib_check :skip
fails_with :clang # needs OpenMP support
resource "documentation" do
url "https://github.com/soedinglab/MMseqs2.wiki.git",
:revision => "fda4cf3f63e4c5b01be9d6b66f6666e81cc8ca99"
end
def install
args = *std_cmake_args << "-DHAVE_TESTS=0" << "-DHAVE_MPI=0"
args << "-DVERSION_OVERRIDE=#{version}"
args << "-DHAVE_SSE4_1=1" if build.bottle?
system "cmake", ".", *args
system "make", "install"
resource("documentation").stage { doc.install Dir["*"] }
pkgshare.install "examples"
bash_completion.install "util/bash-completion.sh" => "mmseqs.sh"
end
def caveats
unless Hardware::CPU.sse4?
"MMseqs2 requires at least SSE4.1 CPU instruction support. The binary will not work correctly."
end
end
test do
system "#{bin}/mmseqs", "createdb", "#{pkgshare}/examples/QUERY.fasta", "q"
system "#{bin}/mmseqs", "cluster", "q", "res", "tmp", "-s", "1"
assert_predicate testpath/"res", :exist?
assert_predicate (testpath/"res").size, :positive?
assert_predicate testpath/"res.index", :exist?
assert_predicate (testpath/"res.index").size, :positive?
end
end