unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add idr.
@ 2015-06-16  9:37 Ricardo Wurmus
  2015-06-16 15:36 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2015-06-16  9:37 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-idr.patch --]
[-- Type: text/x-patch, Size: 2383 bytes --]

From 815a5e24f43f61c4beb243d98beb0659bbd74b3a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 16 Jun 2015 11:33:26 +0200
Subject: [PATCH] gnu: Add idr.

* gnu/packages/bioinformatics.scm (idr): New variable.
---
 gnu/packages/bioinformatics.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index eb15d40..ac4c50d 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1061,6 +1061,46 @@ data.  It also provides the bgzip, htsfile, and tabix utilities.")
     ;; the rest is released under the Expat license
     (license (list license:expat license:bsd-3))))
 
+(define-public idr
+  (package
+    (name "idr")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/nboley/idr/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'wrap-program
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref %outputs "out"))
+                  (path (getenv "PYTHONPATH")))
+              (wrap-program (string-append out "/bin/idr")
+                `("PYTHONPATH" ":" prefix (,path))))
+            #t)))))
+    (inputs
+     `(("python-scipy" ,python-scipy)
+       ("python-numpy" ,python-numpy)
+       ("python-matplotlib" ,python-matplotlib)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/nboley/idr")
+    (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
+    (description
+     "The IDR (Irreproducible Discovery Rate) framework is a unified approach
+to measure the reproducibility of findings identified from replicate
+experiments and provide highly stable thresholds based on reproducibility.")
+    (license license:gpl3+)))
+
 (define-public macs
   (package
     (name "macs")
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add idr.
  2015-06-16  9:37 [PATCH] Add idr Ricardo Wurmus
@ 2015-06-16 15:36 ` Ludovic Courtès
  2015-06-17 10:51   ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-06-16 15:36 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> From 815a5e24f43f61c4beb243d98beb0659bbd74b3a Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 16 Jun 2015 11:33:26 +0200
> Subject: [PATCH] gnu: Add idr.
>
> * gnu/packages/bioinformatics.scm (idr): New variable.

[...]

> +          'install 'wrap-program
> +          (lambda* (#:key outputs #:allow-other-keys)
> +            (let ((out (assoc-ref %outputs "out"))
> +                  (path (getenv "PYTHONPATH")))
> +              (wrap-program (string-append out "/bin/idr")
> +                `("PYTHONPATH" ":" prefix (,path))))

Taking $PYTHONPATH as is has the effect of keeping a reference to Cython
and to setuptools, which may not be what you want, given that they are
listed as ‘native-inputs’.

Should it instead explicitly list SciPy, NumPy, and Matplotlib?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add idr.
  2015-06-16 15:36 ` Ludovic Courtès
@ 2015-06-17 10:51   ` Ricardo Wurmus
  2015-06-21 21:13     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2015-06-17 10:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

>> +          'install 'wrap-program
>> +          (lambda* (#:key outputs #:allow-other-keys)
>> +            (let ((out (assoc-ref %outputs "out"))
>> +                  (path (getenv "PYTHONPATH")))
>> +              (wrap-program (string-append out "/bin/idr")
>> +                `("PYTHONPATH" ":" prefix (,path))))
>
> Taking $PYTHONPATH as is has the effect of keeping a reference to Cython
> and to setuptools, which may not be what you want, given that they are
> listed as ‘native-inputs’.
>
> Should it instead explicitly list SciPy, NumPy, and Matplotlib?

You are right.  Is the attached patch better?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-idr.patch --]
[-- Type: text/x-patch, Size: 2989 bytes --]

From 37db5b51fe4a09496e149d59b64aa0b69ae42fd1 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 16 Jun 2015 11:33:26 +0200
Subject: [PATCH] gnu: Add idr.

* gnu/packages/bioinformatics.scm (idr): New variable.
---
 gnu/packages/bioinformatics.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index eb15d40..f243904 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1061,6 +1061,56 @@ data.  It also provides the bgzip, htsfile, and tabix utilities.")
     ;; the rest is released under the Expat license
     (license (list license:expat license:bsd-3))))
 
+(define-public idr
+  (package
+    (name "idr")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/nboley/idr/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'wrap-program
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (python-version (string-take (string-take-right
+                                                 (assoc-ref inputs "python") 5) 3))
+                   (path (string-join
+                          (map (lambda (name)
+                                 (string-append (assoc-ref inputs name)
+                                                "/lib/python" python-version
+                                                "/site-packages"))
+                               '("python-scipy"
+                                 "python-numpy"
+                                 "python-matplotlib"))
+                          ":")))
+              (wrap-program (string-append out "/bin/idr")
+                `("PYTHONPATH" ":" prefix (,path))))
+            #t)))))
+    (inputs
+     `(("python-scipy" ,python-scipy)
+       ("python-numpy" ,python-numpy)
+       ("python-matplotlib" ,python-matplotlib)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/nboley/idr")
+    (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
+    (description
+     "The IDR (Irreproducible Discovery Rate) framework is a unified approach
+to measure the reproducibility of findings identified from replicate
+experiments and provide highly stable thresholds based on reproducibility.")
+    (license license:gpl3+)))
+
 (define-public macs
   (package
     (name "macs")
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add idr.
  2015-06-17 10:51   ` Ricardo Wurmus
@ 2015-06-21 21:13     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-06-21 21:13 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> You are right.  Is the attached patch better?
>
> From 37db5b51fe4a09496e149d59b64aa0b69ae42fd1 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 16 Jun 2015 11:33:26 +0200
> Subject: [PATCH] gnu: Add idr.
>
> * gnu/packages/bioinformatics.scm (idr): New variable.

Yes, please push!

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-21 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16  9:37 [PATCH] Add idr Ricardo Wurmus
2015-06-16 15:36 ` Ludovic Courtès
2015-06-17 10:51   ` Ricardo Wurmus
2015-06-21 21:13     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).