homebrew-core/Formula/picard-tools.rb

35 lines
915 B
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.0/picard.jar"
sha256 "faf2434da84fe21b516d57817767920fdedfc19ebdc01d9cae8d6d3314f7e897"
license "MIT"
livecheck do
url :stable
strategy :github_latest
end
bottle :unneeded
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