From 6f0ba3f37d9d6d328fd4d37dbb6f512ee2233497 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 7 Jan 2018 18:10:36 -0800 Subject: [PATCH] bioawk: import from homebrew/science Closes #22544. Signed-off-by: ilovezfs --- Formula/bioawk.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Formula/bioawk.rb diff --git a/Formula/bioawk.rb b/Formula/bioawk.rb new file mode 100644 index 00000000000..497a2c02cf7 --- /dev/null +++ b/Formula/bioawk.rb @@ -0,0 +1,25 @@ +class Bioawk < Formula + desc "AWK modified for biological data" + homepage "https://github.com/lh3/bioawk" + url "https://github.com/lh3/bioawk/archive/v1.0.tar.gz" + sha256 "5cbef3f39b085daba45510ff450afcf943cfdfdd483a546c8a509d3075ff51b5" + + def install + # Fix make: *** No rule to make target `ytab.h', needed by `b.o'. + ENV.deparallelize + + system "make" + bin.install "bioawk" + man1.install "awk.1" => "bioawk.1" + end + + test do + (testpath/"test.fasta").write <<~EOS + >U00096.2:1-70 + AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT + CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC + EOS + cmd = "#{bin}/bioawk -cfastx '{print length($seq)}' test.fasta" + assert_equal "70", shell_output(cmd).chomp + end +end