forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
possvm: new package @1.2 (spack#42516)
* possvm: new package @1.2 * black! * appeasing flake8 * Updating commit ID * Adding graphing dep * Update var/spack/repos/builtin/packages/py-markov-clustering/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update package.py --------- Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
- Loading branch information
1 parent
0664a2c
commit 7b04910
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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) | ||
|
||
import os | ||
|
||
from spack.package import * | ||
|
||
|
||
class Possvm(Package): | ||
"""Possvm (Phylogenetic Ortholog Sorting with Species oVerlap and MCL) | ||
is a python tool to analyse pre-computed gene trees and identify pairs | ||
and clusters of orthologous genes. It takes advantage of the species | ||
overlap algorithm implemented in the ETE toolkit to parse the phylogeny | ||
and identify orthologous gene pairs, and MCL clustering for orthogroup | ||
identification.""" | ||
|
||
homepage = "https://github.com/xgrau/possvm-orthology" | ||
git = "https://github.com/xgrau/possvm-orthology.git" | ||
|
||
license("GPL-3.0-only", checked_by="A-N-Other") | ||
|
||
# version number is taken from -v/--version argparse info in possvm.py | ||
version("1.2", commit="3158757423edafc29aa29bf3ae0cc63a93a56df9") | ||
|
||
depends_on("python@3.10:", type="run") | ||
|
||
# dependencies from GitHub README.md | ||
depends_on("py-ete3@3.1.2", type="run") | ||
depends_on("py-markov-clustering@0.0.6.dev0", type="run") | ||
depends_on("py-matplotlib@3.7.1", type="run") | ||
depends_on("py-networkx@3.0", type="run") | ||
depends_on("py-scipy@1.10.0", type="run") | ||
depends_on("py-numpy@1.23.5", type="run") | ||
depends_on("py-pandas@1.5.3", type="run") | ||
|
||
def install(self, spec, prefix): | ||
# This package has no setup.py ... | ||
# Add shebangs, ensure +x, and move the scripts to prefix.bin | ||
mkdirp(prefix.bin) | ||
sed = Executable("sed") | ||
targets = ("possvm.py", join_path("scripts", "possvm_reconstruction.py")) | ||
for script in targets: | ||
sed("-i", rf'1 i\#! {self.spec["python"].command.path}\n', script) | ||
os.chmod(script, 0o755) | ||
install(script, prefix.bin) |
31 changes: 31 additions & 0 deletions
31
var/spack/repos/builtin/packages/py-markov-clustering/package.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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 PyMarkovClustering(PythonPackage): | ||
"""Implementation of the Markov clustering (MCL) algorithm in python""" | ||
|
||
homepage = "https://github.com/GuyAllard/markov_clustering" | ||
pypi = "markov_clustering/markov_clustering-0.0.6.dev0.tar.gz" | ||
|
||
license("MIT", checked_by="A-N-Other") | ||
|
||
version( | ||
"0.0.6.dev0", sha256="8f72eee0ee5d9bfbab1b28bbfa95eaa020b2bba64b528ce45030b8b4300ecf33" | ||
) | ||
|
||
variant("drawing", default=False, description="Include graphing capabilities") | ||
|
||
depends_on("python@3", type=("build", "run")) | ||
depends_on("py-setuptools", type="build") | ||
|
||
depends_on("py-numpy", type=("build", "run")) | ||
depends_on("py-scipy@0.19.0:", type=("build", "run")) | ||
depends_on("py-scikit-learn", type=("build", "run")) | ||
|
||
depends_on("py-networkx", type=("build", "run"), when="+drawing") | ||
depends_on("py-matplotlib", type=("build", "run"), when="+drawing") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters