aboutsummaryrefslogtreecommitdiffstats
path: root/biology
diff options
context:
space:
mode:
authorjwb <jwb@FreeBSD.org>2018-04-16 01:45:52 +0800
committerjwb <jwb@FreeBSD.org>2018-04-16 01:45:52 +0800
commitbb8d3eb79127da575220f836b2fdf071c410abf3 (patch)
tree3bac8ed5a831022b300765bbbf8956314bda5abc /biology
parentec12e9f76cb28c39cbe78b7d79c81633a5607252 (diff)
downloadfreebsd-ports-gnome-bb8d3eb79127da575220f836b2fdf071c410abf3.tar.gz
freebsd-ports-gnome-bb8d3eb79127da575220f836b2fdf071c410abf3.tar.zst
freebsd-ports-gnome-bb8d3eb79127da575220f836b2fdf071c410abf3.zip
biology/smithwaterman: Smith-waterman-gotoh alignment algorithm
Approved by: jrm (mentor) Differential Revision: https://reviews.freebsd.org/D15072
Diffstat (limited to 'biology')
-rw-r--r--biology/Makefile1
-rw-r--r--biology/smithwaterman/Makefile25
-rw-r--r--biology/smithwaterman/distinfo3
-rw-r--r--biology/smithwaterman/files/Makefile100
-rw-r--r--biology/smithwaterman/pkg-descr8
-rw-r--r--biology/smithwaterman/pkg-plist12
6 files changed, 149 insertions, 0 deletions
diff --git a/biology/Makefile b/biology/Makefile
index e5403769363a..7508cc78b981 100644
--- a/biology/Makefile
+++ b/biology/Makefile
@@ -111,6 +111,7 @@
SUBDIR += seqtools
SUBDIR += sim4
SUBDIR += slclust
+ SUBDIR += smithwaterman
SUBDIR += ssaha
SUBDIR += stacks
SUBDIR += tRNAscan-SE
diff --git a/biology/smithwaterman/Makefile b/biology/smithwaterman/Makefile
new file mode 100644
index 000000000000..c43ae146e3ce
--- /dev/null
+++ b/biology/smithwaterman/Makefile
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= smithwaterman
+DISTVERSION= g20160702
+CATEGORIES= biology
+
+MAINTAINER= jwb@FreeBSD.org
+COMMENT= Smith-waterman-gotoh alignment algorithm
+
+LICENSE= GPLv2
+
+USES= gmake
+USE_LDCONFIG= yes
+USE_GITHUB= yes
+GH_ACCOUNT= ekg
+GH_TAGNAME= 2610e259611ae4cde8f03c72499d28f03f6d38a7
+
+MAKEFILE= ${FILESDIR}/Makefile
+INSTALL_TARGET= install-strip
+
+post-install:
+ ${RLN} ${STAGEDIR}${PREFIX}/lib/libsw.so.1 \
+ ${STAGEDIR}${PREFIX}/lib/libsw.so
+
+.include <bsd.port.mk>
diff --git a/biology/smithwaterman/distinfo b/biology/smithwaterman/distinfo
new file mode 100644
index 000000000000..fbe7b79ddd51
--- /dev/null
+++ b/biology/smithwaterman/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1523600109
+SHA256 (ekg-smithwaterman-g20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7_GH0.tar.gz) = 8e1b37ab0e8cd9d3d5cbfdba80258c0ebd0862749b531e213f44cdfe2fc541d8
+SIZE (ekg-smithwaterman-g20160702-2610e259611ae4cde8f03c72499d28f03f6d38a7_GH0.tar.gz) = 39190
diff --git a/biology/smithwaterman/files/Makefile b/biology/smithwaterman/files/Makefile
new file mode 100644
index 000000000000..3910576afffe
--- /dev/null
+++ b/biology/smithwaterman/files/Makefile
@@ -0,0 +1,100 @@
+# =========================================
+# MOSAIK Banded Smith-Waterman Makefile
+# (c) 2009 Michael Stromberg & Wan-Ping Lee
+# =========================================
+
+# ----------------------------------
+# define our source and object files
+# ----------------------------------
+
+SOURCES= smithwaterman.cpp BandedSmithWaterman.cpp SmithWatermanGotoh.cpp Repeats.cpp LeftAlign.cpp IndelAllele.cpp
+OBJECTS= $(SOURCES:.cpp=.o) disorder.o
+OBJECTS_NO_MAIN= disorder.o BandedSmithWaterman.o SmithWatermanGotoh.o Repeats.o LeftAlign.o IndelAllele.o
+
+# ----------------
+# compiler options
+# ----------------
+
+# Use ?= to allow overriding from the env or command-line, e.g.
+#
+# make CXXFLAGS="-O3 -fPIC" install
+#
+# Package managers will override many of these variables automatically, so
+# this is aimed at making it easy to create packages (Debian packages,
+# FreeBSD ports, MacPorts, pkgsrc, etc.)
+
+CXX ?= c++
+CXXFLAGS ?= -O3
+CXXFLAGS += -fPIC
+DESTDIR ?= stage
+PREFIX ?= /usr/local
+STRIP ?= strip
+INSTALL ?= install -c
+MKDIR ?= mkdir -p
+AR ?= ar
+LN ?= ln
+
+LDFLAGS:= -Wl,-s
+BIN = smithwaterman
+LIB = libsw.a
+SOVERSION = 1
+SLIB = libsw.so.$(SOVERSION)
+
+all: $(BIN) $(LIB) $(SLIB) sw.o
+
+.PHONY: all
+
+$(LIB): $(OBJECTS_NO_MAIN)
+ $(AR) rs $@ $(OBJECTS_NO_MAIN)
+
+$(SLIB): $(OBJECTS_NO_MAIN)
+ $(CXX) -shared -Wl,-soname,$(SLIB) -o $(SLIB) $(OBJECTS_NO_MAIN)
+
+sw.o: $(OBJECTS_NO_MAIN)
+ ld -r $^ -o sw.o -L.
+ @#$(CXX) $(CFLAGS) -c -o smithwaterman.cpp $(OBJECTS_NO_MAIN) -I.
+
+### @$(CXX) $(LDFLAGS) $(CFLAGS) -o $@ $^ -I.
+$(BIN): $(OBJECTS)
+ $(CXX) $(CFLAGS) $^ -I. -o $@
+
+#smithwaterman: $(OBJECTS)
+# $(CXX) $(CXXFLAGS) -o $@ $< -I.
+
+smithwaterman.o: smithwaterman.cpp disorder.o
+ $(CXX) $(CXXFLAGS) -c -o $@ smithwaterman.cpp -I.
+
+disorder.o: disorder.cpp disorder.h
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+BandedSmithWaterman.o: BandedSmithWaterman.cpp BandedSmithWaterman.h
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+SmithWatermanGotoh.o: SmithWatermanGotoh.cpp SmithWatermanGotoh.h disorder.o
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+Repeats.o: Repeats.cpp
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+LeftAlign.o: LeftAlign.cpp
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+IndelAllele.o: IndelAllele.cpp
+ $(CXX) $(CXXFLAGS) -c -o $@ $< -I.
+
+install: all
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(MKDIR) $(DESTDIR)$(PREFIX)/include/smithwaterman
+ $(MKDIR) $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) $(BIN) $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) *.h $(DESTDIR)$(PREFIX)/include/smithwaterman
+ $(INSTALL) $(LIB) $(SLIB) $(DESTDIR)$(PREFIX)/lib
+
+install-strip: install
+ $(STRIP) $(DESTDIR)$(PREFIX)/bin/$(BIN) $(DESTDIR)$(PREFIX)/lib/$(SLIB)
+
+.PHONY: clean
+
+clean:
+ @echo "Cleaning up."
+ @rm -rf $(BIN) $(LIB) $(SLIB) $(OBJECTS) $(DESTDIR)
diff --git a/biology/smithwaterman/pkg-descr b/biology/smithwaterman/pkg-descr
new file mode 100644
index 000000000000..8569aa85b397
--- /dev/null
+++ b/biology/smithwaterman/pkg-descr
@@ -0,0 +1,8 @@
+The Smith-Waterman algorithm performs local sequence alignment; that is, for
+determining similar regions between two strings of nucleic acid sequences or
+protein sequences. Instead of looking at the entire sequence, the
+Smith-Waterman algorithm compares segments of all possible lengths and
+optimizes the similarity measure. Gotoh and Atschul added optimizations making
+it practical for larger problems.
+
+WWW: https://github.com/ekg/smithwaterman
diff --git a/biology/smithwaterman/pkg-plist b/biology/smithwaterman/pkg-plist
new file mode 100644
index 000000000000..81fd5215f421
--- /dev/null
+++ b/biology/smithwaterman/pkg-plist
@@ -0,0 +1,12 @@
+bin/smithwaterman
+include/smithwaterman/BandedSmithWaterman.h
+include/smithwaterman/IndelAllele.h
+include/smithwaterman/LeftAlign.h
+include/smithwaterman/Mosaik.h
+include/smithwaterman/Repeats.h
+include/smithwaterman/SmithWatermanGotoh.h
+include/smithwaterman/convert.h
+include/smithwaterman/disorder.h
+lib/libsw.a
+lib/libsw.so
+lib/libsw.so.1