pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bolt-llm: Test association between phenotype and genotypes
Module Name: pkgsrc-wip
Committed By: Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By: outpaddling
Date: Wed Sep 20 06:02:59 2017 -0500
Changeset: d1fcda1329d8cf8766de0626ce1b0881e6ca073e
Added Files:
bolt-llm/DESCR
bolt-llm/Makefile
bolt-llm/PLIST
bolt-llm/distinfo
bolt-llm/patches/patch-FileUtils.cpp
bolt-llm/patches/patch-Makefile
bolt-llm/patches/patch-StringUtils.cpp
Log Message:
bolt-llm: Test association between phenotype and genotypes
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d1fcda1329d8cf8766de0626ce1b0881e6ca073e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
bolt-llm/DESCR | 4 ++
bolt-llm/Makefile | 38 +++++++++++
bolt-llm/PLIST | 2 +
bolt-llm/distinfo | 9 +++
bolt-llm/patches/patch-FileUtils.cpp | 14 ++++
bolt-llm/patches/patch-Makefile | 118 +++++++++++++++++++++++++++++++++
bolt-llm/patches/patch-StringUtils.cpp | 13 ++++
7 files changed, 198 insertions(+)
diffs:
diff --git a/bolt-llm/DESCR b/bolt-llm/DESCR
new file mode 100644
index 0000000000..2d46a0524c
--- /dev/null
+++ b/bolt-llm/DESCR
@@ -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.
diff --git a/bolt-llm/Makefile b/bolt-llm/Makefile
new file mode 100644
index 0000000000..695474f1f3
--- /dev/null
+++ b/bolt-llm/Makefile
@@ -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@localhost
+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"
diff --git a/bolt-llm/PLIST b/bolt-llm/PLIST
new file mode 100644
index 0000000000..773027c62d
--- /dev/null
+++ b/bolt-llm/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/bolt
diff --git a/bolt-llm/distinfo b/bolt-llm/distinfo
new file mode 100644
index 0000000000..07becca762
--- /dev/null
+++ b/bolt-llm/distinfo
@@ -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
diff --git a/bolt-llm/patches/patch-FileUtils.cpp b/bolt-llm/patches/patch-FileUtils.cpp
new file mode 100644
index 0000000000..7806a59216
--- /dev/null
+++ b/bolt-llm/patches/patch-FileUtils.cpp
@@ -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
diff --git a/bolt-llm/patches/patch-Makefile b/bolt-llm/patches/patch-Makefile
new file mode 100644
index 0000000000..01182cc1f5
--- /dev/null
+++ b/bolt-llm/patches/patch-Makefile
@@ -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
diff --git a/bolt-llm/patches/patch-StringUtils.cpp b/bolt-llm/patches/patch-StringUtils.cpp
new file mode 100644
index 0000000000..9aa25f0c38
--- /dev/null
+++ b/bolt-llm/patches/patch-StringUtils.cpp
@@ -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"
+
Home |
Main Index |
Thread Index |
Old Index