bolt-llm: Test association between phenotype and genotypes

This commit is contained in:
Jason Bacon 2017-09-20 06:02:59 -05:00
parent d9992a9107
commit d1fcda1329
7 changed files with 198 additions and 0 deletions

4
bolt-llm/DESCR Normal file
View File

@ -0,0 +1,4 @@
The BOLT-LMM algorithm computes statistics for testing association between
phenotype and genotypes using a linear mixed model (LMM) [1]. By default,
BOLT-LMM assumes a Bayesian mixture-of-normals prior for the random effect
attributed to SNPs other than the one being tested.

38
bolt-llm/Makefile Normal file
View File

@ -0,0 +1,38 @@
# $NetBSD$
#
###########################################################
# Generated by fbsd2pkg #
# Wed Sep 20 05:34:25 CDT 2017 #
###########################################################
DISTNAME= BOLT-LMM_v${PORTVERSION}
PKGNAME= bolt-llm-${PORTVERSION}
CATEGORIES= biology
MASTER_SITES= https://data.broadinstitute.org/alkesgroup/BOLT-LMM/downloads/
MAINTAINER= bacon4000@gmail.com
HOMEPAGE= https://data.broadinstitute.org/alkesgroup/BOLT-LMM/
COMMENT= Statistics for testing association between phenotype and genotypes
# Check this
LICENSE= gnu-gpl-v3
USE_LANGUAGES= c c++ fortran
USE_TOOLS+= gmake
WRKSRC= ${WRKDIR}/${DISTNAME}/src
CXXFLAGS= -fopenmp
BUILD_TARGET= bolt
PORTVERSION= 2.3
INSTALLATION_DIRS= bin
# FIXME: Use openblas when available for better performance
.include "../../math/nlopt/buildlink3.mk"
.include "../../math/blas/buildlink3.mk"
.include "../../math/lapack/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

2
bolt-llm/PLIST Normal file
View File

@ -0,0 +1,2 @@
@comment $NetBSD$
bin/bolt

9
bolt-llm/distinfo Normal file
View File

@ -0,0 +1,9 @@
$NetBSD$
SHA1 (BOLT-LMM_v2.3.tar.gz) = 4f2caf427cbcbe58175e6e5c711c3d8b0c66a9d6
RMD160 (BOLT-LMM_v2.3.tar.gz) = d0d207f2993d00607f256edb0e9cda57aa0bd800
SHA512 (BOLT-LMM_v2.3.tar.gz) = a396bb6699fbb87327901a8db46faa45705405160f318796f887b8cd6edd495f10fa460201a4eead57b2bc34adb45f44d26dd59ae12ed2240d4d46b6b6e959e6
Size (BOLT-LMM_v2.3.tar.gz) = 336986328 bytes
SHA1 (patch-FileUtils.cpp) = 258138822f610ab38f9cf3cf0ad03ca49b67ad1c
SHA1 (patch-Makefile) = f960889320bdcd8e158cd509ae87b65672169ed5
SHA1 (patch-StringUtils.cpp) = f0a5c3375a95391235d85fc9431524236e39910f

View File

@ -0,0 +1,14 @@
$NetBSD$
# Unused variable
--- FileUtils.cpp.orig 2017-09-20 10:29:18 UTC
+++ FileUtils.cpp
@@ -275,7 +275,7 @@ namespace FileUtils {
uint Layout = (flags>>2)&0xf; cout << "Layout: " << Layout << endl;
assert(Layout==1 || Layout==2); // REQUIRE Layout==1 or Layout==2
- uint SampleIdentifiers = flags>>31; //cout << "SampleIdentifiers: " << SampleIdentifiers << endl;
+ // uint SampleIdentifiers = flags>>31; cout << "SampleIdentifiers: " << SampleIdentifiers << endl;
fseek(fin, offset+4, SEEK_SET);
// check first SNP

View File

@ -0,0 +1,118 @@
$NetBSD$
# Respect env
--- Makefile.orig 2017-08-03 00:14:08.000000000 +0000
+++ Makefile
@@ -1,28 +1,33 @@
### modify these paths to local Boost and NLopt install directories
-BOOST_INSTALL_DIR = /home/pl88/boost_1_58_0/install
-NLOPT_INSTALL_DIR = /groups/price/poru/HSPH_SVN/src/BOLT-LMM/nlopt-2.4.2
+BOOST_INSTALL_DIR ?= ${LOCALBASE}
+# NLOPT_INSTALL_DIR ?= ${LOCALBASE}
+
+MKDIR ?= mkdir
+DESTDIR ?= .
+PREFIX ?= /usr/local
+INSTALL ?= install
MKLROOT = /groups/price/poru/external_software/intel/mkl
INTELROOT = /groups/price/poru/external_software/intel
-ZLIB_STATIC_DIR = /opt/zlib-1.2.8/lib # probably unnecessary on most systems
-GLIBC_STATIC_DIR = /home/pl88/glibc-static/usr/lib64
+ZLIB_STATIC_DIR ?= /usr/lib
+GLIBC_STATIC_DIR ?= /home/pl88/glibc-static/usr/lib64
ifeq ($(strip ${linking}),)
linking = dynamic
endif
-# CC = g++
-CC = /groups/price/poru/external_software/intel/bin/icpc
+# CXX = g++
+CXX ?= /groups/price/poru/external_software/intel/bin/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 += -msse -msse2
+CXXFLAGS += -DUSE_SSE -DMEASURE_DGEMM -DVERBOSE
+CXXFLAGS += -Wall
# add Boost include and lib paths
@@ -51,7 +56,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*
@@ -60,28 +65,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 = -llapack -lblas -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
@@ -110,11 +115,15 @@ OMAIN = BoltMain.o $O
.PHONY: clean
%.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
rm -f $T
+
+install:
+ ${MKDIR} ${DESTDIR}${PREFIX}/bin
+ ${INSTALL} -c -s $T ${DESTDIR}${PREFIX}/bin

View File

@ -0,0 +1,13 @@
$NetBSD$
# Missing header
--- StringUtils.cpp.orig 2017-08-02 23:43:24 UTC
+++ StringUtils.cpp
@@ -22,6 +22,7 @@
#include <cstdio>
#include <iostream>
#include <sstream>
+#include <sys/types.h> // uint
#include "StringUtils.hpp"