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

Add Mothur 1.48.2 for foss-2023b #21857

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

jgustavsen
Copy link

Hello,
Thanks to the help of @Micket, this is an attempt to resolve #21849.

This is my first PR for Easybuild and happy to adapt as much as needed if this is a helpful addition.
Thanks, Julia

Copy link

github-actions bot commented Nov 15, 2024

Updated software Mothur-1.48.2-foss-2023b.eb

Diff against Mothur-1.43.0-foss-2019a-Python-3.7.2.eb

easybuild/easyconfigs/m/Mothur/Mothur-1.43.0-foss-2019a-Python-3.7.2.eb

diff --git a/easybuild/easyconfigs/m/Mothur/Mothur-1.43.0-foss-2019a-Python-3.7.2.eb b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
index 16d5db6c6e..2dfa6e10da 100644
--- a/easybuild/easyconfigs/m/Mothur/Mothur-1.43.0-foss-2019a-Python-3.7.2.eb
+++ b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
@@ -1,35 +1,28 @@
-##
-# This is a contribution from DeepThought HPC Service, Flinders University, Adelaide, Australia
-# Homepage: 	https://staff.flinders.edu.au/research/deep-thought
-#
-# Authors::	Robert Qiao <[email protected]>
-# License::	GPLv3.0
-#
-# Notes::
-##
-
 name = 'Mothur'
-version = '1.43.0'
-versionsuffix = '-Python-%(pyver)s'
+version = '1.48.2'
 
 homepage = 'https://www.mothur.org/'
 description = """Mothur is a single piece of open-source, expandable software
  to fill the bioinformatics needs of the microbial ecology community."""
 
-toolchain = {'name': 'foss', 'version': '2019a'}
+toolchain = {'name': 'foss', 'version': '2023b'}
 toolchainopts = {'usempi': True, 'cstd': 'c++11'}
 
 source_urls = ['https://github.com/mothur/mothur/archive/']
 sources = ['v%(version)s.tar.gz']
-checksums = ['12ccd95a85bec3bb1564b8feabd244ea85413973740754803d01fc71ecb0a2c1']
+patches = ['Mothur-%(version)s_fix-hardcoding.patch']
+checksums = [
+    {'v1.48.2.tar.gz': 'bd37b22b5d2629c5f44bd7f104c5e5a2c3a117d724cd113ec7526c4aa62e1793'},
+    {'Mothur-1.48.2_fix-hardcoding.patch': 'a3b3524909c77fb8b6dbecd979debcaadab21637757430f99f3f6b4a966c470a'},
+]
 
 dependencies = [
-    ('Python', '3.7.2'),
-    ('Boost.Python', '1.70.0', '', ('gompi', '2019a')),
-    ('HDF5', '1.10.5', '', ('gompi', '2019a')),
-    ('libreadline', '8.0', '', ('GCCcore', '8.2.0')),
-    ('ncurses', '6.1', '', ('GCCcore', '8.2.0')),
-    ('zlib', '1.2.11'),
+    ('Python', '3.11.5'),
+    ('Boost.Python', '1.83.0'),
+    ('HDF5', '1.14.3'),
+    ('libreadline', '8.2'),
+    ('ncurses', '6.4'),
+    ('zlib', '1.2.13'),
 ]
 
 moduleclass = 'bio'
Diff against Mothur-1.41.0-foss-2018b-Python-2.7.15.eb

easybuild/easyconfigs/m/Mothur/Mothur-1.41.0-foss-2018b-Python-2.7.15.eb

diff --git a/easybuild/easyconfigs/m/Mothur/Mothur-1.41.0-foss-2018b-Python-2.7.15.eb b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
index f65fe180be..2dfa6e10da 100644
--- a/easybuild/easyconfigs/m/Mothur/Mothur-1.41.0-foss-2018b-Python-2.7.15.eb
+++ b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
@@ -1,29 +1,28 @@
 name = 'Mothur'
-version = '1.41.0'
-versionsuffix = '-Python-%(pyver)s'
+version = '1.48.2'
 
-homepage = 'http://www.mothur.org/'
+homepage = 'https://www.mothur.org/'
 description = """Mothur is a single piece of open-source, expandable software
  to fill the bioinformatics needs of the microbial ecology community."""
 
-toolchain = {'name': 'foss', 'version': '2018b'}
+toolchain = {'name': 'foss', 'version': '2023b'}
 toolchainopts = {'usempi': True, 'cstd': 'c++11'}
 
 source_urls = ['https://github.com/mothur/mothur/archive/']
 sources = ['v%(version)s.tar.gz']
 patches = ['Mothur-%(version)s_fix-hardcoding.patch']
 checksums = [
-    'b54b71e46f96ff2604ba8e3b33f95c067e6921cbb212b603365e6483d05574f1',  # v1.41.0.tar.gz
-    'f270fcf19bcd494189c7b977141d3f6b96546b426d7d351d1696b77e85e0d3fa',  # Mothur-1.41.0_fix-hardcoding.patch
+    {'v1.48.2.tar.gz': 'bd37b22b5d2629c5f44bd7f104c5e5a2c3a117d724cd113ec7526c4aa62e1793'},
+    {'Mothur-1.48.2_fix-hardcoding.patch': 'a3b3524909c77fb8b6dbecd979debcaadab21637757430f99f3f6b4a966c470a'},
 ]
 
 dependencies = [
-    ('Python', '2.7.15'),
-    ('Boost.Python', '1.67.0', versionsuffix),
-    ('HDF5', '1.10.2'),
-    ('libreadline', '7.0'),
-    ('ncurses', '6.1'),
-    ('zlib', '1.2.11'),
+    ('Python', '3.11.5'),
+    ('Boost.Python', '1.83.0'),
+    ('HDF5', '1.14.3'),
+    ('libreadline', '8.2'),
+    ('ncurses', '6.4'),
+    ('zlib', '1.2.13'),
 ]
 
 moduleclass = 'bio'
Diff against Mothur-1.39.5-intel-2017a-Python-2.7.13.eb

easybuild/easyconfigs/m/Mothur/Mothur-1.39.5-intel-2017a-Python-2.7.13.eb

diff --git a/easybuild/easyconfigs/m/Mothur/Mothur-1.39.5-intel-2017a-Python-2.7.13.eb b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
index 07729f03aa..2dfa6e10da 100644
--- a/easybuild/easyconfigs/m/Mothur/Mothur-1.39.5-intel-2017a-Python-2.7.13.eb
+++ b/easybuild/easyconfigs/m/Mothur/Mothur-1.48.2-foss-2023b.eb
@@ -1,30 +1,28 @@
 name = 'Mothur'
-version = '1.39.5'
-versionsuffix = '-Python-%(pyver)s'
+version = '1.48.2'
 
-homepage = 'http://www.mothur.org/'
+homepage = 'https://www.mothur.org/'
 description = """Mothur is a single piece of open-source, expandable software
  to fill the bioinformatics needs of the microbial ecology community."""
 
-toolchain = {'name': 'intel', 'version': '2017a'}
-toolchainopts = {'usempi': True, 'cstd': 'c++0x'}
+toolchain = {'name': 'foss', 'version': '2023b'}
+toolchainopts = {'usempi': True, 'cstd': 'c++11'}
 
 source_urls = ['https://github.com/mothur/mothur/archive/']
 sources = ['v%(version)s.tar.gz']
 patches = ['Mothur-%(version)s_fix-hardcoding.patch']
 checksums = [
-    '9f1cd691e9631a2ab7647b19eb59cd21ea643f29b22cde73d7f343372dfee342',  # v1.39.5.tar.gz
-    '64ca39179acbcf6c3071369b4689e5bbbeb8cf0b5a0cbe10a8c6bef6c29936ba',  # Mothur-1.39.5_fix-hardcoding.patch
+    {'v1.48.2.tar.gz': 'bd37b22b5d2629c5f44bd7f104c5e5a2c3a117d724cd113ec7526c4aa62e1793'},
+    {'Mothur-1.48.2_fix-hardcoding.patch': 'a3b3524909c77fb8b6dbecd979debcaadab21637757430f99f3f6b4a966c470a'},
 ]
 
 dependencies = [
-    ('Python', '2.7.13'),
-    ('Boost', '1.65.1', versionsuffix),
-    ('libreadline', '7.0'),
-    ('ncurses', '6.0'),
-    ('bzip2', '1.0.6'),
-    ('gzip', '1.8'),
-    ('zlib', '1.2.11'),
+    ('Python', '3.11.5'),
+    ('Boost.Python', '1.83.0'),
+    ('HDF5', '1.14.3'),
+    ('libreadline', '8.2'),
+    ('ncurses', '6.4'),
+    ('zlib', '1.2.13'),
 ]
 
 moduleclass = 'bio'

@@ -0,0 +1,118 @@
diff -ruN mothur-1.48.2.orig/Makefile /tmp/eb/Mothur/1.48.2/foss-2023b/mothur-1.48.2/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

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

We ask that patches include a short description what it solves and their author for reference.

Once you include this, please also include the checksum for the patch in the easyconfig.

You can use EB to inject the checksums automatically using

eb Mothur-1.48.2-foss-2023b.eb --inject-checksums 

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the review. I added these in 6f09ef8 and 90fa0d9.

# MOTHUR_FILES - The MOTHUR_FILES parameter is optional, but allows you to set a default location for mothur to look for input files it can't find. This is often used for reference files you want to store in one location separate from your data.

-INSTALL_DIR ?= "\"Enter_your_mothur_install_path_here\""
+INSTALL_DIR ?= "%(installdir)s"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, is this tested to work? I don't see how it could, the %(installdir)s templates are not applied to patches.

Looking at the custom easyblock that this thing unfortunately needs to use, it's just manually making the installation via copying files, so I this probably doesn't even have any impact.

Copy link
Author

Choose a reason for hiding this comment

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

I was having problems getting the install to work without this change. Before changing this I was getting "undefined reference to main" and others as errors.
So if I understand what you are saying it would mean that I am just setting this to empty and thus could try like in the "MOTHUR_FILES" variable?

OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))

Binary files mothur-1.48.2.orig/source/calculators/prng.o and /tmp/eb/Mothur/1.48.2/foss-2023b/mothur-1.48.2/source/calculators/prng.o differ
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks like something that shouldn't be included in the patch

Copy link
Author

Choose a reason for hiding this comment

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

Ok thanks, updated here: 6104290

+++ /tmp/eb/Mothur/1.48.2/foss-2023b/mothur-1.48.2/source/uchime_src/makefile 2024-11-15 10:29:38.800547895 +0100
@@ -1,4 +1,4 @@
-CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DUCHIMES=1
+CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DUCHIMES=1 -std=c++11
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, i wonder if we can just make this add the -D flags instead of overwriting CXXFLAGS completely, so that it catches the EB environment variables which set compiler flags (though I'm not going to insist of it in any way gets tricky).

Copy link
Author

Choose a reason for hiding this comment

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

Very sorry, but I'm not sure how to do this. This would be in the .eb file? thanks

@jgustavsen jgustavsen requested a review from Micket November 18, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mothur-1.43.0-foss-2019a-Python-3.7.2.eb fails on Ubuntu 24.04
2 participants