diff --git a/recipes/augustus/build.sh b/recipes/augustus/build.sh index 6c55e6ebfea54..d0126d902f5b8 100644 --- a/recipes/augustus/build.sh +++ b/recipes/augustus/build.sh @@ -2,34 +2,39 @@ set -x -e -#export CXXFLAGS="${CXXFLAGS} -std=c++11 -stdlib=libstdc++ -stdlib=libc++ -DUSE_BOOST" -export CXXFLAGS="${CXXFLAGS} -std=c++11 -DUSE_BOOST -I${PREFIX}/include" +export INCLUDES="-I${PREFIX}/include" +export LIBPATH="-L${PREFIX}/lib" +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" +export CXXFLAGS="${CXXFLAGS} -O3 -std=c++14 -DUSE_BOOST -I${PREFIX}/include" mkdir -p ${PREFIX}/bin mkdir -p ${PREFIX}/scripts mkdir -p ${PREFIX}/config ## Make the software - -if [ "$(uname)" = Darwin ] ; then - # SQLITE disabled due to compile issue, see: https://svn.boost.org/trac10/ticket/13501 - sqlite= +if [[ "$(uname)" = Darwin ]]; then + # SQLITE disabled due to compile issue, see: https://svn.boost.org/trac10/ticket/13501 + sqlite= else - sqlite='SQLITE=true' + sqlite='SQLITE=true' fi -make \ - CC="${CC}" \ - CXX="${CXX}" \ - INCLUDE_PATH_BAMTOOLS="-I${PREFIX}/include/bamtools" \ - LIBRARY_PATH_BAMTOOLS="-L${PREFIX}/lib" \ - INCLUDE_PATH_LPSOLVE="-I${PREFIX}/include/lpsolve" \ - LIBRARY_PATH_LPSOLVE="-L${PREFIX}/lib" \ - INCLUDE_PATH_HTSLIB="-I${PREFIX}/include/htslib" \ - LIBRARY_PATH_HTSLIB="-L${PREFIX}/lib" \ - COMPGENPRED=true \ - MYSQL=false \ - $sqlite +make \ + CC="${CC}" \ + CXX="${CXX}" \ + INCLUDE_PATH_BAMTOOLS="-I${PREFIX}/include/bamtools" \ + LIBRARY_PATH_BAMTOOLS="-L${PREFIX}/lib" \ + INCLUDE_PATH_LPSOLVE="-I${PREFIX}/include/lpsolve" \ + LIBRARY_PATH_LPSOLVE="-L${PREFIX}/lib" \ + INCLUDE_PATH_HTSLIB="-I${PREFIX}/include/htslib" \ + LIBRARY_PATH_HTSLIB="-L${PREFIX}/lib" \ + COMPGENPRED=true \ + MYSQL=false \ + "${sqlite}" -j"${CPU_COUNT}" + +# Fix perl shebang +sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${SRC_DIR}/scripts/*.pl +rm -rf ${SRC_DIR}/scripts/*.bak ## Build Perl @@ -39,7 +44,7 @@ cd perl-build # affects tests for Augustus 3.3: # https://github.com/Gaius-Augustus/Augustus/commit/7ca3ab #sed -i'' -e '1s/perl -w/perl/' *.pl -cp ${RECIPE_DIR}/Build.PL ./ +cp -f ${RECIPE_DIR}/Build.PL ./ perl ./Build.PL perl ./Build manifest perl ./Build install --installdirs site @@ -49,11 +54,11 @@ cd .. ## End build perl +chmod 0755 bin/augustus mv bin/* $PREFIX/bin/ mv scripts/* $PREFIX/bin/ mv config/* $PREFIX/config/ - ## Set AUGUSTUS variables on env activation mkdir -p ${PREFIX}/etc/conda/activate.d ${PREFIX}/etc/conda/deactivate.d diff --git a/recipes/augustus/meta.yaml b/recipes/augustus/meta.yaml index 7faa39e763a44..6eec34c826555 100644 --- a/recipes/augustus/meta.yaml +++ b/recipes/augustus/meta.yaml @@ -1,28 +1,31 @@ +{% set name = "augustus" %} {% set version = "3.5.0" %} {% set sha256 = "5ed6ce6106303b800c5e91d37a250baff43b20824657b853ae04d11ad8bdd686" %} package: - name: augustus + name: {{ name }} version: {{ version }} source: url: https://github.com/Gaius-Augustus/Augustus/archive/v{{ version }}.tar.gz sha256: {{ sha256 }} patches: + - patches/0001-Makefile.patch - patches/homGeneMapping.src.makefile.patch - patches/utrrnaseq.patch build: - number: 4 + number: 5 + run_exports: + - {{ pin_subpackage('augustus', max_pin="x") }} requirements: build: - make - - {{ compiler('c') }} - {{ compiler('cxx') }} host: - zlib - - samtools ==0.1.19 + - samtools - bamtools - htslib - gsl @@ -35,7 +38,6 @@ requirements: - perl - perl-module-build run: - - zlib - boost-cpp - gsl - lp_solve @@ -152,8 +154,8 @@ test: - fix_in_frame_stop_codon_genes.py --help | grep -Fq 'fix_in_frame_stop_codon_genes.py' about: - home: http://bioinf.uni-greifswald.de/augustus/ - license: Artistic Licence + home: "https://bioinf.uni-greifswald.de/augustus" + license: "Artistic Licence" license_family: Other license_file: "src/LICENSE.TXT" summary: 'AUGUSTUS is a gene prediction program for eukaryotes written by Mario @@ -161,10 +163,13 @@ about: it bases its prediction purely on the sequence. AUGUSTUS may also incorporate hints on the gene structure coming from extrinsic sources such as EST, MS/MS, protein alignments and synthenic genomic alignments.' + dev_url: "https://github.com/Gaius-Augustus/Augustus" + doc_url: "https://github.com/Gaius-Augustus/Augustus/blob/v{{ version }}/docs/RUNNING-AUGUSTUS.md" extra: identifiers: - biotools:augustus - doi:10.1093/bioinformatics/btr010 - usegalaxy-eu:augustus + - usegalaxy-eu:augustus_training notes: "Builds with sqlite support are currently only available on Linux due to compile issues with macOS." diff --git a/recipes/augustus/patches/0001-Makefile.patch b/recipes/augustus/patches/0001-Makefile.patch new file mode 100644 index 0000000000000..29177a5f9654f --- /dev/null +++ b/recipes/augustus/patches/0001-Makefile.patch @@ -0,0 +1,40 @@ +diff --git a/Makefile b/Makefile +index a26b40c..b2ccb6a 100644 +--- a/Makefile ++++ b/Makefile +@@ -26,20 +26,26 @@ clean: + cd .. && ./pyclean.sh; \ + fi + +-PREFIX = /usr/local +-INSTALLDIR = /opt/augustus-$(AUGVERSION) ++# DESTDIR is usually the empty string but can be set for staging ++prefix ?= $(PREFIX) ++bindir = $(DESTDIR)$(prefix)/bin ++INSTALLDIR = $(prefix)/share/augustus-$(AUGVERSION) + + install: +- if [ ! $(PWD) -ef $(INSTALLDIR) ] ; then \ ++ @echo Installing augustus executables into $(bindir) ++# two main ways: ++# 1) make install is executed from anywhere but in INSTALLDIR. Then INSTALLDIR is created if it does not exist and config data is copied. ++# 2) make install is executed in INSTALLDIR. This is done by the singularity file. ++ if [ ! $(CURDIR) -ef $(INSTALLDIR) ] ; then \ + install -d $(INSTALLDIR) && \ + cp -a config bin scripts $(INSTALLDIR) ; \ + fi +- ln -sf $(INSTALLDIR)/bin/augustus $(PREFIX)/bin/augustus +- ln -sf $(INSTALLDIR)/bin/etraining $(PREFIX)/bin/etraining +- ln -sf $(INSTALLDIR)/bin/prepareAlign $(PREFIX)/bin/prepareAlign +- ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(PREFIX)/bin/fastBlockSearch +- if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(PREFIX)/bin/load2db ; fi +- if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(PREFIX)/bin/getSeq ; fi ++ ln -sf $(INSTALLDIR)/bin/augustus $(bindir)/augustus ++ ln -sf $(INSTALLDIR)/bin/etraining $(bindir)/etraining ++ ln -sf $(INSTALLDIR)/bin/prepareAlign $(bindir)/prepareAlign ++ ln -sf $(INSTALLDIR)/bin/fastBlockSearch $(bindir)/fastBlockSearch ++ if [ -f $(INSTALLDIR)/bin/load2db ] ; then ln -sf $(INSTALLDIR)/bin/load2db $(bindir)/load2db ; fi ++ if [ -f $(INSTALLDIR)/bin/getSeq ] ; then ln -sf $(INSTALLDIR)/bin/getSeq $(bindir)/getSeq ; fi + + # for internal purposes: + release: diff --git a/recipes/augustus/patches/utrrnaseq.patch b/recipes/augustus/patches/utrrnaseq.patch index 33ed805d73488..4befbfaf97c85 100644 --- a/recipes/augustus/patches/utrrnaseq.patch +++ b/recipes/augustus/patches/utrrnaseq.patch @@ -1,6 +1,17 @@ ---- a/auxprogs/utrrnaseq/Makefile 2022-09-23 10:06:14.000000000 -0700 -+++ b/auxprogs/utrrnaseq/Makefile 2022-10-08 10:15:31.359607884 -0700 -@@ -29,6 +29,7 @@ +diff --git a/auxprogs/utrrnaseq/Makefile b/auxprogs/utrrnaseq/Makefile +index 134c5c5..63fa103 100644 +--- a/auxprogs/utrrnaseq/Makefile ++++ b/auxprogs/utrrnaseq/Makefile +@@ -3,7 +3,7 @@ + include ../../common.mk + + CXX ?= g++ +-CXXFLAGS := -Wall -O0 -pedantic -fmessage-length=0 ${CXXFLAGS} ++CXXFLAGS := -Wall -O3 -pedantic -fmessage-length=0 -std=c++14 ${CXXFLAGS} + INCLS += $(INCLUDE_PATH_BOOST) # set boost include path in INCLUDE_PATH_BOOST, if boost is not installed system-wide + LDFLAGS += $(LIBRARY_PATH_BOOST) # set boost library path in LIBRARY_PATH_BOOST, if boost is not installed system-wide + +@@ -29,6 +29,7 @@ utrrnaseq: $(OBJS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) @echo 'Finished building target: $@' @echo ' ' @@ -8,7 +19,7 @@ $(OBJS): $(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp @echo 'Building file: $<' -@@ -55,5 +56,6 @@ +@@ -55,5 +56,6 @@ clean_test: clean: clean_test rm -rf $(OBJS) $(DEPS) $(OBJ_DIR) utrrnaseq @echo ' '