unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add Couger.
@ 2015-06-03 11:56 Ricardo Wurmus
  2015-06-06 17:44 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-06-03 11:56 UTC (permalink / raw)
  To: guix-devel

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

From d4f171912387304e61f2536a2eb167c7321e7663 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 2 Jun 2015 15:47:22 +0200
Subject: [PATCH 1/2] gnu: Add randomjungle.

* gnu/packages/machine-learning.scm (randomjungle): New variable.
---
 gnu/packages/machine-learning.scm | 50 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 3b4af19..37e1c94 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -23,7 +23,12 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages maths)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages xml))
 
 (define-public libsvm
   (package
@@ -95,3 +100,46 @@ classification.")
             #t)))))
     (inputs
      `(("python" ,python)))))
+
+(define-public randomjungle
+  (package
+    (name "randomjungle")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://www.imbs-luebeck.de/imbs/sites/default/files/u59/"
+             "randomjungle-" version ".tar_.gz"))
+       (sha256
+        (base32
+         "12c8rf30cla71swx2mf4ww9mfd8jbdw5lnxd7dxhyw1ygrvg6y4w"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-boost="
+                            (assoc-ref %build-inputs "boost")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'set-CXXFLAGS
+          (lambda _
+            (setenv "CXXFLAGS" "-fpermissive ")
+            #t)))))
+    (inputs
+     `(("boost" ,boost)
+       ("gsl" ,gsl)
+       ("libxml2" ,libxml2)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("gfortran" ,gfortran-4.8)))
+    (home-page "http://www.imbs-luebeck.de/imbs/de/node/227/")
+    (synopsis "Implementation of the Random Forests machine learning method")
+    (description
+     "Random Jungle is an implementation of Random Forests.  It is supposed to
+analyse high dimensional data.  In genetics, it can be used for analysing big
+Genome Wide Association (GWA) data.  Random Forests is a powerful machine
+learning method.  Most interesting features are variable selection, missing
+value imputation, classifier creation, generalization error estimation and
+sample proximities between pairs of cases.")
+    (license license:gpl3+)))
-- 
2.1.0


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

From c9246d7cfc56a0e4a9039a4b5e2dd9a7216ebeef Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 3 Jun 2015 12:56:16 +0200
Subject: [PATCH 2/2] gnu: Add Couger.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index afcfecf..fd1c1dd 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -34,6 +34,7 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
@@ -438,6 +439,76 @@ multiple sequence alignments.")
      "CLIPper is a tool to define peaks in CLIP-seq datasets.")
     (license license:gpl2)))
 
+(define-public couger
+  (package
+    (name "couger")
+    (version "1.8.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://couger.oit.duke.edu/static/assets/COUGER"
+                    version ".zip"))
+              (sha256
+               (base32
+                "1bs151a54wnjl1bwnvlf31p17vs73vgiidnka3al02rmp1vrli8g"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (copy-recursively "src" (string-append out "/src"))
+              (mkdir (string-append out "/bin"))
+              ;; Add "src" directory to module lookup path.
+              (substitute* "couger"
+                (("from argparse")
+                 (string-append "import sys\nsys.path.append(\""
+                                out "\")\nfrom argparse")))
+              (copy-file "couger" (string-append out "/bin/couger")))
+            #t))
+         (add-after
+          'install 'wrap-program
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Make sure 'couger' runs with the correct PYTHONPATH.
+            (let* ((out (assoc-ref outputs "out"))
+                   (path (getenv "PYTHONPATH")))
+              (wrap-program (string-append out "/bin/couger")
+                `("PYTHONPATH" ":" prefix (,path))))
+            #t)))))
+    (inputs
+     `(("python" ,python-2)
+       ("python2-pillow" ,python2-pillow)
+       ("python2-numpy" ,python2-numpy)
+       ("python2-scipy" ,python2-scipy)
+       ("python2-matplotlib" ,python2-matplotlib)))
+    (propagated-inputs
+     `(("r" ,r)
+       ("libsvm" ,libsvm)
+       ("randomjungle" ,randomjungle)))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "http://couger.oit.duke.edu")
+    (synopsis "Identify co-factors in sets of genomic regions")
+    (description
+     "COUGER can be applied to any two sets of genomic regions bound by
+paralogous TFs (e.g., regions derived from ChIP-seq experiments) to identify
+putative co-factors that provide specificity to each TF.  The framework
+determines the genomic targets uniquely-bound by each TF, and identifies a
+small set of co-factors that best explain the in vivo binding differences
+between the two TFs.
+
+COUGER uses classification algorithms (support vector machines and random
+forests) with features that reflect the DNA binding specificities of putative
+co-factors.  The features are generated either from high-throughput TF-DNA
+binding data (from protein binding microarray experiments), or from large
+collections of DNA motifs.")
+    (license license:gpl3+)))
+
 (define-public clustal-omega
   (package
     (name "clustal-omega")
-- 
2.1.0


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

* Re: [PATCH] Add Couger.
  2015-06-03 11:56 [PATCH] Add Couger Ricardo Wurmus
@ 2015-06-06 17:44 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-06-06 17:44 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

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

> From d4f171912387304e61f2536a2eb167c7321e7663 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 2 Jun 2015 15:47:22 +0200
> Subject: [PATCH 1/2] gnu: Add randomjungle.
>
> * gnu/packages/machine-learning.scm (randomjungle): New variable.

LGTM.

> From c9246d7cfc56a0e4a9039a4b5e2dd9a7216ebeef Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 3 Jun 2015 12:56:16 +0200
> Subject: [PATCH 2/2] gnu: Add Couger.
>
> * gnu/packages/bioinformatics.scm (couger): New variable.

LGTM.

Thanks!

Ludo'.

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 11:56 [PATCH] Add Couger Ricardo Wurmus
2015-06-06 17:44 ` 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).