biology/freebayes: Bayesian haplotype-based polymorphism discovery and genotyping
Approved by: jrm (mentor) Differential Revision: https://reviews.freebsd.org/D15116
This commit is contained in:
parent
42b89ed8c9
commit
73a92ce760
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=467806
@ -33,6 +33,7 @@
|
||||
SUBDIR += fasttree
|
||||
SUBDIR += fastx-toolkit
|
||||
SUBDIR += fluctuate
|
||||
SUBDIR += freebayes
|
||||
SUBDIR += garlic
|
||||
SUBDIR += gff2ps
|
||||
SUBDIR += gmap
|
||||
|
50
biology/freebayes/Makefile
Normal file
50
biology/freebayes/Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= freebayes
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 1.2.0
|
||||
CATEGORIES= biology
|
||||
|
||||
MAINTAINER= jwb@FreeBSD.org
|
||||
COMMENT= Bayesian haplotype-based polymorphism discovery and genotyping
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
# Submodules use older versions than the ports, so we cannot safely unbundle
|
||||
# No shared libs are built by the submodules so there will be no conflicts
|
||||
USES= gmake tar:xz
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ekg
|
||||
GH_TUPLE= walaj:SeqLib:5941c68:SeqLib/SeqLib-temp \
|
||||
jwalabroad:bwa:c02766e:bwa/SeqLib/bwa \
|
||||
jwalabroad:fermi-lite:5bc90f8:fermi/SeqLib/fermi-lite \
|
||||
samtools:htslib:49fdfbd:htslib/SeqLib/htslib \
|
||||
ekg:bamtools:e77a43f:bamtools/bamtools \
|
||||
ekg:intervaltree:dbb4c51:interval1/intervaltree \
|
||||
vcflib:vcflib:5e3ce04:vcflib/vcflib-temp \
|
||||
ekg:fastahack:c68cebb:fastahack/vcflib/fastahack \
|
||||
ekg:filevercmp:1a9b779:filevercmp/vcflib/filevercmp \
|
||||
ekg:fsom:a6ef318:fsom/vcflib/fsom \
|
||||
google:googletest:d225acc:google/vcflib/googletest \
|
||||
ekg:intervaltree:b704f19:interval2/vcflib/intervaltree \
|
||||
ekg:multichoose:73d35da:multichoose/vcflib/multichoose \
|
||||
ekg:smithwaterman:84c08d7:smithwaterman/vcflib/smithwaterman \
|
||||
ekg:tabixpp:80012f8:tabixpp/vcflib/tabixpp \
|
||||
samtools:htslib:0f298ce:hts2/vcflib/tabixpp/htslib
|
||||
|
||||
# GCC disables sse2 by default on i386, but it's required for vcflib
|
||||
CXXFLAGS+= --std=c++11
|
||||
CFLAGS_i386= -msse2
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
PLIST_FILES= bin/bamleftalign bin/freebayes
|
||||
|
||||
# GH_TUPLEs cannot seem to share a top-level subdirectory, so we work around
|
||||
# by dumping the parent in a temp directory and then moving the contents
|
||||
post-extract:
|
||||
${MV} -n ${WRKSRC}/SeqLib-temp/* ${WRKSRC}/SeqLib
|
||||
${MV} -n ${WRKSRC}/vcflib-temp/* ${WRKSRC}/vcflib
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
35
biology/freebayes/distinfo
Normal file
35
biology/freebayes/distinfo
Normal file
@ -0,0 +1,35 @@
|
||||
TIMESTAMP = 1523932688
|
||||
SHA256 (ekg-freebayes-v1.2.0_GH0.tar.gz) = a5626636112966cac87095365986722d1c871759f03c5a143646da65c416ba8a
|
||||
SIZE (ekg-freebayes-v1.2.0_GH0.tar.gz) = 2639725
|
||||
SHA256 (walaj-SeqLib-5941c68_GH0.tar.gz) = 0ac2b63f5fd7b1cec20a18ebb6799bf1f9b88d6c7cd95f7dd7410b1b82c8703f
|
||||
SIZE (walaj-SeqLib-5941c68_GH0.tar.gz) = 314968
|
||||
SHA256 (jwalabroad-bwa-c02766e_GH0.tar.gz) = cce547db0efef8572d63b47d2065f07e36f770fc8a6f15f5cd03d6fa9ab9b1f7
|
||||
SIZE (jwalabroad-bwa-c02766e_GH0.tar.gz) = 205546
|
||||
SHA256 (jwalabroad-fermi-lite-5bc90f8_GH0.tar.gz) = 2b3b9b637f48dc3239618efd6b55183eef6b6232013c217eb1c319f1dd3da224
|
||||
SIZE (jwalabroad-fermi-lite-5bc90f8_GH0.tar.gz) = 248454
|
||||
SHA256 (samtools-htslib-49fdfbd_GH0.tar.gz) = 0bc9c7d48e2a439badf5990113ae3e4de9acd05e4c090938236ee40588d115b9
|
||||
SIZE (samtools-htslib-49fdfbd_GH0.tar.gz) = 1145082
|
||||
SHA256 (ekg-bamtools-e77a43f_GH0.tar.gz) = d3a143636ccedcc54417a2d6d88dd726c7d2c046318620b88c7ba2fb30b01419
|
||||
SIZE (ekg-bamtools-e77a43f_GH0.tar.gz) = 540118
|
||||
SHA256 (ekg-intervaltree-dbb4c51_GH0.tar.gz) = 1f3ba92a83cb782cf22dfb383b8c93c11c1c88e0b2e5fa434e24668260ecd1f8
|
||||
SIZE (ekg-intervaltree-dbb4c51_GH0.tar.gz) = 3780
|
||||
SHA256 (vcflib-vcflib-5e3ce04_GH0.tar.gz) = d084c1df7bb0004df18e013da3cbf896b642d853c855aea58ae029abe1d2097a
|
||||
SIZE (vcflib-vcflib-5e3ce04_GH0.tar.gz) = 20119782
|
||||
SHA256 (ekg-fastahack-c68cebb_GH0.tar.gz) = c6f7186bbe733ff78c25b2afd7e7ba79daa3ecd14a5876ea0b033a43744c876d
|
||||
SIZE (ekg-fastahack-c68cebb_GH0.tar.gz) = 17312
|
||||
SHA256 (ekg-filevercmp-1a9b779_GH0.tar.gz) = 34c21d1b58295bca72b92c1cd832a4171b07ec97c19ffc0d4d8ec67e266c6070
|
||||
SIZE (ekg-filevercmp-1a9b779_GH0.tar.gz) = 3053
|
||||
SHA256 (ekg-fsom-a6ef318_GH0.tar.gz) = 68351c16d5c4b96142409e38c6828b6199eae44eaa7579bde165734d4832565b
|
||||
SIZE (ekg-fsom-a6ef318_GH0.tar.gz) = 9686
|
||||
SHA256 (google-googletest-d225acc_GH0.tar.gz) = 6880e0d51fa80a508ad5674ce483c1c468315faddac10d580b5505e8e7ef6bfa
|
||||
SIZE (google-googletest-d225acc_GH0.tar.gz) = 1279815
|
||||
SHA256 (ekg-intervaltree-b704f19_GH0.tar.gz) = 7e38b5f5873790afbcfdf6adbb621cdf4a1d9f22e28934a8edfe62cd65918f0d
|
||||
SIZE (ekg-intervaltree-b704f19_GH0.tar.gz) = 3768
|
||||
SHA256 (ekg-multichoose-73d35da_GH0.tar.gz) = af52475d7568863ad8173aebfb6b8b87690118bad8945876b629a2b3c05577cf
|
||||
SIZE (ekg-multichoose-73d35da_GH0.tar.gz) = 4697
|
||||
SHA256 (ekg-smithwaterman-84c08d7_GH0.tar.gz) = 299c9e28e50977642d1538f8940852976b6db3241619eb1f40b78484b1cde58e
|
||||
SIZE (ekg-smithwaterman-84c08d7_GH0.tar.gz) = 38382
|
||||
SHA256 (ekg-tabixpp-80012f8_GH0.tar.gz) = 6aecc865673776bec4e2ddb14e629a4798ad36bf8f7639968812a6262675fb3f
|
||||
SIZE (ekg-tabixpp-80012f8_GH0.tar.gz) = 3530
|
||||
SHA256 (samtools-htslib-0f298ce_GH0.tar.gz) = 829bb54383745fb923ed5d8dabbb6aa8b5d9501601c7a4163276d86aca1196ee
|
||||
SIZE (samtools-htslib-0f298ce_GH0.tar.gz) = 1065854
|
20
biology/freebayes/files/patch-Makefile
Normal file
20
biology/freebayes/files/patch-Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
--- Makefile.orig 2018-03-23 14:01:01 UTC
|
||||
+++ Makefile
|
||||
@@ -5,7 +5,7 @@ wbamtools: vcflib/Makefile log
|
||||
cd src && $(MAKE) -f Makefile.bamtools
|
||||
|
||||
log: src/version_git.h
|
||||
- wget -q http://hypervolu.me/freebayes/build/$(shell cat src/version_git.h | grep v | cut -f 3 -d\ | sed s/\"//g) &
|
||||
+ # wget -q http://hypervolu.me/freebayes/build/$(shell cat src/version_git.h | grep v | cut -f 3 -d\ | sed s/\"//g) &
|
||||
|
||||
src/version_git.h:
|
||||
cd src && $(MAKE) autoversion
|
||||
@@ -27,7 +27,7 @@ uninstall:
|
||||
rm /usr/local/bin/freebayes /usr/local/bin/bamleftalign
|
||||
|
||||
test:
|
||||
- cd test && make test
|
||||
+ cd test && ${MAKE} test
|
||||
|
||||
clean:
|
||||
cd src && $(MAKE) clean
|
14
biology/freebayes/files/patch-SeqLib_bwa_Makefile
Normal file
14
biology/freebayes/files/patch-SeqLib_bwa_Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
--- SeqLib/bwa/Makefile.orig 2018-03-23 18:47:04 UTC
|
||||
+++ SeqLib/bwa/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
-CC= gcc
|
||||
+CC ?= gcc
|
||||
#CC= clang --analyze
|
||||
-CFLAGS= -g -Wall -Wno-unused-function -O2
|
||||
+CFLAGS ?= -g -Wall -Wno-unused-function -O2
|
||||
WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS
|
||||
-AR= ar
|
||||
+AR ?= ar
|
||||
DFLAGS= -DHAVE_PTHREAD $(WRAP_MALLOC)
|
||||
## moved is.o bwtiindex.o rope.o to LOBJS
|
||||
LOBJS= utils.o kthread.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o \
|
10
biology/freebayes/files/patch-SeqLib_bwa_bwt__lite.c
Normal file
10
biology/freebayes/files/patch-SeqLib_bwa_bwt__lite.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- SeqLib/bwa/bwt_lite.c.orig 2018-03-23 18:49:48 UTC
|
||||
+++ SeqLib/bwa/bwt_lite.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
+#include <sys/types.h>
|
||||
#include "bwt_lite.h"
|
||||
|
||||
#ifdef USE_MALLOC_WRAPPERS
|
10
biology/freebayes/files/patch-SeqLib_bwa_bwtgap.h
Normal file
10
biology/freebayes/files/patch-SeqLib_bwa_bwtgap.h
Normal file
@ -0,0 +1,10 @@
|
||||
--- SeqLib/bwa/bwtgap.h.orig 2018-03-23 18:49:18 UTC
|
||||
+++ SeqLib/bwa/bwtgap.h
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "bwt.h"
|
||||
#include "bwtaln.h"
|
||||
+#include <sys/types.h>
|
||||
|
||||
typedef struct { // recursion stack
|
||||
u_int32_t info; // score<<21 | i
|
10
biology/freebayes/files/patch-SeqLib_bwa_kthread.c
Normal file
10
biology/freebayes/files/patch-SeqLib_bwa_kthread.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- SeqLib/bwa/kthread.c.orig 2018-03-23 18:48:35 UTC
|
||||
+++ SeqLib/bwa/kthread.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
+#include <inttypes.h>
|
||||
|
||||
/************
|
||||
* kt_for() *
|
12
biology/freebayes/files/patch-SeqLib_fermi-lite_Makefile
Normal file
12
biology/freebayes/files/patch-SeqLib_fermi-lite_Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
--- SeqLib/fermi-lite/Makefile.orig 2018-03-23 18:50:25 UTC
|
||||
+++ SeqLib/fermi-lite/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
-CC= gcc
|
||||
-CFLAGS= -g -Wall -O2 -Wno-unused-function #-fno-inline-functions -fno-inline-functions-called-once
|
||||
-CPPFLAGS=
|
||||
+CC ?= gcc
|
||||
+CFLAGS ?= -g -Wall -O2 -Wno-unused-function #-fno-inline-functions -fno-inline-functions-called-once
|
||||
+CPPFLAGS ?=
|
||||
INCLUDES=
|
||||
OBJS= kthread.o misc.o \
|
||||
bseq.o htab.o bfc.o \
|
38
biology/freebayes/files/patch-SeqLib_htslib_Makefile
Normal file
38
biology/freebayes/files/patch-SeqLib_htslib_Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
--- SeqLib/htslib/Makefile.orig 2017-06-20 12:40:28 UTC
|
||||
+++ SeqLib/htslib/Makefile
|
||||
@@ -22,20 +22,20 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-CC = gcc
|
||||
-AR = ar
|
||||
-RANLIB = ranlib
|
||||
+CC ?= gcc
|
||||
+AR ?= ar
|
||||
+RANLIB ?= ranlib
|
||||
|
||||
# Default libraries to link if configure is not used
|
||||
htslib_default_libs = -lz -lm -lbz2 -llzma
|
||||
|
||||
-CPPFLAGS =
|
||||
+CPPFLAGS ?=
|
||||
# TODO: probably update cram code to make it compile cleanly with -Wc++-compat
|
||||
# For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600
|
||||
#CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -D__FUNCTION__=__func__
|
||||
-CFLAGS = -g -Wall -O2
|
||||
+CFLAGS ?= -g -Wall -O2
|
||||
EXTRA_CFLAGS_PIC = -fpic
|
||||
-LDFLAGS =
|
||||
+LDFLAGS ?=
|
||||
LIBS = $(htslib_default_libs)
|
||||
|
||||
prefix = /usr/local
|
||||
@@ -86,7 +86,7 @@ BUILT_THRASH_PROGRAMS = \
|
||||
test/thrash_threads5 \
|
||||
test/thrash_threads6
|
||||
|
||||
-all: lib-static lib-shared $(BUILT_PROGRAMS) plugins $(BUILT_TEST_PROGRAMS)
|
||||
+all: lib-static $(BUILT_PROGRAMS) plugins $(BUILT_TEST_PROGRAMS)
|
||||
|
||||
HTSPREFIX =
|
||||
include htslib_vars.mk
|
11
biology/freebayes/files/patch-src_LargeFileSupport.h
Normal file
11
biology/freebayes/files/patch-src_LargeFileSupport.h
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/LargeFileSupport.h.orig 2018-03-23 21:15:04 UTC
|
||||
+++ src/LargeFileSupport.h
|
||||
@@ -8,7 +8,7 @@ typedef __int64 off_type;
|
||||
#define ftell64(a) ftell(a)
|
||||
#define fseek64(a,b,c) fseek(a,b,c)
|
||||
typedef __int64_t off_type;
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#define ftell64(a) ftello(a)
|
||||
#define fseek64(a,b,c) fseeko(a,b,c)
|
||||
typedef off_t off_type;
|
62
biology/freebayes/files/patch-src_Makefile
Normal file
62
biology/freebayes/files/patch-src_Makefile
Normal file
@ -0,0 +1,62 @@
|
||||
--- src/Makefile.orig 2018-03-23 14:01:01 UTC
|
||||
+++ src/Makefile
|
||||
@@ -5,8 +5,9 @@
|
||||
################################################################################
|
||||
|
||||
# Compiler
|
||||
-CXX=g++ ${CXXFLAGS}
|
||||
-C=gcc
|
||||
+CXX ?= g++
|
||||
+# CXX += ${CXXFLAGS}
|
||||
+CC ?= gcc
|
||||
|
||||
export CXXFLAGS
|
||||
export C
|
||||
@@ -17,7 +18,7 @@ export LIBFLAGS
|
||||
|
||||
# Compiler flags
|
||||
|
||||
-CFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -g
|
||||
+CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
#CFLAGS=-O3 -static -D VERBOSE_DEBUG # enables verbose debugging via --debug2
|
||||
|
||||
SEQLIB_ROOT=../SeqLib
|
||||
@@ -25,7 +26,7 @@ VCFLIB_ROOT=../vcflib
|
||||
TABIX_ROOT=$(VCFLIB_ROOT)/tabixpp
|
||||
HTSLIB_ROOT=$(SEQLIB_ROOT)/htslib
|
||||
|
||||
-LIBS = -lz -llzma -lbz2 -lm -lpthread
|
||||
+LIBS = -lz -llzma -lbz2 -lm -lpthread -lexecinfo
|
||||
INCLUDE = -I../src -I../ttmath -I$(VCFLIB_ROOT)/src/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(VCFLIB_ROOT)/fastahack/ -I$(HTSLIB_ROOT) -I$(SEQLIB_ROOT)
|
||||
#INCLUDE = -I../ttmath -I$(BAMTOOLS_ROOT)/src/ -I$(VCFLIB_ROOT)/src/ -I$(TABIX_ROOT)/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(VCFLIB_ROOT)/fastahack/ -I$(HTSLIB_ROOT) -I$(SEQLIB_ROOT) -I$(SEQLIB_ROOT)/htslib
|
||||
|
||||
@@ -46,10 +47,10 @@ gprof:
|
||||
.PHONY: all static debug profiling gprof
|
||||
|
||||
$(HTSLIB_ROOT)/libhts.a:
|
||||
- cd $(HTSLIB_ROOT) && make
|
||||
+ cd $(HTSLIB_ROOT) && ${MAKE}
|
||||
|
||||
$(SEQLIB_ROOT)/src/libseqlib.a:
|
||||
- cd $(SEQLIB_ROOT) && ./configure && make
|
||||
+ cd $(SEQLIB_ROOT) && ./configure && ${MAKE}
|
||||
|
||||
OBJECTS=BedReader.o \
|
||||
CNV.o \
|
||||
@@ -122,7 +123,7 @@ freebayes.o: freebayes.cpp TryCatch.h $(
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDE) -c freebayes.cpp
|
||||
|
||||
fastlz.o: fastlz.c fastlz.h
|
||||
- $(C) $(CFLAGS) $(INCLUDE) -c fastlz.c
|
||||
+ $(CC) $(CFLAGS) $(INCLUDE) -c fastlz.c
|
||||
|
||||
Parameters.o: Parameters.cpp Parameters.h Version.h
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Parameters.cpp
|
||||
@@ -277,5 +278,5 @@ autoversion:
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.cgh *~ freebayes alleles ../bin/freebayes ../bin/alleles ../vcflib/*.o ../vcflib/tabixpp/*.{o,a} tabix.hpp
|
||||
- if [ -d $(BAMTOOLS_ROOT)/build ]; then make -C $(BAMTOOLS_ROOT)/build clean; fi
|
||||
- make -C $(VCFLIB_ROOT)/smithwaterman clean
|
||||
+ if [ -d $(BAMTOOLS_ROOT)/build ]; then ${MAKE} -C $(BAMTOOLS_ROOT)/build clean; fi
|
||||
+ ${MAKE} -C $(VCFLIB_ROOT)/smithwaterman clean
|
13
biology/freebayes/files/patch-vcflib_Makefile
Normal file
13
biology/freebayes/files/patch-vcflib_Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
--- vcflib/Makefile.orig 2018-03-23 18:36:07 UTC
|
||||
+++ vcflib/Makefile
|
||||
@@ -136,8 +136,8 @@ all: $(OBJECTS) $(BINS)
|
||||
|
||||
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always)
|
||||
|
||||
-CXX = g++
|
||||
-CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -std=c++0x
|
||||
+CXX ?= g++
|
||||
+CXXFLAGS += -D_FILE_OFFSET_BITS=64 -std=c++0x
|
||||
#CXXFLAGS = -O2
|
||||
#CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual
|
||||
|
7
biology/freebayes/pkg-descr
Normal file
7
biology/freebayes/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
FreeBayes is a Bayesian genetic variant detector designed to find small
|
||||
polymorphisms, specifically SNPs (single-nucleotide polymorphisms), indels
|
||||
(insertions and deletions), MNPs (multi-nucleotide polymorphisms), and complex
|
||||
events (composite insertion and substitution events) smaller than the length of
|
||||
a short-read sequencing alignment.
|
||||
|
||||
WWW: https://github.com/ekg/freebayes
|
Loading…
Reference in New Issue
Block a user