diff options
author | jwb <jwb@FreeBSD.org> | 2019-03-19 01:30:25 +0800 |
---|---|---|
committer | jwb <jwb@FreeBSD.org> | 2019-03-19 01:30:25 +0800 |
commit | 9fefaf1c079fa251a14da9609c3bb6db11ab233a (patch) | |
tree | 2ab5b3bd76d5138d93e900406327710e5e966ca5 /biology | |
parent | 070acba05467bf00dbdaad471839fb60d5ab4e96 (diff) | |
download | freebsd-ports-gnome-9fefaf1c079fa251a14da9609c3bb6db11ab233a.tar.gz freebsd-ports-gnome-9fefaf1c079fa251a14da9609c3bb6db11ab233a.tar.zst freebsd-ports-gnome-9fefaf1c079fa251a14da9609c3bb6db11ab233a.zip |
biology/bowtie2: Upgrade to 2.3.5
- Add bowtie2-test script
- Separate Makefile patches into a static patch for upstream and reinplace
for ports-specifics
- Allow aarch64 per upstream Makefile (untested)
Diffstat (limited to 'biology')
-rw-r--r-- | biology/bowtie2/Makefile | 26 | ||||
-rw-r--r-- | biology/bowtie2/distinfo | 6 | ||||
-rw-r--r-- | biology/bowtie2/files/bowtie2-test.in | 69 | ||||
-rw-r--r-- | biology/bowtie2/files/patch-Makefile | 48 | ||||
-rw-r--r-- | biology/bowtie2/pkg-plist | 3 |
5 files changed, 111 insertions, 41 deletions
diff --git a/biology/bowtie2/Makefile b/biology/bowtie2/Makefile index 0f72c9de9c65..74a60bea3624 100644 --- a/biology/bowtie2/Makefile +++ b/biology/bowtie2/Makefile @@ -1,10 +1,9 @@ # $FreeBSD$ -PORTNAME= bowtie2 -PORTVERSION= 2.3.3.1 +PORTNAME= bowtie2 DISTVERSIONPREFIX= v -PORTREVISION= 2 -CATEGORIES= biology +DISTVERSION= 2.3.5 +CATEGORIES= biology perl5 python MAINTAINER= jwb@FreeBSD.org COMMENT= Ultrafast, memory-efficient short read aligner @@ -13,20 +12,28 @@ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE # May also work on other 64-bit platforms, but untested -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= aarch64 amd64 LIB_DEPENDS= libtbb.so:devel/tbb -USES= gmake perl5 python shebangfix +USES= gmake localbase:ldflags perl5 python shebangfix USE_PERL5= run -SHEBANG_FILES= bowtie2-build bowtie2-inspect scripts/*.pl - USE_GITHUB= yes + +SHEBANG_FILES= bowtie2 bowtie2-build bowtie2-inspect scripts/*.pl GH_ACCOUNT= BenLangmead OPTIONS_DEFINE= DOCS EXAMPLES +SUB_FILES= bowtie2-test + +pre-configure: + @${REINPLACE_CMD} \ + -e 's|^RELEASE_FLAGS|# RELEASE_FLAGS|' \ + -e 's|tbbmalloc_proxy|tbbmalloc|' \ + ${WRKSRC}/Makefile + post-install: - ${MKDIR} ${STAGEDIR}${DATADIR}/scripts + @${MKDIR} ${STAGEDIR}${DATADIR}/scripts ${INSTALL_PROGRAM} \ ${WRKSRC}/bowtie2*-s \ ${WRKSRC}/bowtie2*-l \ @@ -35,6 +42,7 @@ post-install: ${WRKSRC}/scripts/*.sh \ ${WRKSRC}/scripts/*.pl \ ${STAGEDIR}${DATADIR}/scripts + ${INSTALL_SCRIPT} ${WRKDIR}/bowtie2-test ${STAGEDIR}${PREFIX}/bin post-install-DOCS-on: (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) diff --git a/biology/bowtie2/distinfo b/biology/bowtie2/distinfo index 4b20fa1182b9..126db6afca80 100644 --- a/biology/bowtie2/distinfo +++ b/biology/bowtie2/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1511991430 -SHA256 (BenLangmead-bowtie2-v2.3.3.1_GH0.tar.gz) = 8b9c0b9c595ebcddcac5feaf6acb44b2294d6deb91de107596ecad242a1a58e9 -SIZE (BenLangmead-bowtie2-v2.3.3.1_GH0.tar.gz) = 5796279 +TIMESTAMP = 1552832567 +SHA256 (BenLangmead-bowtie2-v2.3.5_GH0.tar.gz) = c5daeb0249e98dfe8f70dac7d660b100365a00a22df4cad94d3e383f489911ae +SIZE (BenLangmead-bowtie2-v2.3.5_GH0.tar.gz) = 10584383 diff --git a/biology/bowtie2/files/bowtie2-test.in b/biology/bowtie2/files/bowtie2-test.in new file mode 100644 index 000000000000..d88fe25292fe --- /dev/null +++ b/biology/bowtie2/files/bowtie2-test.in @@ -0,0 +1,69 @@ +#!/bin/sh -e + +########################################################################## +# Script description: +# Test bowtie2 on examples provided +# http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml +# +# History: +# Date Name Modification +# 2019-03-17 Jason Bacon Begin +########################################################################## + +usage() +{ + printf "Usage: $0 \n" + exit 1 +} + + +########################################################################## +# Main +########################################################################## + +if [ $# != 0 ]; then + usage +fi + +########################################################################## +# Function description: +# Pause until user presses return +########################################################################## + +pause() +{ + local junk + + printf "Press return to continue..." + read junk +} + +cat << EOM + +This script follows the bowtie2 "Getting Started" section of the manual: + +http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml + +EOM +pause + +examples_dir=%%EXAMPLESDIR%% +bowtie2-build $examples_dir/reference/lambda_virus.fa \ + lambda_virus +printf "Done indexing...\n" +pause + +bowtie2 -x lambda_virus -U $examples_dir/reads/reads_1.fq -S eg1.sam +printf "Done with alignment.\n" +pause +more eg1.sam + +bowtie2 -x lambda_virus -1 $examples_dir/reads/reads_1.fq -2 $examples_dir/reads/reads_2.fq -S eg2.sam +printf "Done with paired end example.\n" +pause +more eg2.sam + +bowtie2 --local -x lambda_virus -U $examples_dir/reads/longreads.fq -S eg3.sam +printf "Done with local alignment example.\n" +pause +more eg3.sam diff --git a/biology/bowtie2/files/patch-Makefile b/biology/bowtie2/files/patch-Makefile index 137f203b15a9..957b35c9d83e 100644 --- a/biology/bowtie2/files/patch-Makefile +++ b/biology/bowtie2/files/patch-Makefile @@ -1,34 +1,24 @@ ---- Makefile.orig 2017-10-05 16:45:18 UTC +--- Makefile.orig 2019-03-16 04:14:43 UTC +++ Makefile -@@ -21,10 +21,11 @@ +@@ -21,8 +21,9 @@ # Makefile for bowtie, bowtie2-build, bowtie2-inspect # --prefix = /usr/local --bindir = $(prefix)/bin -+PREFIX ?= /usr/local -+bindir = $(PREFIX)/bin +-prefix := /usr/local +-bindir := $(prefix)/bin ++# Use PREFIX (upper case) provided by many package managers ++PREXIX ?= /usr/local ++bindir := $(PREFIX)/bin - INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) -+INC += -I${LOCALBASE}/include - LIBS = $(LDFLAGS) $(if $(RELEASE_BUILD),-L$(CURDIR)/.lib) -lz - GCC_PREFIX = $(shell dirname `which gcc`) - GCC_SUFFIX = -@@ -98,7 +99,7 @@ endif - - #default is to use Intel TBB - ifneq (1,$(NO_TBB)) -- LIBS += $(PTHREAD_LIB) -ltbb -ltbbmalloc$(if $(RELEASE_BUILD),,_proxy) -+ LIBS += $(PTHREAD_LIB) -L${LOCALBASE}/lib -ltbb -ltbbmalloc - override EXTRA_FLAGS += -DWITH_TBB - else - LIBS += $(PTHREAD_LIB) -@@ -189,7 +190,7 @@ SSE_FLAG=-msse2 - - DEBUG_FLAGS = -O0 -g3 -m64 $(SSE_FLAG) - DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" --RELEASE_FLAGS = -O3 -m64 $(SSE_FLAG) -funroll-loops -g3 -+RELEASE_FLAGS = $(CXXFLAGS) $(SSE_FLAG) -funroll-loops - RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" - NOASSERT_FLAGS = -DNDEBUG - FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + LDLIBS := -lz + GCC_PREFIX := $(shell dirname `which gcc`) +@@ -30,7 +31,8 @@ GCC_SUFFIX := + CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) + CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX) + CXX ?= $(CPP) +-CXXFLAGS += -std=c++98 ++# long long is unsupported in c++98 ++# CXXFLAGS += -std=c++98 + ifeq (aarch64,$(shell uname -m)) + CXXFLAGS += -fopenmp-simd -DWITH_AARCH64 + CPPFLAGS += -Ithird_party/simde diff --git a/biology/bowtie2/pkg-plist b/biology/bowtie2/pkg-plist index 22d100530833..b2b9b7d06b61 100644 --- a/biology/bowtie2/pkg-plist +++ b/biology/bowtie2/pkg-plist @@ -7,6 +7,7 @@ bin/bowtie2-build-s bin/bowtie2-inspect bin/bowtie2-inspect-l bin/bowtie2-inspect-s +bin/bowtie2-test %%DATADIR%%/scripts/convert_quals.pl %%DATADIR%%/scripts/gen_2b_occ_lookup.pl %%DATADIR%%/scripts/gen_occ_lookup.pl @@ -56,6 +57,8 @@ bin/bowtie2-inspect-s %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.4.bt2 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.rev.1.bt2 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.rev.2.bt2 +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/combined_reads.bam +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/conversion_utilities.sh %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/longreads.fq %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/reads_1.fq %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/reads_2.fq |