Skip to content

Commit 86a1277

Browse files
authored
Package/ont-guppy (spack#31417)
* guppy: new package * adding different hashs/urls * working now * guppy: new package * ont-guppy: new package * ont-guppy: new package * ont-guppy: fixed style
1 parent 613362c commit 86a1277

File tree

1 file changed

+52
-0
lines changed
  • var/spack/repos/builtin/packages/ont-guppy

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2013-2022 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+
import platform
7+
8+
from spack.package import *
9+
10+
# If you need to add a new version, please be aware that:
11+
# - versions in the following dict are automatically added to the package
12+
# - version tuple must be in the form (checksum, url)
13+
# - checksum must be sha256
14+
# - package key must be in the form '{os}-{arch}' where 'os' is in the
15+
# format returned by platform.system() and 'arch' by platform.machine()
16+
# - the newest non-cuda version should be set as 'preferred_ver'
17+
# - a cuda dependency must be set for each new cuda version
18+
19+
_versions = {
20+
'6.1.7-cuda': {
21+
'Linux-x86_64': ('c3dd8f8b7567061a155d1921586dd95540410b35b2ccb8a33a463d9db8642711', 'https://cdn.oxfordnanoportal.com/software/analysis/ont-guppy_6.1.7_linux64.tar.gz'),
22+
'Linux-aarch64': ('e821fe85b538e1a5d38c17c8fc7497f6fad200ff9fdf0c98921b4d7b1d490914', 'https://cdn.oxfordnanoportal.com/software/analysis/ont-guppy_6.1.7_linuxaarch64_cuda10.tar.gz'),
23+
},
24+
'6.1.7': {
25+
'Linux-x86_64': ('4540441ca5393d76f05485f38cdba2dc0b5785af31d77006bdc3664b3f2644cb', 'https://cdn.oxfordnanoportal.com/software/analysis/ont-guppy-cpu_6.1.7_linux64.tar.gz')
26+
}
27+
}
28+
29+
30+
class OntGuppy(Package):
31+
"""Guppy: local accelerated basecalling for Nanopore data"""
32+
33+
homepage = "https://community.nanoporetech.com/downloads/guppy/release_notes"
34+
preferred_ver = "6.1.7"
35+
36+
preferred_defined = False
37+
for ver, packages in _versions.items():
38+
key = "{0}-{1}".format(platform.system(), platform.machine())
39+
pkg = packages.get(key)
40+
if pkg:
41+
is_preferred = not preferred_defined and (ver == preferred_ver)
42+
if is_preferred:
43+
preferred_defined = True
44+
45+
version(ver, sha256=pkg[0], url=pkg[1], preferred=is_preferred)
46+
47+
depends_on('[email protected]:', when='@6.1.7-cuda', type='run')
48+
49+
def install(self, spec, prefix):
50+
install_tree('bin', prefix.bin)
51+
install_tree('data', prefix.data)
52+
install_tree('lib', prefix.lib)

0 commit comments

Comments
 (0)