Skip to content

Commit

Permalink
busco: create config.ini
Browse files Browse the repository at this point in the history
Closes brewsci#642.

Signed-off-by: Gabriel Leventhal <[email protected]>
  • Loading branch information
gaberoo authored and tseemann committed Jun 11, 2019
1 parent 2884ae7 commit 74812fb
Showing 1 changed file with 46 additions and 6 deletions.
52 changes: 46 additions & 6 deletions Formula/busco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Busco < Formula
homepage "https://busco.ezlab.org"
url "https://gitlab.com/ezlab/busco/repository/3.0.2/archive.tar.bz2"
sha256 "cd0699545a126c7cc94604eef7c8dc50379b5d11becbad3a0f55d995a4c5e1c0"
revision 1
revision 2
head "https://gitlab.com/ezlab/busco.git"

bottle do
Expand All @@ -15,17 +15,57 @@ class Busco < Formula
sha256 "f77caa27c9ea8e866682a00cd93bbb626f6139b6a95e1c7354b0268ad806a253" => :x86_64_linux
end

depends_on "augustus"
depends_on "blast"
depends_on "hmmer"
depends_on "python"
depends_on "blast" => :recommended
# Also depends on augustus and hmmer

def install
inreplace Dir["scripts/*.py"], "#!/usr/bin/env python", "#!#{HOMEBREW_PREFIX}/bin/python3"
system "python3", "setup.py", "install", "--prefix=#{prefix}"
bin.install Dir["scripts/*"]
bin.install_symlink "run_BUSCO.py" => "busco"

libexec.install Dir["scripts/*"]
(bin/"busco").write_env_script(libexec/"run_BUSCO.py", :AUGUSTUS_CONFIG_PATH => "#{Formula["augustus"].prefix}/config/")

doc.install "BUSCO_v3_userguide.pdf"
prefix.install "config/config.ini.default"
prefix.install "config"

(prefix/"config/config.ini").write <<~EOS
[busco]
[tblastn]
path = #{Formula["blast"].bin}
[makeblastdb]
path = #{Formula["blast"].bin}
[augustus]
path = #{Formula["augustus"].bin}
[etraining]
path = #{Formula["augustus"].bin}
[gff2gbSmallDNA.pl]
path = #{Formula["augustus"].prefix}/scripts/
[new_species.pl]
path = #{Formula["augustus"].prefix}/scripts/
[optimize_augustus.pl]
path = #{Formula["augustus"].prefix}/scripts/
[hmmsearch]
path = #{Formula["hmmer"].bin}
[Rscript]
path = #{HOMEBREW_PREFIX}/bin
EOS
end

def caveats; <<~EOS
You probably also want to download lineage datasets to run BUSCO:
https://busco.ezlab.org
To generate graphs, also make sure a working R is installed:
brew cask install r
or alternatively
brew install r
EOS
end

test do
Expand Down

0 comments on commit 74812fb

Please sign in to comment.