Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{bio}[foss/2023b] purge_dups v1.2.6 #21991

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Use pybind11 from EasyBuild install
Required to use Python != 3.10
Also use zlib and bzip2 from EB install

Åke Sandgren, 2024-12-09
diff --git a/makefile b/makefile
index 09f4de3..918dcae 100644
--- a/makefile
+++ b/makefile
@@ -36,9 +36,7 @@ $(KMC_MAIN_DIR)/raduls_sse41.o \
$(KMC_MAIN_DIR)/raduls_avx2.o \
$(KMC_MAIN_DIR)/raduls_avx.o

-KMC_LIBS = \
-$(KMC_MAIN_DIR)/libs/libz.a \
-$(KMC_MAIN_DIR)/libs/libbz2.a
+KMC_LIBS = -lz -lbz2

KMC_DUMP_OBJS = \
$(KMC_DUMP_DIR)/nc_utils.o \
@@ -64,9 +62,7 @@ $(KMC_TOOLS_DIR)/fastq_reader.o \
$(KMC_TOOLS_DIR)/fastq_writer.o \
$(KMC_TOOLS_DIR)/percent_progress.o

-KMC_TOOLS_LIBS = \
-$(KMC_TOOLS_DIR)/libs/libz.a \
-$(KMC_TOOLS_DIR)/libs/libbz2.a
+KMC_TOOLS_LIBS = -lz -lbz2

$(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
@@ -102,7 +98,6 @@ py_kmc_api: $(PY_KMC_API_OBJS) $(PY_KMC_API_OBJS)
-mkdir -p $(KMC_BIN_DIR)
$(CC) -fPIC -Wall -shared -std=c++11 -O3 $(PY_KMC_API_DIR)/py_kmc_api.cpp $(PY_KMC_API_OBJS) \
-I $(KMC_API_DIR) \
- -I $(PY_KMC_API_DIR)/libs/pybind11/include \
-I `python3 -c "import sysconfig;print(sysconfig.get_paths()['include'])"` \
-o $(KMC_BIN_DIR)/$@`python3-config --extension-suffix`

85 changes: 85 additions & 0 deletions easybuild/easyconfigs/p/purge_dups/purge_dups-1.2.6-foss-2023b.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
easyblock = 'PythonBundle'

name = 'purge_dups'
version = '1.2.6'

homepage = 'https://github.com/dfguan/purge_dups'
description = "purge haplotigs and overlaps in an assembly based on read depth"

toolchain = {'name': 'foss', 'version': '2023b'}

builddependencies = [
('pybind11', '2.11.1'),
]

dependencies = [
('zlib', '1.2.13'),
('bzip2', '1.0.8'),
('Python', '3.11.5'),
('matplotlib', '3.8.2'),
('minimap2', '2.28'),
]

use_pip = True

default_easyblock = 'MakeCp'

components = [
(name, version, {
'source_urls': ['https://github.com/dfguan/purge_dups/archive'],
'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': SOURCE_TAR_GZ}],
'checksums': ['75b20df834d28410858ccd4e2d65b6c70849f3cbe5fc05959f38bfc2d041c704'],
'start_dir': 'purge_dups-%(version)s',
'prebuildopts': "cd src && ",
'buildopts': 'CC="$CC" CFLAGS="$CFLAGS"',
'files_to_copy': ['bin', 'scripts'],
}),
('KMC', '20190629', {
'source_urls': ['https://github.com/dfguan/KMC/archive'],
'sources': [{'download_filename': 'c05a5f9.tar.gz', 'filename': SOURCE_TAR_GZ}],
'patches': [{
'name': 'KMC_use_EB_pybind11_and_libs.patch',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this include the KMC version (and may some comment or other name like KMC-dfguan to indicate that this is for a fork of KMC, as it confused me for a while when I saw your other KMC PR 😄)?

'sourcepath': 'KMC-c05a5f9fd94683248ebe04484a60f86792cf328f',
}],
'checksums': [
'7251941f4b1913bfdd68759d9292b419d95fe7c63815056e15ecb097a12a0bc4',
'2f54971aae26787777d0e4b638a9682bd4bc22cbf3fda170c7baf4c610808ac9',
],
'prebuildopts': 'cd KMC-* && ',
'buildopts': 'CC="$CXX"',
'files_to_copy': [(['KMC-*/bin/*kmc*'], 'bin'), 'KMC-*/spectra.py'],
}),
]

exts_list = [
('runner', '20191220', {
'preinstallopts': "sed -i 's/0.0.0/%(version)s/g' setup.py && ",
'sources': [{
'git_config': {
'url': 'https://github.com/dfguan/',
'repo_name': 'runner',
'commit': '73a4d11',
},
'filename': 'runner-%(version)s.tar.gz',
}],
'checksums': [None],
}),
]

sanity_check_paths = {
'files': ['bin/kmc', 'bin/purge_dups'],
'dirs': ['scripts'],
}

sanity_check_commands = [
"purge_dups -h 2>&1 | grep 'Program: purge_dups'",
"kmc --help",
"run_purge_dups.py -h",
"hist_plot.py -h",
]

sanity_pip_check = True

modextrapaths = {'PATH': 'scripts'}

moduleclass = 'bio'
Loading