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>
This commit is contained in:
parent
f3faeb0f77
commit
1c528719cb
@ -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)
|
@ -18,7 +18,7 @@ def url_for_version(self, version):
|
||||
|
||||
license("APACHE-2.0", checked_by="teaguesterling")
|
||||
|
||||
version("112", sha256="8a6b46840df71c4332d2de6027596ed4417a26111800d7ff0636199363568235")
|
||||
version("112", sha256="7c2c5265abe74b462cd4f8b26f140a4c4945cd0e2971f40711afbb4b38db5997")
|
||||
version("111", sha256="346c47c75a6fa8dcfd9f9d22e9f1e0ccc35b2fb99f75980a0c74d892e4ab2b6d")
|
||||
version("110", sha256="fdf725cad1a980ddf900f1af1a72bf1de355f15e408664930ed84aeccfefad15")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user