|
| 1 | +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other |
| 2 | +# Spack Project Developers. See the top-level COPYRIGHT file for details. |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: (Apache-2.0 OR MIT) |
| 5 | + |
| 6 | +from spack.package import * |
| 7 | + |
| 8 | + |
| 9 | +class PyIpyrad(PythonPackage): |
| 10 | + """An interactive toolkit for assembly and analysis of restriction-site |
| 11 | + associated genomic data sets (e.g., RAD, ddRAD, GBS) for population |
| 12 | + genetic and phylogenetic studies.""" |
| 13 | + |
| 14 | + homepage = "https://github.com/dereneaton/ipyrad" |
| 15 | + |
| 16 | + url = "https://github.com/dereneaton/ipyrad/archive/refs/tags/0.9.85.tar.gz" |
| 17 | + |
| 18 | + version("0.9.90", sha256="8b95aa3bae30da15baba90abb03176932411ff708c54d5e4481b811cceb8a4a8") |
| 19 | + version("0.9.85", sha256="17b07466531655db878919e426743ac649cfab2e92c06c4e45f76ee1517633f9") |
| 20 | + |
| 21 | + depends_on("py-setuptools", type="build") |
| 22 | + |
| 23 | + # Dependencies found at |
| 24 | + # https://ipyrad.readthedocs.io/en/master/3-installation.html#details-dependencies |
| 25 | + depends_on("bedtools2", type=("build", "run")) |
| 26 | + depends_on("bwa", type=("build", "run")) |
| 27 | + depends_on("muscle", type=("build", "run")) |
| 28 | + depends_on("py-notebook", type=("build", "run")) |
| 29 | + depends_on("samtools", type=("build", "run")) |
| 30 | + depends_on("vsearch", type=("build", "run")) |
| 31 | + depends_on("py-numpy", type=("build", "run")) |
| 32 | + depends_on("py-scipy", type=("build", "run")) |
| 33 | + depends_on("py-pandas", type=("build", "run")) |
| 34 | + depends_on("py-h5py", type=("build", "run")) |
| 35 | + depends_on("py-numba", type=("build", "run")) |
| 36 | + depends_on("py-ipyparallel", type=("build", "run")) |
| 37 | + depends_on("py-pysam", type=("build", "run")) |
| 38 | + depends_on("py-cutadapt", type=("build", "run")) |
| 39 | + depends_on("py-requests", type=("build", "run")) |
| 40 | + depends_on("py-future", type=("build", "run")) |
| 41 | + |
| 42 | + def patch(self): |
| 43 | + # ipyrad/core/Parallel.py assumes that ipcluster will always be |
| 44 | + # in the python root |
| 45 | + filter_file( |
| 46 | + r"^IPCLUSTER_BIN\s*=.*$", |
| 47 | + 'IPCLUSTER_BIN = "{}"'.format(self.spec["py-ipyparallel"].prefix.bin.ipcluster), |
| 48 | + join_path("ipyrad", "core", "Parallel.py"), |
| 49 | + ) |
0 commit comments