From 0f3e8963fd5d9d3ccbf08c6ea7e99686f6c03a27 Mon Sep 17 00:00:00 2001
From: Fokke Dijkstra <f.dijkstra@rug.nl>
Date: Thu, 27 Mar 2025 13:54:44 +0100
Subject: [PATCH 1/4] Updated easyconfig for PLINK-2.0.0-a.6.9.

---
 .../p/PLINK/PLINK-2.0.0-a.6.9-gfbf-2023b.eb   | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 easyconfigs/p/PLINK/PLINK-2.0.0-a.6.9-gfbf-2023b.eb

diff --git a/easyconfigs/p/PLINK/PLINK-2.0.0-a.6.9-gfbf-2023b.eb b/easyconfigs/p/PLINK/PLINK-2.0.0-a.6.9-gfbf-2023b.eb
new file mode 100644
index 00000000..941a815e
--- /dev/null
+++ b/easyconfigs/p/PLINK/PLINK-2.0.0-a.6.9-gfbf-2023b.eb
@@ -0,0 +1,58 @@
+easyblock = 'Bundle'
+
+name = 'PLINK'
+version = '2.0.0-a.6.9'
+
+homepage = 'https://www.cog-genomics.org/plink/2.0/'
+description = """PLINK is a free, open-source whole genome association analysis toolset,
+designed to perform a range of basic, large-scale analyses in a computationally
+efficient manner."""
+
+toolchain = {'name': 'gfbf', 'version': '2023b'}
+
+
+dependencies = [
+    ('zlib', '1.2.13'),
+    ('zstd', '1.5.5'),
+    ('libdeflate', '1.19'),
+]
+
+default_easyblock = 'MakeCp'
+
+default_component_specs = {
+    'source_urls': ['https://github.com/chrchang/plink-ng/archive/refs/tags/'],
+    'sources': ['v%s.tar.gz' % version],
+    'skipsteps': ['configure'],
+}
+
+components = [
+    ('PLINK1', '1.90', {
+        'checksums': ['492fc1e87b60b2209b7c3c1d616a01c1126978424cf795184d013ecf8a47e028'],
+        'start_dir': '%s-ng-%s/1.9' % (name.lower(), version),
+        'buildopts': (
+            'CFLAGS="${CFLAGS} -DDYNAMIC_ZLIB" CXXFLAGS="${CXXFLAGS} -DDYNAMIC_ZLIB" '
+            'LDFLAGS="${LDFLAGS} -lm -lpthread -ldl" BLASFLAGS="${LIBBLAS}" ZLIB="-L$EBROOTZLIB/lib -lz"'
+        ),
+        'files_to_copy': [(['plink'], 'bin')],
+    }),
+    ('PLINK2', version, {
+        'checksums': ['492fc1e87b60b2209b7c3c1d616a01c1126978424cf795184d013ecf8a47e028'],
+        'start_dir': '%s-ng-%s/2.0' % (name.lower(), version),
+        'prebuildopts': "sed -i 's/(OBJ)/(OBJ_NO_ZSTD)/g' Makefile && sed -i '9,19d' Makefile.src && ",
+        'buildopts': (
+            'BASEFLAGS="-g -DNDEBUG -DZSTD_MULTITHREAD" BLASFLAGS64="$LIBBLAS" ZSTD="-lzstd -ldeflate" '
+            'CINCLUDE="-Isimde" CINCLUDE2="-I../simde"'
+        ),
+        'files_to_copy': [(['bin/*'], 'bin')],
+    }),
+]
+
+# run tests (<1h)
+postinstallcmds = ["cd Tests && bash run_tests.sh %(installdir)s/bin"]
+
+sanity_check_paths = {
+    'files': ['bin/plink', 'bin/plink2', 'bin/pgen_compress'],
+    'dirs': [],
+}
+
+moduleclass = 'bio'
-- 
GitLab


From 3d8d1594ed803f7113b931eb7c0ba42045f56d9f Mon Sep 17 00:00:00 2001
From: Fokke Dijkstra <f.dijkstra@rug.nl>
Date: Thu, 27 Mar 2025 16:44:48 +0100
Subject: [PATCH 2/4] Added GCTB-2.5.2-GCC-13.2.0.eb

---
 easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb | 34 +++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb

diff --git a/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb b/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb
new file mode 100644
index 00000000..46179574
--- /dev/null
+++ b/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb
@@ -0,0 +1,34 @@
+easyblock = 'MakeCp'
+
+name = 'GCTB'
+version = '2.5.2'
+
+homepage = 'https://cnsgenomics.com/software/gctb'
+description = """
+GCTB is a software tool that comprises a family of Bayesian linear mixed models for complex trait analyses using genome-wide SNPs. It was developed to simultaneously estimate the joint effects of all SNPs and the genetic architecture parameters for a complex trait, including SNP-based heritability, polygenicity and the joint distribution of effect sizes and minor allele frequencies.
+"""
+
+toolchain = {'name': 'GCC', 'version': '13.2.0'}
+
+source_urls =  ['https://cnsgenomics.com/software/gctb/download']
+sources = ['%(namelower)s_%(version)s_scr.zip']
+checksums = ['f9b73f2dcc330fbb44534b96bedd9a75e73ad42efe15ed9f666d6048dca8ddba']
+
+builddependencies = [
+    # Eigen and Boost are used as header-only C++ libraries
+    ('Eigen', '3.4.0'),
+    ('Boost', '1.83.0'),
+]
+
+prebuildopts = 'cd gctb_%(version)s_scr/scr && '
+
+files_to_copy = [(['gctb_%(version)s_scr/scr/gctb'], 'bin')]
+
+sanity_check_paths = {
+    'files': ['bin/gctb'],
+    'dirs': [],
+}
+
+sanity_check_commands = ["gctb | grep -e 'Analysis started'"]
+
+moduleclass = 'bio'
-- 
GitLab


From 9c9086bf23156d70b251aa15d036210f1d92d058 Mon Sep 17 00:00:00 2001
From: Fokke Dijkstra <f.dijkstra@rug.nl>
Date: Thu, 27 Mar 2025 16:45:43 +0100
Subject: [PATCH 3/4] Added GCTB and PLINK

---
 easystacks/habrok-2023.01-cvmfs.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/easystacks/habrok-2023.01-cvmfs.yml b/easystacks/habrok-2023.01-cvmfs.yml
index 7d21c888..05d67a00 100644
--- a/easystacks/habrok-2023.01-cvmfs.yml
+++ b/easystacks/habrok-2023.01-cvmfs.yml
@@ -458,3 +458,5 @@ easyconfigs:
   - DIRAC-25.0-intel-2023a.eb
   - DIRAC-25.0-intel-2023a-int64.eb
   - DIRAC-25.0-intel-2023a-serial.eb
+  - GCTB-2.5.2-GCC-13.2.0.eb
+  - PLINK-2.0.0-a.6.9-gfbf-2023b.eb
-- 
GitLab


From e4e6b7c778f048d3f6e380012d16490a4575a926 Mon Sep 17 00:00:00 2001
From: Fokke Dijkstra <f.dijkstra@rug.nl>
Date: Thu, 27 Mar 2025 16:47:47 +0100
Subject: [PATCH 4/4] Fixed style.

---
 easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb b/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb
index 46179574..9b272a7b 100644
--- a/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb
+++ b/easyconfigs/g/GCTB/GCTB-2.5.2-GCC-13.2.0.eb
@@ -5,12 +5,16 @@ version = '2.5.2'
 
 homepage = 'https://cnsgenomics.com/software/gctb'
 description = """
-GCTB is a software tool that comprises a family of Bayesian linear mixed models for complex trait analyses using genome-wide SNPs. It was developed to simultaneously estimate the joint effects of all SNPs and the genetic architecture parameters for a complex trait, including SNP-based heritability, polygenicity and the joint distribution of effect sizes and minor allele frequencies.
+GCTB is a software tool that comprises a family of Bayesian linear mixed models
+for complex trait analyses using genome-wide SNPs. It was developed to
+simultaneously estimate the joint effects of all SNPs and the genetic architecture
+parameters for a complex trait, including SNP-based heritability, polygenicity and
+the joint distribution of effect sizes and minor allele frequencies.
 """
 
 toolchain = {'name': 'GCC', 'version': '13.2.0'}
 
-source_urls =  ['https://cnsgenomics.com/software/gctb/download']
+source_urls = ['https://cnsgenomics.com/software/gctb/download']
 sources = ['%(namelower)s_%(version)s_scr.zip']
 checksums = ['f9b73f2dcc330fbb44534b96bedd9a75e73ad42efe15ed9f666d6048dca8ddba']
 
-- 
GitLab