diff options
author | Teague Sterling <teaguesterling@users.noreply.github.com> | 2024-10-02 07:21:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 15:21:06 +0100 |
commit | 1c528719cbb25e62c71ccf683aa4988b3b4ee61c (patch) | |
tree | ccf8fc0f60d0a977618c30326a272687c4013d5d | |
parent | f3faeb0f7708a8f6de2425876630b4af52559201 (diff) | |
download | spack-1c528719cbb25e62c71ccf683aa4988b3b4ee61c.tar.gz spack-1c528719cbb25e62c71ccf683aa4988b3b4ee61c.tar.bz2 spack-1c528719cbb25e62c71ccf683aa4988b3b4ee61c.tar.xz spack-1c528719cbb25e62c71ccf683aa4988b3b4ee61c.zip |
perl-bio-ensembl-variation: new package (#44507)
* Adding the perl-bio-db-bigfile package
* Adding perl-bio-ensembl-variation package
* Adding perl-bio-ensembl-io package
* Update package.py
* Update package.py
* Update package.py
* Update package.py
* Update package.py
* Updating dependent package handling
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Updating dependent package handling
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Reverting variants
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Update package.py
* Rename package.py to package.py
* Update package.py
* Update package.py
* Update package.py
* Fix variant installation and dependencies
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Styles
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Removing unneeded dependencies
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
* Update package.py
* Update package.py
* Update package.py
* perl-bio-ensembl: update sha256 of 112
* perl-bio-ensembl-variation: add perl-bio-ensembl-funcgen@{vers}
---------
Signed-off-by: Teague Sterling <teaguesterling@gmail.com>
Co-authored-by: Bernhard Kaindl <bernhardkaindl7@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py | 88 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/perl-bio-ensembl/package.py | 2 |
2 files changed, 89 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py new file mode 100644 index 0000000000..0078c28061 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-bio-ensembl-variation/package.py @@ -0,0 +1,88 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.package import * + + +class PerlBioEnsemblVariation(Package): + """The Ensembl Variation Perl API and SQL schema.""" + + homepage = "http://www.ensembl.org/info/docs/api/variation/" + url = "https://github.com/Ensembl/ensembl-variation/archive/release/112.zip" + + maintainers("teaguesterling") + + license("APACHE-2.0", checked_by="teaguesterling") + + for vers, sha in [ + ("112", "ad75ff0a9efbf2d5c10ab5087d414bac685819664d01fbe4a9765393bd742a7c"), + ("111", "b2171b3f5f82a2b7e849c0ec8dc254f4bace4b3faba1b3ab75c5eea596e33bef"), + ("110", "210d627dcb867d9fda3a0d94428da256f394c32e34df5171b9b9e604507e1f05"), + ]: + version(vers, sha256=sha) + depends_on(f"perl-bio-ensembl@{vers}", when=f"@{vers}") + depends_on(f"perl-bio-ensembl-io@{vers}", when=f"@{vers}+tools", type="run") + depends_on(f"perl-bio-ensembl-funcgen@{vers}", when=f"@{vers}", type="run") + + extends("perl") + + variant("sql", default=False, description="Install SQL files") + variant("schema", default=False, description="Install schema documentation") + variant("nextflow", default=False, description="Install nextflow workflows") + variant("scripts", default=False, description="Install additional scripts") + variant("tools", default=False, description="Install additional tools") + variant("ld", default=False, description="Compile LD calculation tools") + + depends_on("perl-bioperl@1.6.924") + depends_on("perl-bio-bigfile") + depends_on("perl-bio-db-hts") + depends_on("perl-sereal") + depends_on("perl-json") + depends_on("perl-set-intervaltree") + depends_on("perl-string-approx") + depends_on("perl-xml-hash-xs") + depends_on("perl-xml-libxml") + depends_on("perl-date-manip") + + with when("+ld"): + depends_on("htslib", type="build") + depends_on("gmake", type="build") + + phases = ("build", "install") + + def setup_build_environment(self, env): + if self.spec.satisfies("+ld"): + env.set("HTSLIB_DIR", self.spec["htslib"].prefix.include) + + def build(self, spec, prefix): + if spec.satisfies("+ld"): + make = which("make") + with working_dir("C_code"): + make() + if spec.satisfies("+tools"): + # Fix the fact that phenotype_annotation isn't executable + chmod = which("chmod") + chmod("+x", "tools/phenotype_annotation/phenotype_annotation") + + def install(self, spec, prefix): + install_tree("modules", prefix.lib.perl5) + + mkdirp(prefix.share.ensembl.variation) + for extra in ["sql", "schema", "nextflow", "scripts"]: + if spec.satisfies(f"+{extra}"): + target = join_path(prefix.share.ensembl, extra) + install_tree(extra, target) + + for requested, targets in { + "+ld": ["C_code/calc_genotypes", "C_code/ld_vcf"], + "+tools": [ + "tools/linkage_disequilibrium/ld_tool", + "tools/variant_simulator/simulate_variation", + "tools/phenotype_annotation/phenotype_annotation", + ], + }.items(): + if spec.satisfies(requested): + mkdirp(prefix.bin) + for target in targets: + install(target, prefix.bin) diff --git a/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py index 763c75e91d..8cf860e3d7 100644 --- a/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py +++ b/var/spack/repos/builtin/packages/perl-bio-ensembl/package.py @@ -18,7 +18,7 @@ class PerlBioEnsembl(Package): license("APACHE-2.0", checked_by="teaguesterling") - version("112", sha256="8a6b46840df71c4332d2de6027596ed4417a26111800d7ff0636199363568235") + version("112", sha256="7c2c5265abe74b462cd4f8b26f140a4c4945cd0e2971f40711afbb4b38db5997") version("111", sha256="346c47c75a6fa8dcfd9f9d22e9f1e0ccc35b2fb99f75980a0c74d892e4ab2b6d") version("110", sha256="fdf725cad1a980ddf900f1af1a72bf1de355f15e408664930ed84aeccfefad15") |