Skip to content

Commit

Permalink
progress on #236 NGSpeciesID
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrKralCZ committed Nov 27, 2023
1 parent fde9809 commit 838ff15
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 13 deletions.
8 changes: 4 additions & 4 deletions 236_NGSpeciesID/NGSpeciesID-0.3.0-foss-2022b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ dependencies = [
('Python', '3.10.8'),
('python-parasail', '1.3.4'),
('edlib', '1.3.9'),
# ('medaka', '1.6.0'), # needed? TODO only for 2022a
('spoa', '4.0.7'), # needed?
# ('Racon', '1.5.0'), # needed? TODO only for 2022a
('minimap2', '2.26'), # needed?
# ('medaka', '1.6.0'), # TODO only for 2022a
('spoa', '4.0.7'),
('Racon', '1.5.0'),
('minimap2', '2.26'),
]

download_dep_fail = True
Expand Down
16 changes: 7 additions & 9 deletions 236_NGSpeciesID/medaka-1.11.1-foss-2022b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
('HTSlib', '1.17'), # for tabix, bgzip
('Racon', '1.5.0'),
('edlib', '1.3.9'),
('pyspoa', '0.0.9'),
# ('pyspoa', '0.2.1'), # TODO
('python-parasail', '1.3.4'),
('ont-fast5-api', '4.1.1'),
('WhatsHap', '2.1'),
Expand All @@ -41,24 +41,22 @@ dependencies = [
]

use_pip = True
sanity_pip_check = True

exts_list = [
('mappy', _minimap_ver, {
'checksums': ['e53fbe9a3ea8762a64b8103f4f779c9fb16d418eaa0a731f45cebc83867a9b71'],
}),
('wurlitzer', '3.0.3', {
'checksums': ['224f5fe70618be3872c05dfddc8c457191ec1870654596279fcc1edadebe3e5b'],
}),
(name, version, {
'checksums': ['4440762a17ddd66806ddbd7c3218140caa234b96a8c919ed54d7243d3e4a5dd1'],
# remove TensorFlow version requirement which is too strict
'preinstallopts': "sed -i 's/tensorflow.*/tensorflow/g' requirements.txt && ",
# Some requirements are too strict.
'preinstallopts': "sed -i 's/tensorflow.*/tensorflow/g;s/cffi==/cffi>=/g' requirements.txt && ",
}),
]

# TODO medaka 1.11.1 requires wurlitzer, which is not installed.
# medaka 1.11.1 has requirement cffi==1.15.0, but you have cffi 1.15.1.
# medaka 1.11.1 has requirement pyspoa>=0.2.1, but you have pyspoa 0.0

sanity_pip_check = True

sanity_check_paths = {
'files': ['bin/medaka', 'bin/medaka_consensus', 'bin/medaka_version_report'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
Expand Down
40 changes: 40 additions & 0 deletions 236_NGSpeciesID/pyspoa-0.2.1-GCC-12.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
easyblock = 'PythonPackage'

name = 'pyspoa'
version = '0.2.1'

local_cereal_version = '1.3.2'

homepage = 'https://github.com/nanoporetech/pyspoa'
description = "Python bindings to spoa."

toolchain = {'name': 'GCC', 'version': '12.2.0'}

sources = [SOURCE_TAR_GZ]
patches = ['pyspoa-%(version)s_use-spoa-dep.patch']
checksums = [
{'pyspoa-0.2.1.tar.gz': 'dad5f244dc524a2fd49d4b4918ce58d31db351fca34696b1d5f391aa66de7645'},
{'pyspoa-0.2.1_use-spoa-dep.patch': 'dffd946e3b36e4872846fe983d287f992b5bf177798e11141bf0d645cfc0664d'},
]

builddependencies = [('CMake', '3.24.3')]

dependencies = [
('Python', '3.10.8'),
('pybind11', '2.10.3'),
('spoa', '4.0.7'),
]

download_dep_fail = True
use_pip = True
sanity_pip_check = True

preinstallopts = "mkdir -p src/vendor/cereal && ln -s %(builddir)s/cereal-*/include src/vendor/cereal/include && "
# strip out cmake requirements, since we provide that as proper dependency
preinstallopts += "sed -i 's/.cmake==[0-9.]*.//g' setup.py && "

options = {'modulename': 'spoa'}

sanity_check_commands = ["cd %(builddir)s/*/tests && python test_pyspoa.py"]

moduleclass = 'lib'
53 changes: 53 additions & 0 deletions 236_NGSpeciesID/pyspoa-0.2.1-GCC-12.2.0.eb.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
easyblock = 'PythonPackage'

name = 'pyspoa'
version = '0.2.1'

local_cereal_version = '1.3.2'

homepage = 'https://github.com/nanoporetech/pyspoa'
description = "Python bindings to spoa."

toolchain = {'name': 'GCC', 'version': '12.2.0'}

sources = [
{
'source_urls': ['https://github.com/nanoporetech/pyspoa/archive/'],
'download_filename': 'v%(version)s.tar.gz',
'filename': 'pyspoa-%(version)s.tar.gz',
},
{
'source_urls': ['https://github.com/USCiLab/cereal/archive/'],
'download_filename': 'v%s.tar.gz' % local_cereal_version,
'filename': 'cereal-%s.tar.gz' % local_cereal_version,
},
]
patches = ['pyspoa-%(version)s_use-spoa-dep.patch']

checksums = [
{'pyspoa-%s.tar.gz' % version: 'dad5f244dc524a2fd49d4b4918ce58d31db351fca34696b1d5f391aa66de7645'},
{'cereal-%s.tar.gz' % local_cereal_version: '16a7ad9b31ba5880dac55d62b5d6f243c3ebc8d46a3514149e56b5e7ea81f85f'},
{'pyspoa-%s_use-spoa-dep.patch' % version: 'dffd946e3b36e4872846fe983d287f992b5bf177798e11141bf0d645cfc0664d'},
]

builddependencies = [('CMake', '3.24.3')]

dependencies = [
('Python', '3.10.8'),
('pybind11', '2.10.3'),
('spoa', '4.0.7'),
]

download_dep_fail = True
use_pip = True
sanity_pip_check = True

preinstallopts = "mkdir -p src/vendor/cereal && ln -s %(builddir)s/cereal-*/include src/vendor/cereal/include && "
# strip out cmake requirements, since we provide that as proper dependency
preinstallopts += "sed -i 's/.cmake==[0-9.]*.//g' setup.py && "

options = {'modulename': 'spoa'}

sanity_check_commands = ["cd %(builddir)s/*/tests && python test_pyspoa.py"]

moduleclass = 'lib'
24 changes: 24 additions & 0 deletions 236_NGSpeciesID/pyspoa-0.2.1_use-spoa-dep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use spoa dependency provided through EasyBuild

author: Kenneth Hoste (HPC-UGent)
updated by: Petr Král (Inuits)
diff --git a/pyspoa-0.2.1/setup.py.orig b/pyspoa-0.2.1/setup.py
--- a/pyspoa-0.2.1/setup.py.orig 2023-11-27 14:48:14.661356275 +0100
+++ b/pyspoa-0.2.1/setup.py 2023-11-27 14:52:53.880656275 +0100
@@ -119,14 +119,14 @@
'spoa',
['pyspoa.cpp'],
include_dirs=[
- 'src/include/spoa',
+ os.path.join(os.getenv('EBROOTSPOA'), 'include/spoa'),
'src/vendor/cereal/include',
get_pybind_include(),
get_pybind_include(user=True),
],
language='c++',
extra_objects=[
- LIB_SPOA
+ os.path.join(os.getenv('EBROOTSPOA'), 'lib64/libspoa.a'),
],

),

0 comments on commit 838ff15

Please sign in to comment.