forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bowtie.rb
64 lines (55 loc) · 2.33 KB
/
bowtie.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
class Bowtie < Formula
desc "Ultrafast memory-efficient short read aligner"
homepage "https://bowtie-bio.sourceforge.io/"
# doi "10.1186/gb-2009-10-3-r25"
# tag "bioinformatics"
url "https://github.com/BenLangmead/bowtie/archive/v1.2.0.tar.gz"
sha256 "dc4e7951b8eca56ce7714c47fd4e84f72badd5312ee9546c912af1963570f894"
head "https://github.com/BenLangmead/bowtie.git"
bottle do
cellar :any
sha256 "73df585d60aaae9619f9e701b482d3415bf5f68d3ba10c88b273f39282d159c7" => :sierra
sha256 "75f6a82b0dfab633523558a22f976781cfd89c6ea9fa1c7a11f1f749dcf52d00" => :el_capitan
sha256 "63211bbe99c6dff70eafb3da17e0a169ed90a74db879fa71e43a83741e9a84cf" => :yosemite
sha256 "fd6e78fa9373b66ba2f52d1fb0ba059676e3b2177cd5094dd2db55d5b277c2a7" => :x86_64_linux
end
depends_on "tbb"
if OS.linux?
# Needed for the test
resource "Perl::Clone" do
url "https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-0.38.tar.gz"
mirror "http://search.cpan.org/CPAN/authors/id/G/GA/GARU/Clone-0.38.tar.gz"
sha256 "9fb0534bb7ef6ca1f6cc1dc3f29750d6d424394d14c40efdc77832fad3cebde8"
end
resource "Test::Deep" do
url "https://cpan.metacpna.org/authors/id/R/RJ/RJBS/Test-Deep-1.126.tar.gz"
mirror "http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Deep-1.126.tar.gz"
sha256 "159b42451e4018d9da97994f4ac46d5166abf9b6f343db30071c8fd1cfe0c7c2"
end
end
def install
if OS.linux?
# Needed for the test
resource("Perl::Clone").stage do
system "perl", "Makefile.PL", "LIB=#{libexec}/PerlLib", "PREFIX=#{libexec}/vendor"
system "make", "install"
end
resource("Test::Deep").stage do
system "perl", "Makefile.PL", "LIB=#{libexec}/PerlLib", "PREFIX=#{libexec}/vendor"
system "make", "install"
end
end
system "make", "install", "prefix=#{prefix}"
doc.install "MANUAL", "NEWS", "TUTORIAL"
pkgshare.install "scripts", "genomes", "indexes", "reads"
inreplace pkgshare/"scripts/test/simple_tests.pl" do |s|
s.gsub! "$bowtie = \"\"", "$bowtie = \"#{bin}/bowtie\""
s.gsub! "$bowtie_build = \"\"", "$bowtie_build = \"#{bin}/bowtie-build\""
s.gsub! "--debug", ""
end
end
test do
ENV.prepend_path "PERL5LIB", "#{libexec}/PerlLib" unless OS.mac?
system "perl", pkgshare/"scripts/test/simple_tests.pl"
end
end