Skip to content

Commit

Permalink
Merge pull request easybuilders#19594 from smoors/20240116120331_new_…
Browse files Browse the repository at this point in the history
…pr_rMATS-turbo420

{bio}[gfbf/2023a] rMATS-turbo v4.2.0
  • Loading branch information
jfgrimm authored Jan 16, 2024
2 parents 6078069 + 70ed1fe commit 31c44de
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
easyblock = 'Bundle'

name = 'rMATS-turbo'
version = '4.2.0'

homepage = 'https://github.com/Xinglab/rmats-turbo'
description = """rMATS turbo is the C/Cython version of rMATS (refer to https://rnaseq-mats.sourceforge.io)."""

toolchain = {'name': 'gfbf', 'version': '2023a'}
toolchainopts = {'openmp': True}

builddependencies = [
('CMake', '3.26.3'),
]
dependencies = [
('Python', '3.11.3'),
('SciPy-bundle', '2023.07'),
('GSL', '2.7'),
('SAMtools', '1.18'),
('STAR', '2.7.11a'),
('BamTools', '2.5.2'),
]

local_ldflags = " -lm -lgsl -lgslcblas $LIBLAPACK"
local_buildopts = ' CC="$CC" CXX="$CXX" FC="$FC" LDFLAGS="%s"' % local_ldflags

default_component_specs = {
'sources': ['v%(version)s.tar.gz'],
'source_urls': ['https://github.com/Xinglab/%(name)s/archive/refs/tags/'],
'checksums': ['80fd32ffa00190b2eb3fcefcd4efb0d466a808c5e80bc91419a71bc033cdbd72'],
}

components = [
(name, version, {
'easyblock': 'MakeCp',
'start_dir': 'rmats-turbo-%(version)s/rMATS_C',
'buildopts': "%s" % local_buildopts,
'files_to_copy': [(['rMATSexe', '../rmats.py', '../rMATS_C', '../rMATS_R', '../rMATS_P'], 'bin')]
}),
('rmats-turbo-python', version, {
'easyblock': 'PythonPackage',
'patches': ['rMATS-turbo-%(version)s_bamtools_as_dependency.patch'],
'checksums': [
'80fd32ffa00190b2eb3fcefcd4efb0d466a808c5e80bc91419a71bc033cdbd72',
'a4c70e3d8ef9723fcb801d39a62c132f8f1903fb3a60dad330de895c12f5f7e7',
],
'start_dir': 'rmats-turbo-%(version)s/rMATS_pipeline',
'use_pip': True,
'download_dep_fail': True,
'sanity_pip_check': True,
'options': {'modulename': 'rmatspipeline'},
}),
]

modextrapaths = {
'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']
}

postinstallcmds = ["chmod a+x %(installdir)s/bin/rmats.py"]

sanity_check_commands = [
'rmats.py --version',
]

sanity_check_paths = {
'files': ['bin/rMATSexe', 'bin/rmats.py'],
'dirs': [],
}

moduleclass = 'bio'
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# author: Denis Kristak
# this patch makes rMATS take bamtools from official dependencies, not from the downloaded folder
# updated for new version by Samuel Moors (Vrije Universiteit Brussel)
diff -ur rmats-turbo-4.2.0.orig/rMATS_pipeline/setup.py rmats-turbo-4.2.0/rMATS_pipeline/setup.py
--- rmats-turbo-4.2.0.orig/rMATS_pipeline/setup.py 2023-10-18 18:33:06.000000000 +0200
+++ rmats-turbo-4.2.0/rMATS_pipeline/setup.py 2024-01-16 10:59:40.272152202 +0100
@@ -5,15 +5,16 @@
from Cython.Build import cythonize
from Cython.Distutils import build_ext

-bamtools_include = [os.path.abspath('../bamtools/include'),]
-bamtools_lib = [os.path.abspath('../bamtools/lib'),]
+bamtools_root = os.environ['EBROOTBAMTOOLS']
+bamtools_include = bamtools_root + '/include/bamtools'
+bamtools_lib = bamtools_root + '/lib'
source_pattern = 'rmatspipeline/%s.pyx'

asevent_ext = [
- Extension('rmats.rmatspipeline', sources=[source_pattern % "rmatspipeline"],
- include_dirs=bamtools_include,
+ Extension('rmatspipeline', sources=[source_pattern % "rmatspipeline"],
+ include_dirs=[bamtools_include,],
libraries=['m','stdc++','bamtools','z'],
- library_dirs=bamtools_lib,
+ library_dirs=[bamtools_lib,],
extra_compile_args = ['-O3', '-funroll-loops',
'-std=c++11', '-fopenmp',
'-D__STDC_CONSTANT_MACROS',
@@ -31,7 +32,7 @@
compiler_directives['legacy_implicit_noexcept'] = True

setup(
- name = 'rmats.rmatspipeline',
+ name = 'rmatspipeline',
ext_modules = cythonize(asevent_ext, compiler_directives=compiler_directives),
cmdclass = {'build_ext': build_ext},
)

0 comments on commit 31c44de

Please sign in to comment.