forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexabayes.rb
67 lines (59 loc) · 2.65 KB
/
exabayes.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
class Exabayes < Formula
desc "Large-scale Bayesian tree inference"
homepage "http://sco.h-its.org/exelixis/web/software/exabayes/"
url "http://sco.h-its.org/exelixis/material/exabayes/1.4.1/exabayes-1.4.1-src.tar.gz"
sha256 "23e00b361a29365757e760b1acbb9d71744d2be5d9c450f8afdfaf5594d8994f"
bottle do
cellar :any
sha256 "82489020ce980129b4bf9e60f04ae2369e622fc320c3ff79f3db11753e0234d1" => :yosemite
sha256 "f167fbaff7cf7e468903f4bd2d329c6d457fec135b6ea80c1ce3364f6d32a5ab" => :mavericks
sha256 "4ab4ed65c609e80b2e28b56703e3432ce280696b214f33ee69f8499683e8015f" => :mountain_lion
end
# Fix: ./src/comm/PendingSwap.hpp:50:8: error: no type named 'unique_ptr' in namespace 'std'
# ExaBayes needs std::unique_ptr, unordered_map, array
needs :cxx11
depends_on :mpi => [:cc, :cxx, :recommended]
def install
# Fix: ./src/comm/PendingSwap.hpp:50:8: error: no type named 'unique_ptr' in namespace 'std'
ENV.libcxx
args = %W[--disable-dependency-tracking --disable-silent-rules --prefix=#{prefix}]
args << "--enable-mpi" if build.with? "mpi"
system "./configure", *args
system "make", "install"
pkgshare.install "examples", "manual"
end
def caveats; <<-EOS.undent
The manual and example files are stored in
#{opt_prefix}/share/exabayes
EOS
end
test do
cd testpath do
(testpath/"config.nex").write <<-EOS.undent
#nexus
begin run;
numgen 10000
numruns 2
numcoupledchains 2
heatfactor 0.01
end;
EOS
(testpath/"aln.phy").write <<-EOS.undent
10 60
Cow ATGGCATATCCCATACAACTAGGATTCCAAGATGCAACATCACCAATCATAGAAGAACTA
Carp ATGGCACACCCAACGCAACTAGGTTTCAAGGACGCGGCCATACCCGTTATAGAGGAACTT
Chicken ATGGCCAACCACTCCCAACTAGGCTTTCAAGACGCCTCATCCCCCATCATAGAAGAGCTC
Human ATGGCACATGCAGCGCAAGTAGGTCTACAAGACGCTACTTCCCCTATCATAGAAGAGCTT
Loach ATGGCACATCCCACACAATTAGGATTCCAAGACGCGGCCTCACCCGTAATAGAAGAACTT
Mouse ATGGCCTACCCATTCCAACTTGGTCTACAAGACGCCACATCCCCTATTATAGAAGAGCTA
Rat ATGGCTTACCCATTTCAACTTGGCTTACAAGACGCTACATCACCTATCATAGAAGAACTT
Seal ATGGCATACCCCCTACAAATAGGCCTACAAGATGCAACCTCTCCCATTATAGAGGAGTTA
Whale ATGGCATATCCATTCCAACTAGGTTTCCAAGATGCAGCATCACCCATCATAGAAGAGCTC
Frog ATGGCACACCCATCACAATTAGGTTTTCAAGACGCAGCCTCTCCAATTATAGAAGAATTA
EOS
system *%W[#{bin}/yggdrasil -f aln.phy -m DNA -n test -s 100 -c config.nex -T 2]
system *%W[#{bin}/sdsf -f ExaBayes_topologies.test.0 ExaBayes_topologies.test.1]
system *%W[#{bin}/consense -n cons -f ExaBayes_topologies.test.0 ExaBayes_topologies.test.1]
end
end
end