forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphlan.rb
28 lines (24 loc) · 978 Bytes
/
graphlan.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
class Graphlan < Formula
desc "Render circular taxonomic and phylogenetic trees"
homepage "https://bitbucket.org/nsegata/graphlan/wiki/Home"
# tag "bioinformatics"
url "https://[email protected]/nsegata/graphlan", :using => :hg, :tag => "1.0"
depends_on LanguageModuleRequirement.new :python, "biopython", "Bio"
depends_on "matplotlib" => :python
def install
prefix.install Dir["*.py"], "src", "pyphlan"
bin.install_symlink "../graphlan.py" => "graphlan"
bin.install_symlink "../graphlan_annotate.py" => "graphlan_annotate"
pkgshare.install "examples", "export2graphlan"
doc.install "license.txt", "readme.txt"
end
test do
dir = pkgshare/"examples/simple"
xml = "out.xml"
png = "out.png"
system "graphlan_annotate", "#{dir}/core_genes.txt", xml, "--annot", "#{dir}/annot.txt"
assert File.exist?(xml)
system "graphlan", xml, png, "--dpi", "150", "--size", "4", "--pad", "0.2"
assert File.exist?(png)
end
end