* [PATCH] Add plink.
@ 2015-06-25 10:05 Ricardo Wurmus
2015-06-25 10:11 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-06-25 10:05 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 80 bytes --]
Note: this is not PuTTY's plink, but a bioinformatics tool with the same
name.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-plink.patch --]
[-- Type: text/x-patch, Size: 3098 bytes --]
From d60d727bd9c2955c70ebf8cd3ee44becab64624e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 25 Jun 2015 12:04:05 +0200
Subject: [PATCH] gnu: Add plink.
* gnu/packages/bioinformatics.scm (plink): New variable.
---
gnu/packages/bioinformatics.scm | 53 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7e94bf3..a4bb303 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2033,6 +2033,59 @@ Databases are stored in a portable image within the file system, and can be
accessed/downloaded on demand across HTTP.")
(license license:public-domain)))
+(define-public plink
+ (package
+ (name "plink")
+ (version "1.07")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-"
+ version "-src.zip"))
+ (sha256
+ (base32 "0as8gxm4pjyc8dxmm1sl873rrd7wn5qs0l29nqfnl31x8i467xaa"))
+ (patches (list (search-patch "plink-1.07-unclobber-i.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;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
+ ;; no "configure" script
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out")
+ "/bin/")))
+ (mkdir-p bin)
+ (copy-file "plink" (string-append bin "plink"))
+ #t))))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("lapack" ,lapack)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "http://pngu.mgh.harvard.edu/~purcell/plink/")
+ (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 preseq
(package
(name "preseq")
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add plink.
2015-06-25 10:05 [PATCH] Add plink Ricardo Wurmus
@ 2015-06-25 10:11 ` Ricardo Wurmus
2015-06-27 10:16 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-06-25 10:11 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
Forgot to add the patch this recipe is referring to. New patch
attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-plink.patch --]
[-- Type: text/x-patch, Size: 5628 bytes --]
From 85811f556f0db843f2c699465d317c10d4e85807 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 25 Jun 2015 12:04:05 +0200
Subject: [PATCH] gnu: Add plink.
* gnu/packages/bioinformatics.scm (plink): New variable.
* gnu/packages/patches/plink-1.07-unclobber-i.patch: New file.
---
gnu/packages/bioinformatics.scm | 53 +++++++++++++++++
gnu/packages/patches/plink-1.07-unclobber-i.patch | 69 +++++++++++++++++++++++
2 files changed, 122 insertions(+)
create mode 100644 gnu/packages/patches/plink-1.07-unclobber-i.patch
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 7e94bf3..a4bb303 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2033,6 +2033,59 @@ Databases are stored in a portable image within the file system, and can be
accessed/downloaded on demand across HTTP.")
(license license:public-domain)))
+(define-public plink
+ (package
+ (name "plink")
+ (version "1.07")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-"
+ version "-src.zip"))
+ (sha256
+ (base32 "0as8gxm4pjyc8dxmm1sl873rrd7wn5qs0l29nqfnl31x8i467xaa"))
+ (patches (list (search-patch "plink-1.07-unclobber-i.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;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
+ ;; no "configure" script
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out")
+ "/bin/")))
+ (mkdir-p bin)
+ (copy-file "plink" (string-append bin "plink"))
+ #t))))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("lapack" ,lapack)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "http://pngu.mgh.harvard.edu/~purcell/plink/")
+ (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 preseq
(package
(name "preseq")
diff --git a/gnu/packages/patches/plink-1.07-unclobber-i.patch b/gnu/packages/patches/plink-1.07-unclobber-i.patch
new file mode 100644
index 0000000..60cd97b
--- /dev/null
+++ b/gnu/packages/patches/plink-1.07-unclobber-i.patch
@@ -0,0 +1,69 @@
+GCC rightfully complains about redefined variables, as iterator declarations
+appear inside loops with a loop variable of the same name.
+
+This patch has been sent upstream.
+
+--- a/sets.cpp 2015-06-25 11:22:08.252821681 +0200
++++ b/sets.cpp 2015-06-25 11:22:23.239187985 +0200
+@@ -768,11 +768,11 @@
+ //////////////////////////////////////////////
+ // Reset original missing status
+
+- vector<Individual*>::iterator i = PP->sample.begin();
+- while ( i != PP->sample.end() )
++ vector<Individual*>::iterator it = PP->sample.begin();
++ while ( it != PP->sample.end() )
+ {
+- (*i)->missing = (*i)->flag;
+- ++i;
++ (*it)->missing = (*it)->flag;
++ ++it;
+ }
+
+ ////////////////////////////////////////////////
+
+--- a/elf.cpp 2009-10-10 18:00:21.000000000 +0200
++++ b/elf.cpp 2015-06-25 11:34:06.136835756 +0200
+@@ -1175,10 +1175,10 @@
+ << setw(8) << gcnt << " "
+ << setw(8) << (double)cnt / (double)gcnt << "\n";
+
+- map<int,int>::iterator i = chr_cnt.begin();
+- while ( i != chr_cnt.end() )
++ map<int,int>::iterator it = chr_cnt.begin();
++ while ( it != chr_cnt.end() )
+ {
+- int c = i->first;
++ int c = it->first;
+ int x = chr_cnt.find( c )->second;
+ int y = chr_gcnt.find( c )->second;
+
+@@ -1189,7 +1189,7 @@
+ << setw(8) << y << " "
+ << setw(8) << (double)x / (double)y << "\n";
+
+- ++i;
++ ++it;
+ }
+
+ }
+
+--- plink-1.07-src/idhelp.cpp 2009-10-10 18:00:22.000000000 +0200
++++ plink-1.07-src/idhelp.cpp.patched 2015-06-25 11:37:39.387204086 +0200
+@@ -772,12 +772,12 @@
+ for (int j = 0 ; j < jointField.size(); j++ )
+ {
+ set<IDField*> & jf = jointField[j];
+- set<IDField*>::iterator j = jf.begin();
++ set<IDField*>::iterator jit = jf.begin();
+ PP->printLOG(" { ");
+- while ( j != jf.end() )
++ while ( jit != jf.end() )
+ {
+- PP->printLOG( (*j)->name + " " );
+- ++j;
++ PP->printLOG( (*jit)->name + " " );
++ ++jit;
+ }
+ PP->printLOG(" }");
+ }
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add plink.
2015-06-25 10:11 ` Ricardo Wurmus
@ 2015-06-27 10:16 ` Ludovic Courtès
0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-27 10:16 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From 85811f556f0db843f2c699465d317c10d4e85807 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 25 Jun 2015 12:04:05 +0200
> Subject: [PATCH] gnu: Add plink.
>
> * gnu/packages/bioinformatics.scm (plink): New variable.
> * gnu/packages/patches/plink-1.07-unclobber-i.patch: New file.
LGTM!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-27 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 10:05 [PATCH] Add plink Ricardo Wurmus
2015-06-25 10:11 ` Ricardo Wurmus
2015-06-27 10:16 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.