Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2019 03:36:49 +0000 (UTC)
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r502673 - in head/biology: . bolt-lmm bolt-lmm/files
Message-ID:  <201905260336.x4Q3anVp000647@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jwb
Date: Sun May 26 03:36:49 2019
New Revision: 502673
URL: https://svnweb.freebsd.org/changeset/ports/502673

Log:
  biology/bolt-lmm: Mixed model association testing and variance component analysis
  
  The BOLT-LMM software package currently consists of two main algorithms, the
  BOLT-LMM algorithm for mixed model association testing, and the BOLT-REML
  algorithm for variance components analysis (i.e., partitioning of
  SNP-heritability and estimation of genetic correlations).

Added:
  head/biology/bolt-lmm/
  head/biology/bolt-lmm/Makefile   (contents, props changed)
  head/biology/bolt-lmm/distinfo   (contents, props changed)
  head/biology/bolt-lmm/files/
  head/biology/bolt-lmm/files/patch-example_run__example.sh   (contents, props changed)
  head/biology/bolt-lmm/files/patch-example_run__example__reml2.sh   (contents, props changed)
  head/biology/bolt-lmm/files/patch-src_Makefile   (contents, props changed)
  head/biology/bolt-lmm/files/patch-src_StringUtils.cpp   (contents, props changed)
  head/biology/bolt-lmm/pkg-descr   (contents, props changed)
  head/biology/bolt-lmm/pkg-plist   (contents, props changed)
Modified:
  head/biology/Makefile

Modified: head/biology/Makefile
==============================================================================
--- head/biology/Makefile	Sun May 26 03:26:45 2019	(r502672)
+++ head/biology/Makefile	Sun May 26 03:36:49 2019	(r502673)
@@ -11,6 +11,7 @@
     SUBDIR += bcftools
     SUBDIR += bedtools
     SUBDIR += biococoa
+    SUBDIR += bolt-lmm
     SUBDIR += bowtie
     SUBDIR += bowtie2
     SUBDIR += bwa

Added: head/biology/bolt-lmm/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/Makefile	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,44 @@
+# $FreeBSD$
+
+PORTNAME=	bolt-lmm
+DISTVERSION=	2.3.2
+CATEGORIES=	biology
+MASTER_SITES=	https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/
+DISTNAME=	BOLT-LMM_v${PORTVERSION}
+
+MAINTAINER=	jwb@FreeBSD.org
+COMMENT=	Mixed model association testing and variance component analysis
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/license.txt
+
+LIB_DEPENDS=	libnlopt.so:math/nlopt \
+		libopenblas.so:math/openblas \
+		libboost_program_options.so:devel/boost-libs
+
+# gcc-c++11-lib needed to link with boost. Also requires compiler:openmp, but
+# both merely add a GCC requirement.
+USES=		compiler:gcc-c++11-lib gmake
+
+BUILD_WRKSRC=	${WRKDIR}/${DISTNAME}/src
+INSTALL_WRKSRC=	${WRKDIR}/${DISTNAME}/src
+CXXFLAGS_i386=	-DUSE_SSE -msse -msse2
+CXXFLAGS_amd64=	-DUSE_SSE
+
+PORTEXAMPLES=	*
+
+OPTIONS_DEFINE=	EXAMPLES
+
+pre-configure:
+	@${RM} ${WRKSRC}/example/*.orig ${WRKSRC}/bolt
+	@${REINPLACE_CMD} -e 's|tables/|${DATADIR}/tables/|g' \
+		${BUILD_WRKSRC}/BoltParams.cpp
+	@${REINPLACE_CMD} -e 's|../tables/|${DATADIR}/tables/|g' \
+		${WRKSRC}/example/run_example.sh
+
+do-install:
+	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/bolt ${STAGEDIR}${PREFIX}/bin
+	(cd ${WRKSRC}/example && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
+	(cd ${WRKSRC} && ${COPYTREE_SHARE} tables ${STAGEDIR}${DATADIR})
+
+.include <bsd.port.mk>

Added: head/biology/bolt-lmm/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/distinfo	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1558717810
+SHA256 (BOLT-LMM_v2.3.2.tar.gz) = ee505a04138f6c80bfefad4df4b81a2d07e72114dd8329d187c97543f5a0521f
+SIZE (BOLT-LMM_v2.3.2.tar.gz) = 335057533

Added: head/biology/bolt-lmm/files/patch-example_run__example.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/files/patch-example_run__example.sh	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,10 @@
+--- example/run_example.sh.orig	2017-11-11 16:45:05 UTC
++++ example/run_example.sh
+@@ -1,4 +1,6 @@
+-../bolt \
++#!/bin/sh -e
++
++bolt \
+     --bfile=EUR_subset \
+     --remove=EUR_subset.remove \
+     --exclude=EUR_subset.exclude \

Added: head/biology/bolt-lmm/files/patch-example_run__example__reml2.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/files/patch-example_run__example__reml2.sh	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,10 @@
+--- example/run_example_reml2.sh.orig	2018-03-10 19:39:24 UTC
++++ example/run_example_reml2.sh
+@@ -1,4 +1,6 @@
+-../bolt \
++#!/bin/sh -e
++
++bolt \
+     --bfile=EUR_subset \
+     --phenoFile=EUR_subset.pheno2.covars \
+     --exclude=EUR_subset.exclude2 \

Added: head/biology/bolt-lmm/files/patch-src_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/files/patch-src_Makefile	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,138 @@
+--- src/Makefile.orig	2018-03-13 02:44:52 UTC
++++ src/Makefile
+@@ -1,29 +1,28 @@
+ ### modify these paths to local Boost and NLopt install directories
+-BOOST_INSTALL_DIR = /home/pl88/boost_1_58_0/install
+-NLOPT_INSTALL_DIR = /n/groups/price/poru/HSPH_SVN/src/BOLT-LMM/nlopt-2.4.2
++BOOST_INSTALL_DIR ?= ${LOCALBASE}
++# Redundant on FreeBSD NLOPT_INSTALL_DIR = /n/groups/price/poru/HSPH_SVN/src/BOLT-LMM/nlopt-2.4.2
+ 
+ INTELROOT = /n/groups/price/poru/external_software/intel_mkl_2018
+ MKLROOT = ${INTELROOT}/mkl
+-ZLIB_STATIC_DIR = /n/groups/price/poru/external_software/zlib/zlib-1.2.11 # probably unnecessary on most systems
+-LIBSTDCXX_STATIC_DIR = /n/groups/price/poru/external_software/libstdc++/usr/lib/gcc/x86_64-redhat-linux/4.8.5/
+-GLIBC_STATIC_DIR = /home/pl88/glibc-static/usr/lib64
++ZLIB_STATIC_DIR ?= /usr/lib
++LIBSTDCXX_STATIC_DIR ?= /usr/lib
++GLIBC_STATIC_DIR ?= /usr/lib
+ 
+ ifeq ($(strip ${linking}),)
+ 	linking = dynamic
+ endif
+ 
+-# CC = g++
+-CC = icpc
++# CXX = g++
++CXX ?= icpc
+ 
+ ifeq (${debug},true)
+-	CFLAGS += -g
++	CXXFLAGS += -g
+ else
+-	CFLAGS += -O2
++	CXXFLAGS += -O2
+ endif
+ 
+-CFLAGS += -msse -msse2
+-CFLAGS += -DUSE_SSE -DMEASURE_DGEMM -DVERBOSE
+-CFLAGS += -Wall
++CXXFLAGS += -DMEASURE_DGEMM -DVERBOSE
++CXXFLAGS += -Wall
+ 
+ 
+ # add Boost include and lib paths
+@@ -38,9 +37,9 @@ endif
+ # add NLopt include and lib paths
+ ifneq ($(strip ${NLOPT_INSTALL_DIR}),)
+ 	CPATHS += -I${NLOPT_INSTALL_DIR}/api
+-	LPATHS += -L${NLOPT_INSTALL_DIR}/.libs
++	LPATHS += -L${NLOPT_INSTALL_DIR}/libs
+ 	ifeq (${linking},dynamic)
+-		LPATHS += -Wl,-rpath,${NLOPT_INSTALL_DIR}/.libs
++		LPATHS += -Wl,-rpath,${NLOPT_INSTALL_DIR}/libs
+ 	endif
+ endif
+ 
+@@ -52,7 +51,7 @@ ifneq ($(strip ${ZLIB_STATIC_DIR}),)
+ endif
+ 
+ # add MKL paths (if not compiling with g++, i.e., compiling with icpc)
+-ifneq (${CC},g++)
++ifneq (${CXX},${CXX})
+ 	CPATHS += -I${MKLROOT}/include
+ 	ifeq (${linking},dynamic)
+ 		LPATHS += -L${MKLROOT}/lib/intel64 -Wl,-rpath,${MKLROOT}/lib/intel64 # for libmkl*
+@@ -61,28 +60,28 @@ ifneq (${CC},g++)
+ endif
+ 
+ # add flags for static linking; build LAPACK/MKL component of link line
+-ifeq (${CC},g++)
+-	CFLAGS += -fopenmp
+-	LFLAGS += -fopenmp
+-	LLAPACK = -llapack -lgfortran
++ifeq (${CXX},${CXX})
++	CXXFLAGS += -fopenmp
++	LDFLAGS += -fopenmp
++	LLAPACK = -lopenblas -lgfortran
+ 	ifeq (${linking},static)
+-		LFLAGS += -static
++		LDFLAGS += -static
+ 		LPATHS += -L${GLIBC_STATIC_DIR} -L${ZLIB_STATIC_DIR}
+ 	else ifeq (${linking},static-except-glibc)
+-		LFLAGS += -static-libgcc -static-libstdc++
++		LDFLAGS += -static-libgcc -static-libstdc++
+ 		LPATHS += -L${ZLIB_STATIC_DIR}
+ 	endif
+ else
+-	CFLAGS += -DUSE_MKL #-DUSE_MKL_MALLOC
+-	CFLAGS += -qopenmp
+-	LFLAGS += -qopenmp
+-	CFLAGS += -Wunused-variable -Wpointer-arith -Wuninitialized -Wreturn-type -Wcheck -Wshadow
++	CXXFLAGS += -DUSE_MKL #-DUSE_MKL_MALLOC
++	CXXFLAGS += -qopenmp
++	LDFLAGS += -qopenmp
++	CXXFLAGS += -Wunused-variable -Wpointer-arith -Wuninitialized -Wreturn-type -Wcheck -Wshadow
+ 	ifeq (${linking},static)
+-		LFLAGS += -static
++		LDFLAGS += -static
+ 		LPATHS += -L${GLIBC_STATIC_DIR} -L${ZLIB_STATIC_DIR}
+ 		LLAPACK = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group
+ 	else ifeq (${linking},static-except-glibc)
+-		LFLAGS += -static-intel -static-libstdc++ -static-libgcc
++		LDFLAGS += -static-intel -static-libstdc++ -static-libgcc
+ 		LPATHS += -L${ZLIB_STATIC_DIR}
+ 		LLAPACK = -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group
+ 	else
+@@ -95,7 +94,8 @@ else
+ endif
+ 
+ # build link line (minus flags)
+-LLIBS = -lboost_program_options -lboost_iostreams -lz -lnlopt
++LLIBS = -lnlopt -lboost_program_options -lboost_iostreams -lz
++# LLIBS = /usr/local/lib/libboost_program_options.a -lnlopt -lboost_iostreams -lz
+ ifeq (${linking},static-except-glibc)
+ 	L = -L${LIBSTDCXX_STATIC_DIR} ${LPATHS} -Wl,--wrap=memcpy -Wl,-Bstatic ${LLIBS} ${LLAPACK} -Wl,-Bdynamic -lpthread -lm
+ else
+@@ -105,16 +105,18 @@ endif
+ 
+ 
+ T = bolt
+-O = Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o memcpy.o
++O = Bolt.o BoltParams.o BoltParEstCV.o BoltReml.o CovariateBasis.o DataMatrix.o FileUtils.o Jackknife.o LDscoreCalibration.o MapInterpolater.o MatrixUtils.o MemoryUtils.o NonlinearOptMulti.o NumericUtils.o PhenoBuilder.o RestrictSnpSet.o SnpData.o SnpInfo.o SpectrumTools.o StatsUtils.o StringUtils.o Timer.o
+ OMAIN = BoltMain.o $O
+ 
+-.PHONY: clean
++.PHONY: clean all
+ 
++all: $T
++
+ %.o: %.cpp
+-	${CC} ${CFLAGS} ${CPATHS} -o $@ -c $<
++	${CXX} ${CXXFLAGS} ${CPATHS} -o $@ -c $<
+ 
+ $T: ${OMAIN}
+-	${CC} ${LFLAGS} -o $T ${OMAIN} $L
++	${CXX} ${LDFLAGS} -o $T ${OMAIN} $L
+ 
+ clean:
+ 	rm -f *.o

Added: head/biology/bolt-lmm/files/patch-src_StringUtils.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/files/patch-src_StringUtils.cpp	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,10 @@
+--- src/StringUtils.cpp.orig	2018-03-13 02:38:23 UTC
++++ src/StringUtils.cpp
+@@ -22,6 +22,7 @@
+ #include <cstdio>
+ #include <iostream>
+ #include <sstream>
++#include <sys/types.h>	// uint
+ 
+ #include "StringUtils.hpp"
+ 

Added: head/biology/bolt-lmm/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/pkg-descr	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,6 @@
+The BOLT-LMM software package currently consists of two main algorithms, the
+BOLT-LMM algorithm for mixed model association testing, and the BOLT-REML
+algorithm for variance components analysis (i.e., partitioning of
+SNP-heritability and estimation of genetic correlations).
+
+WWW: https://data.broadinstitute.org/alkesgroup/BOLT-LMM/

Added: head/biology/bolt-lmm/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bolt-lmm/pkg-plist	Sun May 26 03:36:49 2019	(r502673)
@@ -0,0 +1,6 @@
+bin/bolt
+%%DATADIR%%/tables/LDSCORE.1000G_EUR.tab.gz
+%%DATADIR%%/tables/genetic_map_hg17_withX.txt.gz
+%%DATADIR%%/tables/genetic_map_hg18_withX.txt.gz
+%%DATADIR%%/tables/genetic_map_hg19_withX.txt.gz
+%%DATADIR%%/tables/genetic_map_hg38_withX.txt.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905260336.x4Q3anVp000647>