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.14.tar.gz" sha256 "de870a7806ac0aa47b97c9b784dd7201e2c8e11a122003bde440d926211b911e" bottle do cellar :any_skip_relocation sha256 "928fed8fd55909345ce863e9b076f9ade4197bbf0d58afec49facd4195082d43" => :high_sierra sha256 "64af66380baa524880869f502073b52824edf828ee80b46c7a9b1c76380bf782" => :sierra sha256 "6da05e608379790e434c8887fe08edad3ae68be99f17bea0a02bd39015e316a6" => :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