From e73d1d766905b5f98f68d1799a88a3b86c1ff9f9 Mon Sep 17 00:00:00 2001 From: pjotrp Date: Tue, 16 Aug 2016 12:23:33 +0000 Subject: Updated and fixed plink-ng --- gn/packages/bioinformatics.scm | 41 +++++++------ gn/packages/genenetwork.scm | 6 +- plink-ng-Makefile-zlib-git.patch | 129 --------------------------------------- 3 files changed, 24 insertions(+), 152 deletions(-) delete mode 100644 plink-ng-Makefile-zlib-git.patch diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index c04c6c8..f62949d 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -830,7 +830,7 @@ confidence region for the location of a putative QTL.") (replace 'build (lambda _ (zero? (system* "make" "-f" "Makefile.std")) - )) + )) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append (assoc-ref outputs "out") @@ -861,45 +861,46 @@ subsequent visualization, annotation and storage of results.") (license (list license:gpl2 license:lgpl2.1+)))) (define-public plink-ng - (let ((commit "6ab6ecf81e904b7db76454422ea59baae437d961")) + (let ((commit "5d1db4313ba0cc976562da233db4aced78975d10")) (package (name "plink-ng") - (version (string-append "1.90b3-" commit )) + (version (string-append "1.90b3-" commit )) ; Aug 11, 2016 (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/chrchang/plink-ng.git") + (url "https://github.com/genenetwork/plink-ng.git") (commit commit))) - (file-name (string-append name "-" commit)) + (file-name (string-append name "-" commit)) (sha256 (base32 - "0djnfcr3lm6839lkglpq1p4w09zlgv68p618c2i5dng4jhwji94k")))) - ;;; (patches (list (search-patch "plink-ng-Makefile-zlib-git.patch")) + "1366li3ks9076bblvd1rpzkjq4j8f8f08lhga4c1ckrkil3xww4m")))) + ;; no longer (patches (list (search-patch "plink-ng-Makefile-zlib-git.patch"))))) + (inputs + `(("zlib" ,zlib) + ("openblas" ,openblas) + ;; ("atlas" ,atlas) ; openblas replaces atlas + ("lapack" ,lapack) ; lapack is disabled in GUIX openblas + ;; ("gfortran" ,gfortran) + ;; ("python" ,python-2) ;; for tests - currently disabled + )) + (native-inputs + `(("unzip" ,unzip))) (build-system gnu-build-system) (arguments - '(#:tests? #f ;no "check" target + '(#:tests? #f ;no "check" target. Some of the python-based tests fail #:phases (modify-phases %standard-phases (delete 'configure) (replace 'build (lambda _ - (zero? (system* "make" "-f" "Makefile.std")) - )) + (zero? (system* "make" "-f" "Makefile.guix")) + )) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) (install-file "plink2" bin) #t)))))) - (inputs - `(("zlib" ,zlib) - ("openblas" ,openblas) - ;; ("atlas" ,atlas) - ;; ("lapack" ,lapack) - ("gfortran" ,gfortran) - )) - (native-inputs - `(("unzip" ,unzip))) (home-page "https://www.cog-genomics.org/plink2") (synopsis "Whole genome association analysis toolset") (description @@ -922,7 +923,7 @@ subsequent visualization, annotation and storage of results.") (uri (git-reference (url "https://github.com/genenetwork/GEMMA.git") (commit commit))) - (file-name (string-append name "-" commit)) + (file-name (string-append name "-" commit)) (sha256 (base32 "1drffdgwbzgiw9sf55ghl3zjv58f8i9kfz0zys5mp6n06syp4ira")))) diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm index 81873d5..a7317c6 100644 --- a/gn/packages/genenetwork.scm +++ b/gn/packages/genenetwork.scm @@ -163,8 +163,8 @@ ("mysql" ,mysql) ("gemma" ,gemma-git) ("genenetwork2-files-small" ,genenetwork2-files-small) + ("plink-ng" ,plink-ng) ("pylmm-gn2" ,pylmm-gn2) - ;; ("plink2" ,plink-ng) disabled - FIXME ("nginx" ,nginx) ("python2-flask" ,python2-flask) ("python2-htmlgen-gn" ,python2-htmlgen-gn) @@ -200,14 +200,14 @@ (let* ( (datafiles (string-append (assoc-ref inputs "genenetwork2-files-small") "/share/genenetwork2" )) (pylmmcmd (string-append (assoc-ref inputs "pylmm-gn2") "/bin/pylmm_redis")) - ;; (plink2cmd (string-append (assoc-ref inputs "plink2") "/bin/plink2")) + (plink2cmd (string-append (assoc-ref inputs "plink-ng") "/bin/plink2")) (gemmacmd (string-append (assoc-ref inputs "gemma") "/bin/gemma")) ) (substitute* '("etc/default_settings.py") (("^GENENETWORK_FILES =.*") (string-append "GENENETWORK_FILES = \"" datafiles "\"\n" )) (("^PYLMM_COMMAND =.*") (string-append "PYLMM_COMMAND = \"" pylmmcmd "\"\n" )) - ;; (("^PLINK_COMMAND =.*") (string-append "PLINK_COMMAND = \"" plink2cmd "\"\n" )) + (("^PLINK_COMMAND =.*") (string-append "PLINK_COMMAND = \"" plink2cmd "\"\n" )) (("^GEMMA_COMMAND =.*") (string-append "GEMMA_COMMAND = \"" gemmacmd "\"\n" )) ) )))) diff --git a/plink-ng-Makefile-zlib-git.patch b/plink-ng-Makefile-zlib-git.patch deleted file mode 100644 index 79986b8..0000000 --- a/plink-ng-Makefile-zlib-git.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/Makefile.std b/Makefile.std -index e204486..ca65bd3 100644 ---- a/Makefile.std -+++ b/Makefile.std -@@ -1,64 +1,23 @@ - # General-purpose Makefile for PLINK 1.90 - # --# Compilation options: --# Do not link to LAPACK NO_LAPACK - --# Leave blank after "=" to disable; put "= 1" to enable --# (when enabled, "#define NOLAPACK" must be uncommented in plink_common.h) --NO_LAPACK = -+# CFLAGS=-Wall -O2 -+# BLASFLAGS=-lblas -llapack -latlas -+LINKFLAGS=-lm -lpthread -lopenblas -llapack -latlas -lstdc++ -+ZLIB=-lz - -+SRC = plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_perm.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c - --# should autodetect system --SYS = UNIX --ifdef SystemRoot -- SYS = WIN --else -- UNAME := $(shell uname) -- ifeq ($(UNAME), Darwin) -- SYS = MAC -- endif --endif -- --CFLAGS=-Wall -O2 --BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas --LINKFLAGS=-lm -lpthread -ldl --ZLIB=zlib-1.2.8/libz.so.1.2.8 -- --ifeq ($(SYS), MAC) -- GCC_GTEQ_43 := $(shell expr `g++ -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300) -- ifeq "$(GCC_GTEQ_43)" "1" -- CFLAGS=-Wall -O2 -flax-vector-conversions -- endif -- BLASFLAGS=-framework Accelerate -- LINKFLAGS=-ldl -- ZLIB=zlib-1.2.8/libz.1.2.8.dylib --endif -- --ifeq ($(SYS), WIN) --# Note that, unlike the Linux and Mac build processes, this STATICALLY links --# LAPACK, since we have not gotten around to trying dynamically-linked LAPACK --# on Windows. --# If you don't already have LAPACK built, you'll probably want to turn on --# NO_LAPACK. -- BLASFLAGS=-L. lapack/liblapack.a -L. lapack/librefblas.a -- LINKFLAGS=-lm -static-libgcc -- ZLIB=zlib-1.2.8/libz.a --endif -+OBJ = plink.o plink_assoc.o plink_calc.o plink_cluster.o plink_cnv.o plink_common.o plink_data.o plink_dosage.o plink_family.o plink_filter.o plink_glm.o plink_help.o plink_homozyg.o plink_lasso.o plink_ld.o plink_matrix.o plink_misc.o plink_perm.o plink_rserve.o plink_set.o plink_stats.o SFMT.o dcdflib.o pigz.o yarn.o Rconnection.o hfile.o bgzf.o - --ifdef NO_LAPACK -- BLASFLAGS= --endif - --SRC = plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_perm.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c -+# In the likely event that you are concurrently using PLINK 1.07, we suggest -+# either renaming that binary to "plink1" or this one to "plink2". - --# In the event that you are still concurrently using PLINK 1.07, we suggest --# renaming that binary to "plink107" and "plink1". (Previously, --# "plink1"/"plink2" was suggested here; that also works for now, but it may --# lead to minor problems when PLINK 2.0 is released.) -+# plink: $(SRC) -+# g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) - - plink: $(SRC) -- g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -- --plinkw: $(SRC) - g++ $(CFLAGS) $(SRC) -c -- gfortran -O2 $(OBJ) -o plink -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -+ gfortran $(OBJ) -o plink2 $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -+ # gfortran $^ -o plink2 -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB) -diff --git a/dose2plink.c b/dose2plink.c -index dc1f33a..ca2d31c 100644 ---- a/dose2plink.c -+++ b/dose2plink.c -@@ -96,7 +96,7 @@ - #endif - #endif - --#include "zlib-1.2.8/zlib.h" -+#include "zlib.h" - - #ifdef __APPLE__ - #include -diff --git a/pigz.c b/pigz.c -index 46b0525..3ce9a6b 100644 ---- a/pigz.c -+++ b/pigz.c -@@ -297,7 +297,7 @@ - #include - #include - #include --#include "zlib-1.2.8/zlib.h" -+#include "zlib.h" - - #include "pigz.h" - -@@ -513,7 +513,7 @@ int32_t flex_pzwrite_close_null(Pigz_state* ps_ptr, char* writep) { - # include - #endif - --#include "zlib-1.2.8/zlib.h" /* deflateInit2(), deflateReset(), deflate(), */ -+#include "zlib.h" /* deflateInit2(), deflateReset(), deflate(), */ - /* deflateEnd(), deflateSetDictionary(), crc32(), - inflateBackInit(), inflateBack(), inflateBackEnd(), - Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY, -diff --git a/plink_common.h b/plink_common.h -index 84eb929..e0b5cca 100644 ---- a/plink_common.h -+++ b/plink_common.h -@@ -177,7 +177,7 @@ - #define VEC_BITS (VEC_BYTES * 8) - #define VEC_BITS_M1 (VEC_BITS - 1) - --#include "zlib-1.2.8/zlib.h" -+#include "zlib.h" - #include "SFMT.h" - - // 64MB of non-workspace memory guaranteed for now. -- cgit v1.2.3