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.22.tar.gz" sha256 "35e518cfa0ac2fbc57e422d380bdb5123c6335742dd7965b76c34c95f241b729" bottle do cellar :any_skip_relocation sha256 "469c7756dc9eca0ed7ebd8a156af03da9352ac0358f2bcfd0eb3d346d00b6d51" => :high_sierra sha256 "607d100998ea30e170cf8660efd0db2ada0cf2aff0fc01d753b8f562780f1066" => :sierra sha256 "6b5c96a2c5847c0e6ecef931175082b90c4436d91fbcd7331cda92a9bb682bb5" => :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