homebrew-core/Formula/diamond.rb

48 lines
1.9 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.35.tar.gz"
sha256 "21d25780de6dacf4f965a1c583cf511b19f04def9289387c793e5a175061452d"
bottle do
cellar :any_skip_relocation
sha256 "924260e8b7469bfb2441f4b07605f250f9e820fbd7b6ec00c820a4b00fe0b923" => :catalina
sha256 "21f906530feeb8cdbbd5e4f158b121c44d576cb1316c2f5cd157245685c2969d" => :mojave
sha256 "3e33f6e836be02b2b5d8af28753097d0d3c3fba2ae00c4a72b2bf1e7ae1e080e" => :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