From 74b52caa8baa395aa31e0061c0a11d23422b5578 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Tue, 17 Dec 2024 07:56:50 +0100 Subject: [PATCH] Parsnp: Add required and optional dependencies --- .../f/FastANI/FastANI-1.34-GCC-13.2.0.eb | 45 +++++++ .../harvest-tools-1.3-GCCcore-13.2.0.eb | 60 ++++++++++ ...3_adapt_to_newer-gcc_protobuf_and_EB.patch | 113 ++++++++++++++++++ .../p/Parsnp/Parsnp-2.1.1-foss-2023b.eb | 7 ++ .../PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb | 39 ++++++ .../r/RAxML/RAxML-8.2.13-gompi-2023b-avx2.eb | 39 ++++++ 6 files changed, 303 insertions(+) create mode 100644 easybuild/easyconfigs/f/FastANI/FastANI-1.34-GCC-13.2.0.eb create mode 100644 easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3-GCCcore-13.2.0.eb create mode 100644 easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch create mode 100644 easybuild/easyconfigs/p/PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb create mode 100644 easybuild/easyconfigs/r/RAxML/RAxML-8.2.13-gompi-2023b-avx2.eb diff --git a/easybuild/easyconfigs/f/FastANI/FastANI-1.34-GCC-13.2.0.eb b/easybuild/easyconfigs/f/FastANI/FastANI-1.34-GCC-13.2.0.eb new file mode 100644 index 00000000000..73ffad70a87 --- /dev/null +++ b/easybuild/easyconfigs/f/FastANI/FastANI-1.34-GCC-13.2.0.eb @@ -0,0 +1,45 @@ +# easybuild easyconfig +# +# John Dey jfdey@fredhutch.org +# +# Updated: Pavel Grochal (INUITS) + +easyblock = 'ConfigureMake' + +name = 'FastANI' +version = '1.34' + +homepage = "https://github.com/ParBLiSS/FastANI" +description = """FastANI is developed for fast alignment-free computation of + whole-genome Average Nucleotide Identity (ANI). ANI is defined as mean + nucleotide identity of orthologous gene pairs shared between two microbial + genomes. FastANI supports pairwise comparison of both complete and draft + genome assemblies.""" + +toolchain = {'name': 'GCC', 'version': '13.2.0'} + +source_urls = ['https://github.com/ParBLiSS/FastANI/archive'] +sources = ['v%(version)s.zip'] +patches = ['FastANI-1.2-memcpy.patch'] +checksums = [ + {'v1.34.zip': 'cb15540634c725cb46dded7becaff38b27a7f709c0a8589db986674effcc6180'}, + {'FastANI-1.2-memcpy.patch': 'eebcf0b64c31ee360ca79136f644157064ac69747ed13cff70f5c9932c6bb0d5'}, +] + +builddependencies = [('Autotools', '20220317')] + +dependencies = [ + ('GSL', '2.7'), + ('zlib', '1.2.13'), +] + +preconfigopts = 'autoconf && ' + +sanity_check_paths = { + 'files': ['bin/fastANI'], + 'dirs': [] +} + +sanity_check_commands = ["fastANI --help"] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3-GCCcore-13.2.0.eb b/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..fad02bd2552 --- /dev/null +++ b/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3-GCCcore-13.2.0.eb @@ -0,0 +1,60 @@ +easyblock = 'ConfigureMake' + +name = 'harvest-tools' +version = '1.3' + +homepage = 'https://harvest.readthedocs.io/en/latest/content/harvest-tools.html' +description = """HarvestTools is a utility for creating and interfacing +with Gingr files, which are efficient archives that the Harvest Suite +uses to store reference-compressed multi-alignments, phylogenetic trees, +filtered variants and annotations. Though designed for use with Parsnp +and Gingr, HarvestTools can also be used for generic conversion between +standard bioinformatics file formats.""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} +toolchainopts = {'pic': True} + +github_account = 'marbl' +source_urls = [GITHUB_SOURCE] +sources = ['v%(version)s.tar.gz'] +patches = [ + 'harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch', +] +checksums = [ + {'v1.3.tar.gz': 'ffbcf0a115c74507695fd6cee4a9d5ba27a700db36b32d226521ef8dd3309264'}, + {'harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch': + '9d04d6c942d42a8147f43f8f086f436d284925f3a3acdd9620df84d4041dff61'}, +] + +builddependencies = [ + ('binutils', '2.40'), + ('Autotools', '20220317'), +] + +dependencies = [ + ('zlib', '1.2.13'), + ('protobuf', '25.3'), + ('CapnProto', '1.0.1.1'), +] + +preconfigopts = 'autoconf && ' + +configopts = ' '.join([ + '--with-protobuf=$EBROOTPROTOBUF', + '--with-capnp=$EBROOTCAPNPROTO', +]) + +postinstallcmds = [ + 'ln -s harvesttools %(installdir)s/bin/harvest', +] + +sanity_check_paths = { + 'files': ['bin/harvesttools', 'lib/libharvest.%s' % SHLIB_EXT], + 'dirs': ['include/harvest'], +} + +sanity_check_commands = [ + 'harvest -h', +] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch b/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch new file mode 100644 index 00000000000..a8fa6e16f8d --- /dev/null +++ b/easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch @@ -0,0 +1,113 @@ +commit 845bb6e29bc12cf5f989c0c64fb98002cb57b343 +Author: Ake Sandgren +Date: Mon Dec 16 18:10:22 2024 +0100 + + Adapt to newer compiler/protobuf and EasyBuild + And actually install the binary, library and include files + +diff --git a/Makefile.in b/Makefile.in +index fdb2ce0..434ba0a 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,4 +1,4 @@ +-CXXFLAGS += -std=c++11 -Isrc -I@protobuf@/include -I@capnp@/include ++CXXFLAGS += -Isrc + + UNAME_S=$(shell uname -s) + +@@ -23,10 +23,13 @@ SOURCES=\ + + OBJECTS=$(SOURCES:.cpp=.o) src/harvest/pb/harvest.pb.o src/harvest/capnp/harvest.capnp.o + +-all : harvesttools libharvest.a ++all : harvesttools libharvest.a libharvest.so + +-harvesttools : libharvest.a src/harvest/memcpyWrap.o +- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o harvesttools src/harvest/memcpyWrap.o libharvest.a @protobuf@/lib/libprotobuf.a @capnp@/lib/libcapnp.a @capnp@/lib/libkj.a -lstdc++ -lz -lm -lpthread ++harvesttools : libharvest.so src/harvest/memcpyWrap.o ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o harvesttools src/harvest/memcpyWrap.o -L. -lharvest -lprotobuf -lcapnp -lkj -lstdc++ -lz -lm -lpthread ++ ++libharvest.so : $(OBJECTS) ++ g++ -shared -o libharvest.so $(OBJECTS) + + libharvest.a : $(OBJECTS) + ar -cr libharvest.a $(OBJECTS) +@@ -52,27 +55,28 @@ src/harvest/pb/harvest.pb.cc src/harvest/pb/harvest.pb.h : src/harvest/pb/harves + src/harvest/capnp/harvest.capnp.c++ src/harvest/capnp/harvest.capnp.h : src/harvest/capnp/harvest.capnp + cd src/harvest/capnp;export PATH=@capnp@/bin/:${PATH};capnp compile -I @capnp@/include -oc++ harvest.capnp + +-install : libharvest.a +- mkdir -p @prefix@/bin/ +- mkdir -p @prefix@/lib/ +- mkdir -p @prefix@/include/ +- mkdir -p @prefix@/include/harvest +- mkdir -p @prefix@/include/harvest/capnp +- mkdir -p @prefix@/include/harvest/pb +- ln -sf `pwd`/harvesttools @prefix@/bin/ +- ln -sf `pwd`/libharvest.a @prefix@/lib/ +- ln -sf `pwd`/src/harvest/exceptions.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/HarvestIO.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/capnp/harvest.capnp.h @prefix@/include/harvest/capnp/ +- ln -sf `pwd`/src/harvest/pb/harvest.pb.h @prefix@/include/harvest/pb/ +- ln -sf `pwd`/src/harvest/ReferenceList.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/AnnotationList.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/parse.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/PhylogenyTree.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/PhylogenyTreeNode.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/TrackList.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/LcbList.h @prefix@/include/harvest/ +- ln -sf `pwd`/src/harvest/VariantList.h @prefix@/include/harvest/ ++install : all ++ install -d @prefix@/bin/ ++ install -d @prefix@/lib/ ++ install -d @prefix@/include/ ++ install -d @prefix@/include/harvest ++ install -d @prefix@/include/harvest/capnp ++ install -d @prefix@/include/harvest/pb ++ install harvesttools @prefix@/bin/ ++ install libharvest.a @prefix@/lib/ ++ install libharvest.so @prefix@/lib/ ++ install src/harvest/exceptions.h @prefix@/include/harvest/ ++ install src/harvest/HarvestIO.h @prefix@/include/harvest/ ++ install src/harvest/capnp/harvest.capnp.h @prefix@/include/harvest/capnp/ ++ install src/harvest/pb/harvest.pb.h @prefix@/include/harvest/pb/ ++ install src/harvest/ReferenceList.h @prefix@/include/harvest/ ++ install src/harvest/AnnotationList.h @prefix@/include/harvest/ ++ install src/harvest/parse.h @prefix@/include/harvest/ ++ install src/harvest/PhylogenyTree.h @prefix@/include/harvest/ ++ install src/harvest/PhylogenyTreeNode.h @prefix@/include/harvest/ ++ install src/harvest/TrackList.h @prefix@/include/harvest/ ++ install src/harvest/LcbList.h @prefix@/include/harvest/ ++ install src/harvest/VariantList.h @prefix@/include/harvest/ + + clean : + -rm harvesttools +diff --git a/configure.ac b/configure.ac +index fc8e61d..5e2fc22 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,8 +29,6 @@ then + AC_MSG_ERROR([Cap'n Proto compiler (capnp) not found.]) + fi + +-CPPFLAGS="-I$with_protobuf/include -I$with_capnp/include -std=c++11" +- + AC_CHECK_HEADER(google/protobuf/stubs/common.h, [result=1], [result=0]) + + if test $result == 0 +diff --git a/src/harvest/HarvestIO.cpp b/src/harvest/HarvestIO.cpp +index c165dce..c1dbb7a 100755 +--- a/src/harvest/HarvestIO.cpp ++++ b/src/harvest/HarvestIO.cpp +@@ -208,7 +208,11 @@ bool HarvestIO::loadHarvestProtocolBuffer(const char * file) + GzipInputStream gz(&raw_input); + CodedInputStream coded_input(&gz); + ++#if GOOGLE_PROTOBUF_VERSION >= 3002000 ++ coded_input.SetTotalBytesLimit(INT_MAX); ++#else + coded_input.SetTotalBytesLimit(INT_MAX, INT_MAX); ++#endif + + if ( ! harvest.ParseFromCodedStream(&coded_input) ) + { diff --git a/easybuild/easyconfigs/p/Parsnp/Parsnp-2.1.1-foss-2023b.eb b/easybuild/easyconfigs/p/Parsnp/Parsnp-2.1.1-foss-2023b.eb index 2117add9996..fe8537ddca9 100644 --- a/easybuild/easyconfigs/p/Parsnp/Parsnp-2.1.1-foss-2023b.eb +++ b/easybuild/easyconfigs/p/Parsnp/Parsnp-2.1.1-foss-2023b.eb @@ -37,6 +37,13 @@ dependencies = [ ('SciPy-bundle', '2023.11'), ('tqdm', '4.66.2'), ('Biopython', '1.84'), + ('FastTree', '2.1.11'), + ('harvest-tools', '1.3'), + ('RAxML', '8.2.13', '-avx2'), + ('pyspoa', '0.2.1'), + ('Mash', '2.3'), + ('FastANI', '1.34'), + ('PhiPack', '2016.06.14'), ] preconfigopts = ' && '.join([ diff --git a/easybuild/easyconfigs/p/PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb b/easybuild/easyconfigs/p/PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb new file mode 100644 index 00000000000..b4320c8b0b6 --- /dev/null +++ b/easybuild/easyconfigs/p/PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb @@ -0,0 +1,39 @@ +# Author: Pavel Grochal (INUITS) +# License: GPLv2 + +easyblock = "MakeCp" + +name = "PhiPack" +# No version is specified by default, copyright is 2005 latest update 2016 +# find -type f -printf '%T+ %p\n' | sort -r | head -n 1 +# 2016-06-14+06:18:29.0000000000 ./PhiPack/src/fasta.c +# latest edit time of file in the archive +version = "2016.06.14" + +homepage = "http://www.maths.otago.ac.nz/~dbryant/software.html" +description = """The PhiPack software package implements (in C) a few tests for +recombination and can produce refined incompatibility matrices as well.""" + +docurls = ["http://www.maths.otago.ac.nz/~dbryant/software/phimanual.pdf"] +software_license = "LicenseGPLv3" +software_license_urls = ['https://www.gnu.org/licenses/lgpl-3.0.en.html'] + +toolchain = {'name': 'GCC', 'version': '13.2.0'} + +source_urls = ['http://www.maths.otago.ac.nz/~dbryant/software/'] +sources = [{'download_filename': 'PhiPack.tar.gz', 'filename': SOURCE_TAR_GZ}] +checksums = ['af43326e021f1f2e590be2cba3caa44a0963f237386e63209ccc26b5bfb02db9'] + +start_dir = 'src/' +buildopts = 'CXX="$CC" CXXFLAGS="$CFLAGS"' + +files_to_copy = [(['Phi', 'Profile', 'ppma_2_bmp/ppma_2_bmp'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/Phi', 'bin/Profile', 'bin/ppma_2_bmp'], + 'dirs': [], +} + +sanity_check_commands = ["Phi -f %(builddir)s/%(name)s/noro.fasta"] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-8.2.13-gompi-2023b-avx2.eb b/easybuild/easyconfigs/r/RAxML/RAxML-8.2.13-gompi-2023b-avx2.eb new file mode 100644 index 00000000000..35faf662fe2 --- /dev/null +++ b/easybuild/easyconfigs/r/RAxML/RAxML-8.2.13-gompi-2023b-avx2.eb @@ -0,0 +1,39 @@ +easyblock = 'MakeCp' + +name = 'RAxML' +version = '8.2.13' +versionsuffix = '-avx2' + +homepage = 'https://github.com/stamatak/standard-RAxML' +description = "RAxML search algorithm for maximum likelihood based inference of phylogenetic trees." + +toolchain = {'name': 'gompi', 'version': '2023b'} +toolchainopts = {'usempi': True} + +source_urls = ['https://github.com/stamatak/standard-RAxML/archive/'] +sources = ['v%(version)s.tar.gz'] +checksums = ['28e500793324bd7d330b396ef27ea49c9186fa5e1edb3d5439036dc6c33e6067'] + +buildopts = '-f Makefile.AVX2.gcc CC="$CC" && rm *.o && ' +buildopts += 'make -j %(parallel)s -f Makefile.AVX2.PTHREADS.gcc CC="$CC" && rm *.o && ' +buildopts += 'make -j %(parallel)s -f Makefile.AVX2.HYBRID.gcc CC="$CC"' + +files_to_copy = [ + (["raxmlHPC-AVX2", "raxmlHPC-PTHREADS-AVX2", "raxmlHPC-HYBRID-AVX2"], "bin"), + "usefulScripts", "README.md", "manual", +] + +postinstallcmds = [ + "ln -s raxmlHPC-AVX2 %(installdir)s/bin/raxmlHPC", + "ln -s raxmlHPC-PTHREADS-AVX2 %(installdir)s/bin/raxmlHPC-PTHREADS", + "ln -s raxmlHPC-HYBRID-AVX2 %(installdir)s/bin/raxmlHPC-HYBRID", +] + +sanity_check_paths = { + 'files': ['bin/raxmlHPC%s' % x for x in ['', '-PTHREADS', '-HYBRID']], + 'dirs': [], +} + +sanity_check_commands = ["raxmlHPC -%s" % x for x in ['h', 'v']] + +moduleclass = 'bio'