37 lines
1.0 KiB
Ruby
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.26.10/picard.jar"
|
|
sha256 "84a056466cf23155e2126b33fde61b5485217b365d4899c1bdc82fe9284f2395"
|
|
license "MIT"
|
|
|
|
livecheck do
|
|
url :stable
|
|
strategy :github_latest
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "49725e2504b7a97fd32fa8b18f12dda3331f0f42870cf0c8c0aa1fbe8fa6c661"
|
|
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
|