forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rnammer.rb
77 lines (66 loc) · 2.38 KB
/
rnammer.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
class Rnammer < Formula
desc "Predicts 5s/8s, 16s/18s, and 23s/28s ribosomal RNA in full genome sequences"
homepage "https://www.cbs.dtu.dk/services/RNAmmer/"
# doi "10.1093/nar/gkm160"
# tag "bioinformatics"
# The tarball may also be downloaded using this web form:
# https://www.cbs.dtu.dk/cgi-bin/nph-sw_request?rnammer
url "http://bioinformatics.se/resources_2/rnammer-1.2.src.tar.Z"
sha256 "c8f0df0c44e3c31b81de5b74de9e6033907976bfdc283ad8c3402af5efc2aae2"
bottle do
cellar :any
rebuild 1
sha256 "b078fa5dc6bf519898c8581e8ea732b50697d89c730129b3468cf2987a583aec" => :yosemite
sha256 "fef2fe67c4fb223f68c9b570a190e9d354c36d50f8d89d44f4d2dfe10a874b97" => :mavericks
sha256 "01e971ea063602f93c0b1b139c0da10e4501a4f9b775348d455a7035433a6001" => :mountain_lion
sha256 "f4af0bc58be8e4ba1d9c75d2eefaf6e04d6501273aee67e8d43445b2061638e8" => :x86_64_linux
end
depends_on "hmmer2"
# Fix "unknown platform"
patch :DATA
def install
share.mkdir
mv "lib", share/"rnammer"
man1.install "man/rnammer.1"
rmdir "man"
prefix.install Dir["*"]
bin.install_symlink "../rnammer", "../core-rnammer"
end
def caveats; <<-EOS.undent
For academic users there is no license fee. For the complete license see
#{opt_prefix}/LICENSE
There is also a web service at
https://www.cbs.dtu.dk/services/RNAmmer/
EOS
end
test do
system "#{bin}/rnammer", "-v"
end
end
__END__
diff --git a/rnammer b/rnammer
index b3382a9..a51c61d 100755
--- a/rnammer
+++ b/rnammer
@@ -32,10 +32,10 @@ my ($TEMP_WORKING_DIR , $multi,@MOL,%MOL_KEYS,$mol,$kingdom,%FLANK,$gff, $xml ,
## PROGRAM CONFIGURATION BEGIN
# the path of the program
-my $INSTALL_PATH = "/usr/cbs/bio/src/rnammer-1.2";
+my $INSTALL_PATH = "HOMEBREW_PREFIX/opt/rnammer";
# The library in which HMMs can be found
-my $HMM_LIBRARY = "$INSTALL_PATH/lib";
+my $HMM_LIBRARY = "$INSTALL_PATH/share/rnammer";
my $XML2GFF = "$INSTALL_PATH/xml2gff";
my $XML2FSA = "$INSTALL_PATH/xml2fsa";
@@ -46,7 +46,10 @@ my $RNAMMER_CORE = "$INSTALL_PATH/core-rnammer";
chomp ( my $uname = `uname`);
my $HMMSEARCH_BINARY;
my $PERL;
-if ( $uname eq "Linux" ) {
+if (1) {
+ $HMMSEARCH_BINARY = "HOMEBREW_PREFIX/opt/hmmer2/bin/hmmsearch";
+ $PERL = "perl";
+} elsif ( $uname eq "Linux" ) {
$HMMSEARCH_BINARY = "/usr/cbs/bio/bin/linux64/hmmsearch";
$PERL = "/usr/bin/perl";
} elsif ( $uname eq "IRIX64" ) {