-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22027 from akesandgren/20241213164448_new_pr_Pars…
…np211 {bio}[foss/2023b] Parsnp v2.1.1
- Loading branch information
Showing
7 changed files
with
411 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
easybuild/easyconfigs/f/FastANI/FastANI-1.34-GCC-13.2.0.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# easybuild easyconfig | ||
# | ||
# John Dey [email protected] | ||
# | ||
# 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' |
60 changes: 60 additions & 0 deletions
60
easybuild/easyconfigs/h/harvest-tools/harvest-tools-1.3-GCCcore-13.2.0.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
113 changes: 113 additions & 0 deletions
113
...ld/easyconfigs/h/harvest-tools/harvest-tools-1.3_adapt_to_newer-gcc_protobuf_and_EB.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
commit 845bb6e29bc12cf5f989c0c64fb98002cb57b343 | ||
Author: Ake Sandgren <[email protected]> | ||
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) ) | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
easyblock = 'ConfigureMake' | ||
|
||
name = 'Parsnp' | ||
version = '2.1.1' | ||
|
||
homepage = 'https://harvest.readthedocs.io/en/latest/content/parsnp.html' | ||
description = """Parsnp was designed to align the core genome of | ||
hundreds to thousands of bacterial genomes within a few minutes to few | ||
hours. Input can be both draft assemblies and finished genomes, and | ||
output includes variant (SNP) calls, core genome phylogeny and | ||
multi-alignments. Parsnp leverages contextual information provided by | ||
multi-alignments surrounding SNP sites for filtration/cleaning, in | ||
addition to existing tools for recombination detection/filtration and | ||
phylogenetic reconstruction.""" | ||
|
||
toolchain = {'name': 'foss', 'version': '2023b'} | ||
toolchainopts = {'openmp': True} | ||
|
||
github_account = 'marbl' | ||
source_urls = [GITHUB_LOWER_SOURCE] | ||
sources = ['v%(version)s.tar.gz'] | ||
patches = [ | ||
'Parsnp-2.1.1_fix_configure_search_for_libMUSCLE.patch', | ||
] | ||
checksums = [ | ||
{'v2.1.1.tar.gz': '7887ee4030dad6f30a4b735f1ee463024204030adbdcb0fa96562e6e8664474e'}, | ||
{'Parsnp-2.1.1_fix_configure_search_for_libMUSCLE.patch': | ||
'7b601c442ed4f64b53195b9adefafbb0d9639296513e22961a8e0de672dbb3fb'}, | ||
] | ||
|
||
builddependencies = [ | ||
('Autotools', '20220317'), | ||
] | ||
|
||
dependencies = [ | ||
('Python', '3.11.5'), | ||
('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([ | ||
'cd muscle', | ||
'./autogen.sh', | ||
'./configure --prefix=%(installdir)s', | ||
'make install', | ||
'cd ..', | ||
'./autogen.sh', | ||
'', | ||
]) | ||
|
||
configopts = '--with-libmuscle=%(installdir)s' | ||
|
||
preinstallopts = ' && '.join([ | ||
'cd muscle', | ||
'make install', | ||
'cd ..', | ||
'', | ||
]) | ||
|
||
postinstallcmds = [ | ||
'cp parsnp %(installdir)s/bin', | ||
'cp template.ini %(installdir)s', | ||
'mkdir -p %(installdir)s/lib/python%(pyshortver)s/site-packages', | ||
'cp partition.py extend.py logger.py %(installdir)s/lib/python%(pyshortver)s/site-packages', | ||
] | ||
|
||
sanity_check_paths = { | ||
'files': ['bin/parsnp_core', 'bin/parsnp', 'template.ini'], | ||
'dirs': ['lib/python%(pyshortver)s/site-packages'], | ||
} | ||
|
||
modextravars = { | ||
'PARSNPDIR': '', | ||
} | ||
|
||
modextrapaths = { | ||
'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', | ||
} | ||
|
||
moduleclass = 'bio' |
27 changes: 27 additions & 0 deletions
27
easybuild/easyconfigs/p/Parsnp/Parsnp-2.1.1_fix_configure_search_for_libMUSCLE.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Fix search for libMUSCLE's include files and install target | ||
|
||
Åke Sandgren, 2024-12-13 | ||
diff -ru parsnp-2.1.1.orig/configure.ac parsnp-2.1.1/configure.ac | ||
--- parsnp-2.1.1.orig/configure.ac 2024-11-21 00:54:04.000000000 +0100 | ||
+++ parsnp-2.1.1/configure.ac 2024-12-13 12:33:40.964024323 +0100 | ||
@@ -11,7 +11,7 @@ | ||
|
||
AC_LANG(C++) | ||
|
||
-CPPFLAGS="-I$with_libmuscle" | ||
+CPPFLAGS="-I$with_libmuscle/include" | ||
AC_CHECK_HEADER(libMUSCLE/muscle.h, [result=1], [result=0]) | ||
|
||
if test $result == 0 | ||
diff -ru parsnp-2.1.1.orig/src/Makefile.am parsnp-2.1.1/src/Makefile.am | ||
--- parsnp-2.1.1.orig/src/Makefile.am 2024-11-21 00:54:04.000000000 +0100 | ||
+++ parsnp-2.1.1/src/Makefile.am 2024-12-13 12:55:02.385984661 +0100 | ||
@@ -2,6 +2,6 @@ | ||
parsnp_core_LDFLAGS = -fopenmp -lstdc++ -lpthread -std=gnu++0x -Wl,-rpath,$(libmuscle)/lib -L$(libmuscle)/lib -L${CONDA_PREFIX}/lib -lMUSCLE-3.7 | ||
bin_PROGRAMS = parsnp_core | ||
parsnp_core_SOURCES = MuscleInterface.cpp MuscleInterface.h parsnp.cpp parsnp.hh LCB.cpp LCB.hh LCR.cpp LCR.hh TMum.cpp TMum.hh Converter.cpp Converter.hh ./ext/iniFile.cpp ./ext/iniFile.h | ||
-bindir = $(top_srcdir)/bin | ||
-libdir = $(top_srcdir)/lib | ||
+#bindir = $(top_srcdir)/bin | ||
+#libdir = $(top_srcdir)/lib | ||
|
39 changes: 39 additions & 0 deletions
39
easybuild/easyconfigs/p/PhiPack/PhiPack-2016.06.14-GCC-13.2.0.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
Oops, something went wrong.