forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ensembl-tools.rb
46 lines (38 loc) · 1.31 KB
/
ensembl-tools.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
require "formula"
class EnsemblTools < Formula
homepage "http://www.ensembl.org/info/docs/tools/index.html"
url "https://github.com/Ensembl/ensembl-tools/archive/release/75.tar.gz"
sha1 "67ecf5d874e6d016d7d015707bfdbcf17da3493b"
head "https://github.com/Ensembl/ensembl-tools.git"
depends_on "Bio::Perl" => :perl
depends_on "Mozilla::CA" => :perl
def install
libexec.mkdir
cd "scripts/variant_effect_predictor" do
ENV["PERL5LIB"] = libexec
system "perl INSTALL.pl -a a -d #{libexec}"
end
(bin/"variant_effect_predictor").write <<-EOS.undent
#!/bin/sh
set -eu
export PERL5LIB=#{libexec}
exec #{libexec}/variant_effect_predictor.pl "$@"
EOS
libexec.install %w[
scripts/assembly_converter/AssemblyMapper.pl
scripts/id_history_converter/IDmapper.pl
scripts/region_reporter/region_report.pl
scripts/variant_effect_predictor/convert_cache.pl
scripts/variant_effect_predictor/filter_vep.pl
scripts/variant_effect_predictor/gtf2vep.pl
scripts/variant_effect_predictor/variant_effect_predictor.pl]
end
def caveats; <<-EOS.undent
Add the following to your ~/.bash_profile or ~/.zprofile:
export PERL5LIB=#{libexec}:$PERL5LIB
EOS
end
test do
system "#{bin}/variant_effect_predictor --help"
end
end