homebrew-core/Formula/picard-tools.rb

37 lines
1.0 KiB
Ruby

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.25.5/picard.jar"
sha256 "f7fa9784b84d384abfcbd77076f5ceab7b2797dc863ac35fd41470daa3efe3a5"
license "MIT"
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 cellar: :any_skip_relocation, all: "bdaf5ca6f12440de58e1513ae29215c776978e33b4093c27daa346d18258068b"
end
depends_on "openjdk"
def install
libexec.install "picard.jar"
(bin/"picard").write <<~EOS
#!/bin/bash
exec "#{Formula["openjdk"].opt_bin}/java" $JAVA_OPTS -jar "#{libexec}/picard.jar" "$@"
EOS
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