From 3f421d70e4f927a33169dca1f3e369cc90b16c25 Mon Sep 17 00:00:00 2001 From: tmozgach Date: Thu, 21 Dec 2017 16:36:39 -0800 Subject: [PATCH] diamond: import from homebrew/science Closes #22014. Signed-off-by: ilovezfs --- Formula/diamond.rb | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Formula/diamond.rb diff --git a/Formula/diamond.rb b/Formula/diamond.rb new file mode 100644 index 00000000000..e1f0dddab84 --- /dev/null +++ b/Formula/diamond.rb @@ -0,0 +1,38 @@ +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.13.tar.gz" + sha256 "066d2744ef9e8f3d6f7eba5e6eb226434299b18574c8716bbdd8faca31b325de" + + 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