35 lines
991 B
Ruby
35 lines
991 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.23.8/picard.jar"
|
|
sha256 "224b2928f7c8c27902bf4107c2bebe002f85bf99fcad5552b8ec0af6bb5ed429"
|
|
license "MIT"
|
|
|
|
livecheck do
|
|
url "https://github.com/broadinstitute/picard/releases/latest"
|
|
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
|
|
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
|