homebrew-core/Formula/diamond.rb
2019-11-20 08:20:33 -05:00

46 lines
1.9 KiB
Ruby

class Diamond < Formula
desc "Accelerated BLAST compatible local sequence aligner"
homepage "https://ab.inf.uni-tuebingen.de/software/diamond/"
url "https://github.com/bbuchfink/diamond/archive/v0.9.29.tar.gz"
sha256 "9ccec6417b4a7bfcd616e3daee6b1d9e5f61340ae241e8c374b01176124ba635"
bottle do
cellar :any_skip_relocation
sha256 "b0bf57ae646521f6911054c707222a979d384f426ba60186b631b6069bb006fb" => :catalina
sha256 "cebb87be2e7fa2a3de21a52b2e0e3a4a46701381646a81aeaaf56aa38558472a" => :mojave
sha256 "8c63422b3bf6b46b6fb6bf484f199f5b18d1c58fe7dc091e4d1feae116fd7da1" => :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