Skip to content

Commit

Permalink
adding easyconfigs: DETONATE-1.11-GCC-12.3.0.eb, SAMtools-0.1.20-GCC-…
Browse files Browse the repository at this point in the history
…12.3.0.eb, sparsehash-2.0.4-GCCcore-12.3.0.eb and patches: DETONATE-1.11_fix-deps.patch, DETONATE-1.11_include-fix.patch, DETONATE-1.11_Intel-fixes.patch, SAMtools-0.1.20_Makefile-ncurses.patch
  • Loading branch information
pavelToman committed Jan 10, 2024
1 parent 542297f commit 2ba4107
Show file tree
Hide file tree
Showing 6 changed files with 328 additions and 0 deletions.
60 changes: 60 additions & 0 deletions easybuild/easyconfigs/d/DETONATE/DETONATE-1.11-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
easyblock = 'MakeCp'

name = 'DETONATE'
version = '1.11'

homepage = 'http://deweylab.biostat.wisc.edu/detonate/'
description = """DETONATE (DE novo TranscriptOme rNa-seq Assembly with or without the Truth Evaluation)
consists of two component packages, RSEM-EVAL and REF-EVAL. Both packages are mainly intended to be used
to evaluate de novo transcriptome assemblies, although REF-EVAL can be used to compare sets of any kinds
of genomic sequences."""

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

toolchainopts = {'cstd': 'c++11'}

source_urls = ['http://deweylab.biostat.wisc.edu/detonate/']
sources = ['detonate-1.11.tar.gz']
patches = [
'DETONATE-%(version)s_fix-deps.patch',
'DETONATE-%(version)s_Intel-fixes.patch',
'DETONATE-%(version)s_include-fix.patch'
]
checksums = [
{'detonate-1.11.tar.gz': 'e1d04af1b1d2504942a6941b346d430157da6117fac043b7ee83274717d99714'},
{'DETONATE-1.11_fix-deps.patch': '0ab353f66d5459e1fa18fa214026589fe214365f3532a3b9ea182757c7547691'},
{'DETONATE-1.11_Intel-fixes.patch': 'c72a18250857883e7075ac512bbbd532e61a1aab38868d0dc932ca4bdc412817'},
{'DETONATE-1.11_include-fix.patch': '9071fc8dbc6bfc26a9c4bb60befca890a26acf9668df2815a7f0038d8bcdd9f6'},
]

builddependencies = [
('CMake', '3.26.3'),
('SAMtools', '0.1.20'),
]

dependencies = [
('Boost', '1.82.0'),
('sparsehash', '2.0.4'),
('BamTools','2.5.2'),
('zlib', '1.2.13'),
]

start_dir = 'ref-eval'

buildopts = 'CXX="$CXX" CXXFLAGS="$CXXFLAGS -fopenmp" && cd ../rsem-eval && make CC="$CXX" CFLAGS="$CXXFLAGS"'

runtest = 'test'

files_to_copy = [(['ref-eval', 'ref-eval-estimate-true-assembly', '../rsem-eval/rsem-*'], 'bin')]

sanity_check_paths = {
'files': ['bin/%s' % x for x in ['ref-eval', 'ref-eval-estimate-true-assembly', 'rsem-build-read-index',
'rsem-eval-calculate-score', 'rsem-eval-estimate-transcript-length-distribution',
'rsem-eval-run-em', 'rsem-extract-reference-transcripts',
'rsem-parse-alignments', 'rsem-plot-model', 'rsem-preref', 'rsem-sam-validator',
'rsem-scan-for-paired-end-reads', 'rsem-simulate-reads',
'rsem-synthesis-reference-transcripts']],
'dirs': [],
}

moduleclass = 'bio'
48 changes: 48 additions & 0 deletions easybuild/easyconfigs/d/DETONATE/DETONATE-1.11_Intel-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
fix compilation issues that occur with Intel compilers
error: no suitable conversion function from "std::basic_istream<char, std::char_traits<char>>" to "bool" exists

author: Kenneth Hoste (HPC-UGent), with a bit of help from Ward Poelmans
--- detonate-1.11/rsem-eval/SingleHit.h.orig 2018-01-23 11:01:34.269328898 +0100
+++ detonate-1.11/rsem-eval/SingleHit.h 2018-01-23 11:01:55.859848244 +0100
@@ -43,7 +43,7 @@

bool SingleHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos);
+ return static_cast<bool>(in>>sid>>pos);
}

void SingleHit::write(std::ostream& out) {
--- detonate-1.11/rsem-eval/PairedEndHit.h.orig 2018-01-23 11:07:46.838260187 +0100
+++ detonate-1.11/rsem-eval/PairedEndHit.h 2018-01-23 11:08:12.628872625 +0100
@@ -26,7 +26,7 @@

bool PairedEndHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos>>insertL);
+ return static_cast<bool>(in>>pos>>insertL);
}

void PairedEndHit::write(std::ostream& out) {
--- detonate-1.11/rsem-eval/buildReadIndex.cpp.orig 2018-01-23 13:58:46.313840541 +0100
+++ detonate-1.11/rsem-eval/buildReadIndex.cpp 2018-01-23 13:59:51.375415745 +0100
@@ -35,15 +35,15 @@
streampos pos = fin.tellg();
success = true;

- success = (getline(fin, line));
+ success = static_cast<bool>(getline(fin, line));
if (!success) continue;
- success = (getline(fin, line));
+ success = static_cast<bool>(getline(fin, line));
if (!success) continue;

if (hasQ) {
- success = (getline(fin, line));
+ success = static_cast<bool>(getline(fin, line));
if (!success) continue;
- success = (getline(fin, line));
+ success = static_cast<bool>(getline(fin, line));
if (!success) continue;
}

144 changes: 144 additions & 0 deletions easybuild/easyconfigs/d/DETONATE/DETONATE-1.11_fix-deps.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
- fix compilation flags, use $CFLAGS passed by EasyBuild
- use Boost, SAMtools, sparsehash provided as dependencies via EasyBuild
author: Kenneth Hoste (HPC-UGent)
--- detonate-1.11/rsem-eval/Makefile.orig 2016-06-22 23:34:39.000000000 +0200
+++ detonate-1.11/rsem-eval/Makefile 2018-01-23 14:47:47.714929147 +0100
@@ -7,18 +7,15 @@

all : $(PROGRAMS)

-sam/libbam.a :
- cd sam ; ${MAKE} all
-
Transcript.h : utils.h

Transcripts.h : utils.h my_assert.h Transcript.h

rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp
- $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts
+ $(CC) $(CFLAGS) extractRef.cpp -o rsem-extract-reference-transcripts

rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp
- $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts
+ $(CC) $(CFLAGS) synthesisRef.cpp -o rsem-synthesis-reference-transcripts

BowtieRefSeqPolicy.h : RefSeqPolicy.h

@@ -28,10 +25,10 @@


rsem-preref : preRef.o
- $(CC) preRef.o -o rsem-preref
+ $(CC) $(CFLAGS) preRef.o -o rsem-preref

preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp
- $(CC) $(COFLAGS) preRef.cpp
+ $(CC) -c -I $(CFLAGS) preRef.cpp


SingleRead.h : Read.h
@@ -49,14 +46,14 @@

SamParser.h : sam/sam.h sam/bam.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h

-rsem-parse-alignments : parseIt.o sam/libbam.a
- $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread
+rsem-parse-alignments : parseIt.o
+ $(CC) -o rsem-parse-alignments parseIt.o ${EBROOTSAMTOOLS}/lib/libbam.a -lz -lpthread

parseIt.o : utils.h RefSeq.h Refs.h GroupInfo.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h Transcripts.h sam/sam.h sam/bam.h parseIt.cpp
- $(CC) -Wall -O2 -c -I. parseIt.cpp
+ $(CC) $(CFLAGS) -c -I. parseIt.cpp

rsem-build-read-index : utils.h buildReadIndex.cpp
- $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index
+ $(CC) $(CFLAGS) buildReadIndex.cpp -o rsem-build-read-index


simul.h : boost/random.hpp
@@ -85,23 +82,23 @@

CalcEvalScore.h : utils.h my_assert.h Refs.h GroupInfo.h Transcript.h Transcripts.h ContigLengthDist.h

-rsem-eval-run-em : EM.o sam/libbam.a
- $(CC) -o rsem-eval-run-em EM.o sam/libbam.a -lz -lpthread
+rsem-eval-run-em : EM.o
+ $(CC) -o rsem-eval-run-em EM.o ${EBROOTSAMTOOLS}/lib/libbam.a -lz -lpthread

EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h sam/bam.h sam/sam.h simul.h sam_rsem_aux.h sampling.h boost/random.hpp WriteResults.h boost/math/distributions/negative_binomial.hpp ContigLengthDist.h CalcEvalScore.h EM.cpp
- $(CC) $(COFLAGS) EM.cpp
+ $(CC) -c -I $(CFLAGS) EM.cpp

rsem-simulate-reads : simulation.o
$(CC) -o rsem-simulate-reads simulation.o

simulation.o : utils.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h RefSeq.h GroupInfo.h Transcript.h Transcripts.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h Profile.h NoiseProfile.h simul.h boost/random.hpp WriteResults.h simulation.cpp
- $(CC) $(COFLAGS) simulation.cpp
+ $(CC) -c -I $(CFLAGS) simulation.cpp

-rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a
- $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp
+ $(CC) $(CFLAGS) samValidator.cpp ${EBROOTSAMTOOLS}/lib/libbam.a -lz -lpthread -o $@

-rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a
- $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@
+rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp
+ $(CC) $(CFLAGS) scanForPairedEndReads.cpp ${EBROOTSAMTOOLS}/lib/libbam.a -lz -lpthread -o $@

clean :
rm -f *.o *~ $(PROGRAMS)
--- detonate-1.11/ref-eval/Makefile.orig 2016-06-22 23:34:39.000000000 +0200
+++ detonate-1.11/ref-eval/Makefile 2018-01-23 15:10:47.078223944 +0100
@@ -40,19 +40,19 @@

CXXFLAGS = -W -Wno-unused-parameter -g -O3
CXXFLAGS_DEBUG = -g3 -fno-inline -O0 -Wall -Wextra
-BOOST_INC = -Iboost
-BOOST_LIB = boost/stage/lib/libboost_program_options.a boost/stage/lib/libboost_random.a
+BOOST_INC = -I${EBROOTBOOST}/include
+BOOST_LIB = ${EBROOTBOOST}/lib/libboost_program_options.a ${EBROOTBOOST}/lib/libboost_random.a
LEMON_INC = -Ilemon/build -Ilemon/lemon-main-473c71baff72
LEMON_LIB = lemon/build/lemon/libemon.a -lpthread
CITY_INC = -Icity/install/include
CITY_LIB = city/install/lib/libcityhash.a
SAM_INC = -I.
-SAM_LIB = sam/libbam.a
-SH_INC = -Isparsehash/include
+SAM_LIB = ${EBROOTSAMTOOLS}/lib/libbam.a
+SH_INC = -I${EBROOTSPARSEHASH}/include
DL_INC = -Ideweylab
INC = $(BOOST_INC) $(LEMON_INC) $(CITY_INC) $(SAM_INC) $(SH_INC) $(DL_INC)
LIB = $(BOOST_LIB) $(LEMON_LIB) $(CITY_LIB) $(SAM_LIB)
-TEST_LIB = boost/stage/lib/libboost_unit_test_framework.a
+TEST_LIB = ${EBROOTBOOST}/lib/libboost_unit_test_framework.a -lboost_system

ifeq (${NEED_CMAKE}, yes)
wd := $(shell pwd)
@@ -140,7 +140,7 @@
@echo
cd sparsehash && $(MAKE)

-ref-eval: ref-eval.cpp boost/finished lemon/finished city/finished sam/libbam.a sparsehash/finished
+ref-eval: ref-eval.cpp lemon/finished city/finished
@echo
@echo -----------------------------
@echo - Building REF-EVAL itself. -
@@ -148,7 +148,7 @@
@echo
$(CXX) $(OMP) $(CXXFLAGS) $(INC) ref-eval.cpp $(LIB) -o ref-eval

-ref-eval-estimate-true-assembly: ref-eval-estimate-true-assembly.cpp boost/finished lemon/finished city/finished sam/libbam.a sparsehash/finished
+ref-eval-estimate-true-assembly: ref-eval-estimate-true-assembly.cpp lemon/finished city/finished
@echo
@echo ---------------------------------------------------
@echo - Building program to estimate the true assembly. -
@@ -170,7 +170,7 @@
all_tests := test_lazycsv test_line_stream test_blast test_psl test_pairset test_mask test_alignment_segment test_re_matched test_re_kc

.PHONY: test
-test: test_msg ${all_tests} boost/finished lemon/finished city/finished sparsehash/finished
+test: test_msg ${all_tests} lemon/finished city/finished
./test_lazycsv
./test_line_stream
./test_blast
10 changes: 10 additions & 0 deletions easybuild/easyconfigs/d/DETONATE/DETONATE-1.11_include-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff -u detonate-1.11/ref-eval/pairset.hh.orig detonate-1.11/ref-eval/pairset.hh
--- detonate-1.11/ref-eval/pairset.hh.orig 2016-06-22 23:34:39.000000000 +0200
+++ detonate-1.11/ref-eval/pairset.hh 2024-01-08 18:31:58.579745141 +0100
@@ -21,6 +21,7 @@
#include <set>
#include <vector>
#include <queue>
+#include <list>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
29 changes: 29 additions & 0 deletions easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.20-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name = 'SAMtools'
version = '0.1.20'

homepage = 'https://www.htslib.org/'
description = """SAM Tools provide various utilities for manipulating alignments in the SAM format,
including sorting, merging, indexing and generating alignments in a per-position format."""

toolchain = {'name': 'GCC', 'version': '12.3.0'}
# toolchainopts = {'pic': True}

source_urls = ['https://github.com/%(namelower)s/%(namelower)s/archive/%(version)s']
sources = [SOURCELOWER_TAR_GZ]
patches = ['SAMtools-%(version)s_Makefile-ncurses.patch']
checksums = [
{'samtools-0.1.20.tar.gz': '500019b4d1886ad995513d5ce8b413b14b51f16f251ce76bc0b35a446b182a47'},
{'SAMtools-0.1.20_Makefile-ncurses.patch': 'f01a05b73f28ff47e816d13a06b27083ec45a3ff93537378affeddf75f614bba'},
]

# The htslib component of SAMtools >= 1.4 uses zlib, bzip2 and lzma compression.
# The latter is currently provided by XZ.
dependencies = [
('ncurses', '6.4'),
('zlib', '1.2.13'),
# ('bzip2', '1.0.8'),
# ('XZ', '5.4.2'),
# ('cURL', '8.0.1'),
]

moduleclass = 'bio'
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Updated from previous easyconfig
# Author: Pavel Grochal (INUITS)
# Update: Pavel Tománek (INUITS)
# License: GPLv2
# Updated to GCCcore-12.3.0
# Author: J. Sassmannshausen (Imperial College London/UK)

easyblock = 'ConfigureMake'

name = 'sparsehash'
version = '2.0.4'

homepage = 'https://github.com/sparsehash/sparsehash'
description = """
An extremely memory-efficient hash_map implementation. 2 bits/entry overhead!
The SparseHash library contains several hash-map implementations, including
implementations that optimize for space or speed.
"""

toolchain = {'name': 'GCCcore', 'version': '12.3.0'}
toolchainopts = {'pic': True}

source_urls = [GITHUB_SOURCE]
sources = [SOURCELOWER_TAR_GZ]
checksums = ['8cd1a95827dfd8270927894eb77f62b4087735cbede953884647f16c521c7e58']

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


sanity_check_paths = {
'files': ['include/google/type_traits.h'],
'dirs': [],
}

moduleclass = 'devel'

0 comments on commit 2ba4107

Please sign in to comment.