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.21.tar.gz" sha256 "3f10e089c24d24f3066f3a58fa01bf356c4044e0a0bcab081b9bf1a8d946c9b1" bottle do cellar :any_skip_relocation sha256 "9ca0055330c8d56ac83eb84733173a3631626145289a277c500e27b4e6012233" => :high_sierra sha256 "37fa311f26d1d4ec2f8a2bc782007d4cce5c4e762932323a7e50600c026cf600" => :sierra sha256 "3487d71e213fa4c6b47247cb611f5a120487419d6e2d17eb39de555c0dbe8263" => :el_capitan end depends_on "cmake" => :build 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") assert_match "Processed 6 sequences, 572 letters.", output end end