forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iva.rb
69 lines (58 loc) · 2.59 KB
/
iva.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
class Iva < Formula
desc "Iterative Virus Assembler"
homepage "https://github.com/sanger-pathogens/iva"
url "https://github.com/sanger-pathogens/iva/archive/v1.0.8.tar.gz"
sha256 "20cac9b6683a2a33dc8cf790287f0eb8c3b4d02a287a380a071d821c1e0f1040"
head "https://github.com/sanger-pathogens/iva.git"
# doi "10.1093/bioinformatics/btv120"
# tag "bioinformatics"
bottle do
rebuild 1
sha256 "9bcc18b7dbc779714def1347b7b76bcdffa2fd3db6fce0c08ead2fa03260711f" => :sierra
sha256 "1ec35ab8439d88dc0e6287493b691d564d073e785f85274f6b810a2a37e715ab" => :el_capitan
sha256 "891e1a44af5d9150f49d795b33a7bd09579cfa92425e8f6cc0b860b6d0b22870" => :yosemite
sha256 "85a3539747ae1b226d5e05ba5f1b6f4df77c5ae334bccc73a68eff6dd307677e" => :x86_64_linux
end
depends_on :python3
depends_on "kmc"
depends_on "mummer"
depends_on "smalt"
depends_on "trimmomatic"
depends_on "samtools"
resource "numpy" do
url "https://files.pythonhosted.org/packages/a5/16/8a678404411842fe02d780b5f0a676ff4d79cd58f0f22acddab1b392e230/numpy-1.12.1.zip"
sha256 "a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542"
end
resource "pysam" do
url "https://pypi.python.org/packages/source/p/pysam/pysam-0.8.3.tar.gz"
sha256 "343e91a1882278455ef9a5f3c9fc4921c37964341785bf22432381d18e6d115e"
end
resource "pyfastaq" do
url "https://pypi.python.org/packages/source/p/pyfastaq/pyfastaq-3.5.0.tar.gz"
sha256 "599b28db5a05072335eacd3cea458aff511239e34a9559aaf2e7fe94cce785a9"
end
resource "decorator" do
url "https://pypi.python.org/packages/source/d/decorator/decorator-3.4.2.tar.gz"
sha256 "7320002ce61dea6aa24adc945d9d7831b3669553158905cdd12f5d0027b54b44"
end
resource "networkx" do
url "https://pypi.python.org/packages/source/n/networkx/networkx-1.10rc2.tar.gz"
sha256 "bd7a732a3747d94e2e53eebce3ab636cda8cc53dcf53164ecfa39fda20f5e7f6"
end
def install
version = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{version}/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{version}/site-packages"
%w[numpy pysam pyfastaq decorator networkx].each do |r|
resource(r).stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
end
system "python3", *Language::Python.setup_install_args(libexec)
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
assert_match "-f reads_fwd -r reads_rev", shell_output("#{bin}/iva -h 2>&1", 0)
end
end