Skip to content

Commit

Permalink
progress on #506 fastStructure
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrKralCZ committed Feb 21, 2025
1 parent 7d5734f commit 6ed1e17
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 0 deletions.
41 changes: 41 additions & 0 deletions 506_fastStructure/Cython-0.29.37-GCCcore-12.3.0-Python-2.7.18.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
easyblock = 'PythonPackage'

name = 'Cython'
version = '0.29.37'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://cython.org/'
description = """
Cython is an optimising static compiler for both the Python programming
language and the extended Cython programming language (based on Pyrex).
"""
docurls = [
'https://cython.org/#documentation',
'https://github.com/cython/cython',
]

toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

sources = [SOURCE_WHL]
checksums = ['95f1d6a83ef2729e67b3fa7318c829ce5b07ac64c084cd6af11c228e0364662c']

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

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

download_dep_fail = True
use_pip = True
sanity_pip_check = True

sanity_check_paths = {
'files': ['bin/cygdb', 'bin/cython', 'bin/cythonize'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = ["cython --version"]

moduleclass = 'lang'
77 changes: 77 additions & 0 deletions 506_fastStructure/SciPy-bundle-2024.06-foss-2023a-Python-2.7.18.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
easyblock = 'PythonBundle'

name = 'SciPy-bundle'
version = '2024.06'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://python.org/'
description = "Bundle of Python packages for scientific software"

toolchain = {'name': 'foss', 'version': '2023a'}
toolchainopts = {'pic': True, 'lowopt': True}

builddependencies = [
('hypothesis', '4.57.1', versionsuffix),
('UnZip', '6.0'),
]

dependencies = [
('Python', '2.7.18'),
('pybind11', '2.9.2', versionsuffix), # required by scipy
('numpy', '1.16.6', versionsuffix)
]

use_pip = True

# order is important!
exts_list = [
('ply', '3.11', {
'checksums': ['00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3'],
}),
('gast', '0.5.5', {
'checksums': ['5f4ae749ba7199034b6912af98f05b4058d6d48fc2f065037b241be819a22924'],
}),
('beniget', '0.4.1', {
'checksums': ['75554b3b8ad0553ce2f607627dad3d95c60c441189875b98e097528f8e23ac0c'],
}),
('scipy', '1.2.3', {
'patches': ['scipy-1.2.3_fix_nan_problem_in_vi.patch'],
'prebuildopts': 'export FFLAGS="$FFLAGS -fallow-argument-mismatch" && ',
'checksums': [
'ecbe6413ca90b8e19f8475bfa303ac001e81b04ec600d17fa7f816271f7cca57', # scipy-1.2.3.tar.gz
# scipy-1.2.3_fix_nan_problem_in_vi.patch
'0513c5d0491a3f062ed024b6aa7b382706e8c42b3a3fdd26ff7a4d305ac9a30d',
],
}),
('mpi4py', '3.1.6', {
'checksums': ['c8fa625e0f92b082ef955bfb52f19fa6691d29273d7d71135d295aa143dee6cb'],
}),
('numexpr', '2.7.3', {
'checksums': ['43616529f9b7d1afc83386f943dc66c4da5e052f00217ba7e3ad8dd1b5f3a825'],
}),
('Bottleneck', '1.3.2', {
'checksums': ['20179f0b66359792ea283b69aa16366419132f3b6cf3adadc0c48e2e8118e573'],
}),
('python_dateutil', '2.9.0.post0', {
'modulename': 'dateutil',
'source_tmpl': SOURCE_WHL,
'checksums': ['a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427'],
}),
('pytz', '2025.1', {
'source_tmpl': SOURCE_WHL,
'checksums': ['89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57'],
}),
('pandas', '0.24.2', {
'checksums': ['4f919f409c433577a501e023943e582c57355d50a724c589e78bc1d551a535a2'],
}),
('mpmath', '1.3.0', {
'checksums': ['7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f'],
}),
('deap', '1.3.1', {
'checksums': ['11f54493ceb54aae10dde676577ef59fc52d52f82729d5a12c90b0813c857a2f'],
}),
]

sanity_pip_check = True

moduleclass = 'lang'
71 changes: 71 additions & 0 deletions 506_fastStructure/fastStructure-1.0-foss-2023a-Python-2.7.18.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
easyblock = 'PythonBundle'

name = 'fastStructure_new'
version = '1.0'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://rajanil.github.io/fastStructure/'
description = """
fastStructure is a fast algorithm for inferring population structure
from large SNP genotype data. It is based on a variational Bayesian
framework for posterior inference and is written in Python2.x.
"""
docurls = ['https://github.com/rajanil/fastStructure']

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

builddependencies = [
('Cython', '0.29.37', versionsuffix),
]

dependencies = [
('Python', '2.7.18'),
('SciPy-bundle', '2024.06', versionsuffix),
('matplotlib', '2.2.5', versionsuffix),
('GSL', '2.7'),
]

sanity_pip_check = True
use_pip = True

exts_list = [
# Needs Cython v0.27.3 see:
# https://github.com/rajanil/fastStructure/issues/39
('Cython', '0.27.3', {
'checksums': ['6a00512de1f2e3ce66ba35c5420babaef1fe2d9c43a8faab4080b0dbcc26bc64'],
}),
(name, version, {
'source_urls': ['https://github.com/rajanil/fastStructure/archive/'],
'sources': ['v%(version)s.tar.gz'],
# 'preinstallopts': 'cd vars && python -m pip install --prefix %(installdir)s --no-build-isolation . && cd - && ',
'preinstallopts': 'cd vars && python setup.py build_ext --inplace && cd - && ',
'install_cmd': 'python setup.py build_ext --inplace',
'checksums': ['f1bfb24bb5ecd108bc3a90145fad232012165c1e60608003f1c87d200f867b81'],
}),
]

fix_python_shebang_for = ['*.py']

sanity_check_paths = {
'files': [
'fastStructure.%s' % SHLIB_EXT,
'parse_bed.%s' % SHLIB_EXT,
'parse_str.%s' % SHLIB_EXT,
'structure.py',
],
'dirs': [],
}

sanity_check_commands = [
('%(installdir)s/structure.py '
'-K 3 '
'--input=%(installdir)s/test/testdata '
'--output=%(builddir)s/testoutput_simple '
'--full '
'--seed=100'),
]

moduleclass = 'bio'

# TODO https://github.com/easybuilders/easybuild-easyblocks/blob/develop/easybuild/easyblocks/f/faststructure.py
# ERROR: More than one .egg-info directory found in /tmp/vsc45304/eb-b7wy4wzt/pip-pip-egg-info-r5KDqI
70 changes: 70 additions & 0 deletions 506_fastStructure/matplotlib-2.2.5-foss-2023a-Python-2.7.18.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
easyblock = 'PythonBundle'

name = 'matplotlib'
version = '2.2.5'
versionsuffix = '-Python-%(pyver)s'

homepage = 'https://matplotlib.org'
description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of
hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python
and ipython shell, web application servers, and six graphical user interface toolkits."""

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

builddependencies = [
('pkgconf', '1.9.5'),
]

dependencies = [
('Python', '2.7.18'),
('numpy', '1.16.6', versionsuffix),
('libpng', '1.6.39'),
('freetype', '2.13.0'),
('Tkinter', '%(pyver)s', versionsuffix),
]

use_pip = True
sanity_pip_check = True

exts_list = [
('Cycler', '0.10.0', {
'modulename': 'cycler',
'source_tmpl': 'cycler-%(version)s.tar.gz',
'checksums': ['cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8'],
}),
('kiwisolver', '1.1.0', {
'checksums': ['53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75'],
}),
('python_dateutil', '2.9.0.post0', {
'modulename': 'dateutil',
'source_tmpl': SOURCE_WHL,
'checksums': ['a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427'],
}),
('pytz', '2025.1', {
'source_tmpl': SOURCE_WHL,
'checksums': ['89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57'],
}),
('subprocess32', '3.5.4', {
'checksums': ['eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d'],
}),
(name, version, {
'prebuildopts': "export CPLUS_INCLUDE_PATH=$EBROOTFREETYPE/include/freetype2:${CPLUS_INCLUDE_PATH} && ",
'preinstallopts': "export CPLUS_INCLUDE_PATH=$EBROOTFREETYPE/include/freetype2:${CPLUS_INCLUDE_PATH} && ",
'checksums': ['a3037a840cd9dfdc2df9fee8af8f76ca82bfab173c0f9468193ca7a89a2b60ea'],
}),
]

postinstallcmds = [
'touch %(installdir)s/lib/python%(pyshortver)s/site-packages/mpl_toolkits/__init__.py',
]

sanity_check_commands = [
"""python -c 'import matplotlib; matplotlib.use("TkAgg"); import matplotlib.pyplot' """,
"python -c 'from mpl_toolkits.mplot3d import Axes3D'",
]

# use non-interactive plotting backend as default
# see https://matplotlib.org/tutorials/introductory/usage.html#what-is-a-backend
modextravars = {'MPLBACKEND': 'Agg'}

moduleclass = 'vis'

0 comments on commit 6ed1e17

Please sign in to comment.