forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbam2wig.rb
29 lines (24 loc) · 789 Bytes
/
bam2wig.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Bam2wig < Formula
desc "Generating read coverage profile (WIG file) from a BAM file."
homepage "http://www.epigenomes.ca/tools-and-software"
url "http://www.epigenomes.ca/resources/BAM2WIG/BAM2WIG-1.0.0.jar"
sha256 "133f961de9f394973322ac7b3f01622fcc85a6e29c697c2df3652e8cf0aa690e"
# tag "bioinformatics"
bottle :unneeded
depends_on :java
def install
java = share/"java"
java.install Dir["*.jar"]
bin.write_jar_script java/"BAM2WIG-1.0.0.jar", "bam2wig"
end
def caveats
<<-EOS.undent
The BAM2WIG JAR files are installed to
#{HOMEBREW_PREFIX}/share/java
EOS
end
test do
assert_match "Usage", shell_output("java -jar #{share}/java/BAM2WIG-1.0.0.jar")
assert_match "Usage", shell_output("#{bin}/bam2wig")
end
end