aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpjotrp2016-02-14 13:42:57 +0000
committerpjotrp2016-02-14 13:42:57 +0000
commit949a3b406233e43f7889d2486b4446c2414ed060 (patch)
treebdb481f847eb91ba65468974700a02518b51feb4
parent710fc435fadb52bb49c65e8b1337d100c5c32c0a (diff)
downloadguix-bioinformatics-949a3b406233e43f7889d2486b4446c2414ed060.tar.gz
Adding plink
-rw-r--r--gn/packages/bioinformatics.scm56
-rw-r--r--plink-ng-Makefile-zlib.patch13
2 files changed, 69 insertions, 0 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index 3fbab19..f30266d 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -157,6 +157,62 @@ precision. It also performs bootstrap resampling to estimate the
confidence region for the location of a putative QTL.")
(license license:gpl2)))
+(define-public plink2
+ (package
+ (name "plink2")
+ (version "1.90b3")
+ (source
+ (origin
+ (method url-fetch)
+ ;; https://github.com/chrchang/plink-ng/archive/v1.90b3.tar.gz
+ (uri (string-append
+ "https://github.com/chrchang/plink-ng/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32 "03fzib1al5qkr9vxv63wxmv6y2pfb1rmir0h8jpi72r87hczqjig"))
+ (patches (list (search-patch "plink-ng-Makefile-zlib.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #t ;no "check" target
+ #:make-flags (list (string-append "LIB_LAPACK="
+ (assoc-ref %build-inputs "lapack")
+ "/lib/liblapack.so")
+ "WITH_LAPACK=1"
+ "FORCE_DYNAMIC=1"
+ ;; disable phoning home
+ "WITH_WEBCHECK=")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (system* "make" "-f" "Makefile.std")
+ ))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out")
+ "/bin/")))
+ (install-file "plink" bin)
+ #t))))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("lapack" ,lapack)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://www.cog-genomics.org/plink2")
+ (synopsis "Whole genome association analysis toolset")
+ (description
+ "PLINK is a whole genome association analysis toolset, designed to
+perform a range of basic, large-scale analyses in a computationally efficient
+manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
+so there is no support for steps prior to this (e.g. study design and
+planning, generating genotype or CNV calls from raw data). Through
+integration with gPLINK and Haploview, there is some support for the
+subsequent visualization, annotation and storage of results.")
+ ;; Code is released under GPLv2, except for fisher.h, which is under
+ ;; LGPLv2.1+
+ (license (list license:gpl2 license:lgpl2.1+))))
+
(define-public gemma
(let ((commit "2de4bfab3"))
(package
diff --git a/plink-ng-Makefile-zlib.patch b/plink-ng-Makefile-zlib.patch
new file mode 100644
index 0000000..6c1f62e
--- /dev/null
+++ b/plink-ng-Makefile-zlib.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.std b/Makefile.std
+index 95b0940..630188a 100644
+--- a/Makefile.std
++++ b/Makefile.std
+@@ -22,7 +22,7 @@ endif
+ CFLAGS=-Wall -O2
+ BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
+ LINKFLAGS=-lm -lpthread
+-ZLIB=zlib-1.2.8/libz.so.1.2.8
++ZLIB=-lz
+
+ 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)