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.21.3/picard.jar" sha256 "dac2d90d2c82912f6ffbb46239ccd13b2ed9d103f2a3368d4181283f97b02f68" 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