Skip to content

Commit

Permalink
clair3 advance
Browse files Browse the repository at this point in the history
  • Loading branch information
deniskristak committed Sep 8, 2023
1 parent 8d04d6d commit 2d40a20
Show file tree
Hide file tree
Showing 9 changed files with 4,091 additions and 0 deletions.
65 changes: 65 additions & 0 deletions 146_clair3/Clair3-remove_htslib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
diff -ruN Clair3-1.0.4_orig/Makefile Clair3-1.0.4/Makefile
--- Clair3-1.0.4_orig/Makefile 2023-09-07 14:28:29.842168186 +0100
+++ Clair3-1.0.4/Makefile 2023-09-07 14:35:52.320773700 +0100
@@ -3,8 +3,10 @@

PYTHON ?= python3

-all : libhts.a longphase libclair3.so
-clean : clean_htslib clean_longphase clean_libclair3
+# all : libhts.a longphase libclair3.so
+# clean : clean_htslib clean_longphase clean_libclair3
+all : longphase libclair3.so
+clean : clean_longphase clean_libclair3

SAMVER = 1.15.1
LPVER = 1.3
@@ -16,16 +18,16 @@
CPPFLAGS = -std=c++11 -Wall -O3 -I ${PREFIX}/include -L ${PREFIX}/lib -Wl,-rpath=${PREFIX}/lib
LP_CPPFLAGS = -std=c++11 -Wall -g -O3 -I ${PREFIX}/include -L ${PREFIX}/lib -Wl,-rpath=${PREFIX}/lib

-samtools-$(SAMVER)/Makefile:
- curl -L -o samtools-${SAMVER}.tar.bz2 https://github.com/samtools/samtools/releases/download/${SAMVER}/samtools-${SAMVER}.tar.bz2; \
- tar -xjf samtools-${SAMVER}.tar.bz2; \
- rm samtools-${SAMVER}.tar.bz2
-
-libhts.a: samtools-$(SAMVER)/Makefile
- # this is required only to add in -fpic so we can build python module
- @echo "\x1b[1;33mMaking $(@F)\x1b[0m"
- cd samtools-${SAMVER}/htslib-${SAMVER}; CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure; make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
- cp samtools-${SAMVER}/htslib-${SAMVER}/$@ $@
+# samtools-$(SAMVER)/Makefile:
+# curl -L -o samtools-${SAMVER}.tar.bz2 https://github.com/samtools/samtools/releases/download/${SAMVER}/samtools-${SAMVER}.tar.bz2; \
+# tar -xjf samtools-${SAMVER}.tar.bz2; \
+# rm samtools-${SAMVER}.tar.bz2
+
+# libhts.a: samtools-$(SAMVER)/Makefile
+# # this is required only to add in -fpic so we can build python module
+# @echo "\x1b[1;33mMaking $(@F)\x1b[0m"
+# cd samtools-${SAMVER}/htslib-${SAMVER}; CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" ./configure; make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+# cp samtools-${SAMVER}/htslib-${SAMVER}/$@ $@


longphase-$(LPVER)/Makefile:
@@ -39,15 +41,15 @@
cp longphase-${LPVER}/$@ $@


-libclair3.so: samtools-${SAMVER}/htslib-${SAMVER}
+libclair3.so:
${PYTHON} build.py


-.PHONY: clean_htslib
-clean_htslib:
- cd samtools-${SAMVER} && make clean || exit 0
- cd samtools-${SAMVER}/htslib-${SAMVER} && make clean || exit 0
- rm libhts.a
+# .PHONY: clean_htslib
+# clean_htslib:
+# cd samtools-${SAMVER} && make clean || exit 0
+# cd samtools-${SAMVER}/htslib-${SAMVER} && make clean || exit 0
+# rm libhts.a

.PHONY: clean_longphase
clean_longphase:
38 changes: 38 additions & 0 deletions 146_clair3/cffi-1.15.1-GCCcore-11.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
easyblock = "PythonBundle"

name = 'cffi'
version = '1.15.1'

homepage = 'https://cffi.readthedocs.io/en/latest/'
description = """C Foreign Function Interface for Python. Interact with almost any C code from
Python, based on C-like declarations that you can often copy-paste from header
files or documentation.
"""

toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
toolchainopts = {'pic': True}

builddependencies = [
('binutils', '2.38'),
]

dependencies = [
('Python', '3.10.4'),
]

exts_default_options = {
'download_dep_fail': True,
'sanity_pip_check': True,
'use_pip': True,
}

exts_list = [
('pycparser', '2.21', {
'checksums': ['e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206'],
}),
(name, version, {
'checksums': ['d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9'],
}),
]

moduleclass = 'tools'
46 changes: 46 additions & 0 deletions 146_clair3/clair3.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
easyblock = 'MakeCp'

name = 'Clair3'
version = '1.0.4'

homepage = 'https://github.com/HKU-BAL/Clair3'
description = """Clair3 is a germline small variant caller for long-reads.
Clair3 makes the best of two major method categories: pileup calling handles
most variant candidates with speed, and full-alignment tackles complicated candidates
to maximize precision and recall. Clair3 runs fast and has superior performance,
especially at lower coverage. Clair3 is simple and modular for easy deployment and
integration."""

toolchain = {'name': 'foss', 'version': '2022a'}

github_account = 'HKU-BAL'
source_urls = [GITHUB_LOWER_SOURCE]
sources = ['v%(version)s.tar.gz']
patches = ['Clair3-remove_htslib.patch']
dependencies = [
('Python', '3.10.4'),
('mpath', '1.1.3'),
('TensorFlow', '2.11.0'),
('PyTables', '3.8.0'),
('pigz', '2.7'),
('cffi', '1.15.1'),
('parallel', '20220722'),
('SAMtools', '1.13'),
('WhatsHap', '1.7'),
('zlib', '1.2.12'),
('bzip2', '1.0.8'),
('Automake', '1.16.5'),
('cURL', '7.83.0'),
('zstd', '1.5.2'),
('HTSlib', '1.15.1'),
]

files_to_copy = [
(['angsd', 'misc/supersim', 'misc/thetaStat', 'misc/realSFS', 'misc/msToGlf',
'misc/smartCount', 'misc/printIcounts', 'misc/contamination', 'misc/splitgl',
'misc/NGSadmix', 'misc/contamination2', 'misc/haploToPlink', 'misc/ngsPSMC',
'misc/ibs'], 'bin'),
'doc',
]

moduleclass = 'bio'
Loading

0 comments on commit 2d40a20

Please sign in to comment.