py-drep and ANIcalculator: new packages (#33467)

* py-drep: new package

* fixed file extension

* added darwin conflict

* py-checkm-genome and py-pysam: bumped version and updated deps (#10)

added checkm and pysam deps

* added dep documentation and fixed style

* changed checkm and pysam back to dev version for upstreaming

* added url and perl run dep

* fixed style
This commit is contained in:
Luke Diorio-Toth 2022-10-24 09:01:28 -05:00 committed by GitHub
parent d67b12eb79
commit 560a9eec92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 79 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# Copyright 2013-2022 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)
import os
from spack.package import *
class Anicalculator(Package):
"""This tool will calculate the bidirectional average nucleotide identity
(gANI) and Alignment Fraction (AF) between two genomes.
Note: A manual download is required for ANIcalculator.
Spack will search your current directory for the download file.
Alternatively, add this file to a mirror so that Spack can find it.
For instructions on how to set up a mirror, see
https://spack.readthedocs.io/en/latest/mirrors.html"""
homepage = "https://ani.jgi.doe.gov/html/download.php?"
url = "file://{0}/ANIcalculator_v1.tgz".format(os.getcwd())
manual_download = True
version("1", sha256="236596a9a204cbcad162fc66be3506b2530b1f48f4f84d9647ccec3ca7483a43")
depends_on("perl@5:", type="run")
conflicts("platform=darwin", msg="ANIcalculator requires Linux")
def install(self, spec, prefix):
mkdirp(prefix.bin)
install("ANIcalculator", prefix.bin)
install("nsimscan", prefix.bin)
install_tree("Log", prefix.bin.Log)

View File

@ -0,0 +1,44 @@
# Copyright 2013-2022 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 PyDrep(PythonPackage):
"""dRep is a python program for rapidly comparing large numbers of genomes.
dRep can also "de-replicate" a genome set by identifying groups of highly
similar genomes and choosing the best representative genome for each
genome set."""
homepage = "https://github.com/MrOlm/drep"
pypi = "drep/drep-3.4.0.tar.gz"
version("3.4.0", sha256="a6533eb585122c1ee66ae622b1b97450a3e1e493a3c3c1d55e79a580d5c46d40")
variant("fastani", default=True, description="Enable fastANI support")
variant("py-checkm-genome", default=True, description="Enable CheckM support")
variant("anicalculator", default=True, description="Enable gDNA support")
variant("prodigal", default=True, description="Used with both checkM and gANI")
depends_on("py-setuptools", type="build")
depends_on("py-numpy", type=("build", "run"))
depends_on("py-pandas", type=("build", "run"))
depends_on("py-seaborn", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-biopython", type=("build", "run"))
depends_on("py-scikit-learn", type=("build", "run"))
depends_on("py-tqdm", type=("build", "run"))
depends_on("py-pytest", type=("build", "run"))
# Non-python dependencies
# https://drep.readthedocs.io/en/latest/installation.html#dependencies
# essential dependencies
depends_on("mash@1.1.1:", type="run")
depends_on("mummer@3.23:", type="run")
# recommended dependencies
depends_on("fastani", type="run", when="+fastani")
depends_on("py-checkm-genome@1.0.7:", type="run", when="+py-checkm-genome")
depends_on("anicalculator@1:", type="run", when="+anicalculator")
depends_on("prodigal@2.6.3:", type="run", when="+prodigal")