homebrew-core/Formula/diamond.rb

50 lines
2.0 KiB
Ruby

class Diamond < Formula
desc "Accelerated BLAST compatible local sequence aligner"
homepage "https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/diamond/"
url "https://github.com/bbuchfink/diamond/archive/v0.9.36.tar.gz"
sha256 "870af89606330f6c0b57ed478d2d8237334ce8f5630eac770399ff431948bd59"
license "GPL-3.0"
bottle do
cellar :any_skip_relocation
sha256 "8b9bc94a6c96433ba341d4149cf7c9b2726e2ef08abd4a0eebc721444c71c315" => :big_sur
sha256 "f68458d1886716c4ee0c34e31187ea85e149cfcd72b190050ab464e5657a600a" => :catalina
sha256 "722f1d03a45520b61f51afee74e119732bae1fb90a775a0433382ab7ccf67d61" => :mojave
sha256 "ebda6089e20340b49dc7dc3144cc459d3a9b7e075dd699249e2fc6be61bf5a6e" => :high_sierra
end
depends_on "cmake" => :build
uses_from_macos "zlib"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"nr.faa").write <<~EOS
>gnl|alu|HSU14568_Alu_Sb_consensus_rf1
grarwltpvipalweaeaggsrgqeietilantvkprlyXkyknXpgvvagacspsysgg
XgrrmaXtreaelavsrdratalqpgrqsetpsqkk
>gnl|alu|HSU14568_Alu_Sb_consensus_rf2
agrggsrlXsqhfgrprradhevrrsrpswltrXnpvstkntkisrawwrapvvpatrea
eagewrepgrrslqXaeiaplhsslgdrarlrlkk
>gnl|alu|HSU14568_Alu_Sb_consensus_rf3
pgavahacnpstlggrggritrsgdrdhpgXhgetpsllkiqklagrgggrlXsqllgrl
rqengvnpgggacseprsrhctpawaterdsvskk
>gnl|alu|HSU14568_Alu_Sb_consensus_rf-1
fflrrslalsprlecsgaisahcklrlpgsrhspasasrvagttgarhharlifvflvet
gfhrvsqdgldlltsXsarlglpkcwdyrrepprpa
>gnl|alu|HSU14568_Alu_Sb_consensus_rf-2
ffXdgvslcrpgwsavarsrltassasrvhaillpqppeXlglqapattpgXflyfXXrr
gftvlarmvsisXprdppasasqsagitgvshrar
>gnl|alu|HSU14568_Alu_Sb_consensus_rf-3
ffetesrsvaqagvqwrdlgslqapppgftpfsclslpsswdyrrppprpanfcifsrdg
vspcXpgwsrspdlvirpprppkvlglqaXatapg
EOS
output = shell_output("#{bin}/diamond makedb --in nr.faa -d nr 2>&1")
assert_match "Processed 6 sequences, 572 letters.", output
end
end