picard-tools: import from homebrew/science (#21679)

This commit is contained in:
Shaun Jackman 2017-12-17 06:31:16 -08:00 committed by FX Coudert
parent edc39077bc
commit 94fd2571f1

25
Formula/picard-tools.rb Normal file
View file

@ -0,0 +1,25 @@
class PicardTools < Formula
desc "Tools for manipulating HTS data and formats"
homepage "https://broadinstitute.github.io/picard/"
url "https://github.com/broadinstitute/picard/releases/download/2.16.0/picard.jar"
sha256 "01cf3c930d2b4841960497491512d327bf669c1ed2e753152e1e651a27288c2d"
bottle :unneeded
depends_on :java => "1.8+"
def install
libexec.install "picard.jar"
bin.write_jar_script libexec/"picard.jar", "picard"
end
test do
(testpath/"test.fasta").write <<~EOS
>U00096.2:1-70
AGCTTTTCATTCTGACTGCAACGGGCAATATGTCT
CTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC
EOS
cmd = "#{bin}/picard NormalizeFasta I=test.fasta O=/dev/stdout"
assert_match "TCTCTG", shell_output(cmd)
end
end