diff options
author | Luke Diorio-Toth <ldioriototh@gmail.com> | 2022-08-05 02:16:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 09:16:14 +0200 |
commit | 901e6cb5e17d0a2df88554c454d5ec787828e37c (patch) | |
tree | 62e90bea7a3390351c81e89e53e1c4fe3e0afe78 /var | |
parent | 08f403146ea6f94f4869bbbfdcc6fc6367ac168f (diff) | |
download | spack-901e6cb5e17d0a2df88554c454d5ec787828e37c.tar.gz spack-901e6cb5e17d0a2df88554c454d5ec787828e37c.tar.bz2 spack-901e6cb5e17d0a2df88554c454d5ec787828e37c.tar.xz spack-901e6cb5e17d0a2df88554c454d5ec787828e37c.zip |
bracken: added new version and removed depreciated version (#31904)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/bracken/package.py | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/var/spack/repos/builtin/packages/bracken/package.py b/var/spack/repos/builtin/packages/bracken/package.py index 73e2ae1cd3..d2fa35e980 100644 --- a/var/spack/repos/builtin/packages/bracken/package.py +++ b/var/spack/repos/builtin/packages/bracken/package.py @@ -14,41 +14,30 @@ class Bracken(Package): sequences from a metagenomics sample.""" homepage = "https://ccb.jhu.edu/software/bracken" - url = "https://github.com/jenniferlu717/Bracken/archive/1.0.0.tar.gz" + url = "https://github.com/jenniferlu717/Bracken/archive/v2.7.tar.gz" - version("1.0.0", sha256="8ee736535ad994588339d94d0db4c0b1ba554a619f5f96332ee09f2aabdfe176") + version("2.7", sha256="1795ecd9f9e5582f37549795ba68854780936110a2f6f285c3e626d448cd1532") - depends_on("perl", type=("build", "link", "run")) - depends_on("python@2.7:", type=("build", "link", "run")) - depends_on("perl-exporter-tiny") - depends_on("perl-list-moreutils") - depends_on("perl-parallel-forkmanager") + depends_on("python", type="run") + depends_on("kraken2", type="run") def install(self, spec, prefix): - mkdirp(prefix.bin) - install_tree("sample_data", prefix.sample_data) - - filter_file(r"#!/bin/env perl", "#!/usr/bin/env perl", "count-kmer-abundances.pl") - - filter_file( - r"#!/usr/bin/python", - "#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command.path)), - "est_abundance.py", - ) - - filter_file( - r"#!/usr/bin/python", - "#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command.path)), - "generate_kmer_distribution.py", - ) - - files = ( - "count-kmer-abundances.pl", - "est_abundance.py", - "generate_kmer_distribution.py", - ) - + mkdirp(prefix.bin.src) + # installer builds kmer2read_distr in src chmod = which("chmod") - for name in files: - install(name, prefix.bin) - chmod("+x", join_path(self.prefix.bin, name)) + chmod("+x", "./install_bracken.sh") + installer = Executable("./install_bracken.sh") + installer(self.stage.source_path) + # move main scripts to bin + install("bracken", prefix.bin) + install("bracken-build", prefix.bin) + install("./src/kmer2read_distr", prefix.bin) + install("./analysis_scripts/combine_bracken_outputs.py", prefix.bin) + chmod("+x", join_path(prefix.bin, "combine_bracken_outputs.py")) + # move scripts to src and create symlinks + files = ("est_abundance.py", "generate_kmer_distribution.py") + for file in files: + filepath = join_path("./src", file) + if os.path.isfile(filepath): + install(filepath, prefix.bin.src) + symlink(join_path(prefix.bin.src, file), join_path(prefix.bin, file)) |