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

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

Hi Guix,

attached is a patch for "Entrez Direct" a tool for accessing the vast
online databases of NCBI.


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

From 1808a6000260418ce7a3433cb75e904b854fcc53 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 27 May 2015 15:14:19 +0200
Subject: [PATCH] gnu: Add edirect.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index b359a8a..30de73e 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -24,6 +24,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
@@ -45,6 +46,7 @@
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages vim)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages zip))
 
@@ -542,6 +544,74 @@ file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
 other types of unwanted sequence from high-throughput sequencing reads.")
     (license license:expat)))
 
+(define-public edirect
+  (package
+    (name "edirect")
+    (version "2.50")
+    (source (origin
+              (method url-fetch)
+              ;; Note: older versions are not retained.
+              (uri "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.zip")
+              (sha256
+               (base32
+                "08afhz2ph66h8h381hl1mqyxkdi5nbvzsyj9gfw3jfbdijnpi4qj"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:tests? #f ;no "check" target
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (replace 'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((target (string-append (assoc-ref outputs "out")
+                                                 "/bin")))
+                      (mkdir-p target)
+                      (copy-file "edirect.pl"
+                                 (string-append target "/edirect.pl"))
+                      #t)))
+         (add-after
+          'install 'wrap-program
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Make sure 'edirect.pl' finds all perl inputs at runtime.
+            (let* ((out (assoc-ref outputs "out"))
+                   (path (getenv "PERL5LIB")))
+              (wrap-program (string-append out "/bin/edirect.pl")
+                `("PERL5LIB" ":" prefix (,path)))))))))
+    (inputs
+     `(("perl-html-parser" ,perl-html-parser)
+       ("perl-encode-locale" ,perl-encode-locale)
+       ("perl-file-listing" ,perl-file-listing)
+       ("perl-html-tagset" ,perl-html-tagset)
+       ("perl-html-tree" ,perl-html-tree)
+       ("perl-http-cookies" ,perl-http-cookies)
+       ("perl-http-date" ,perl-http-date)
+       ("perl-http-message" ,perl-http-message)
+       ("perl-http-negotiate" ,perl-http-negotiate)
+       ("perl-lwp-mediatypes" ,perl-lwp-mediatypes)
+       ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
+       ("perl-net-http" ,perl-net-http)
+       ("perl-uri" ,perl-uri)
+       ("perl-www-robotrules" ,perl-www-robotrules)
+       ("perl" ,perl)))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "http://www.ncbi.nlm.nih.gov/books/NBK179288")
+    (synopsis "Tools for accessing the NCBI's set of databases")
+    (description
+     "Entrez Direct (EDirect) is a method for accessing the NCBI's set of
+interconnected databases (publication, sequence, structure, gene, variation,
+expression, etc.) from a terminal window.  Functions take search terms from
+command-line arguments.  Individual operations are combined to build
+multi-step queries.  Record retrieval and formatting normally complete the
+process.
+
+EDirect also provides an argument-driven function that simplifies the
+extraction of data from document summaries or other results that are returned
+in structured XML format.  This can eliminate the need for writing custom
+software to answer ad hoc questions.")
+    (license license:public-domain)))
+
 (define-public express
   (package
     (name "express")
-- 
2.1.0


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

* Re: [PATCH] Add edirect.
  2015-05-27 13:16 [PATCH] Add edirect Ricardo Wurmus
@ 2015-05-27 15:29 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-05-27 15:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

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

> From 1808a6000260418ce7a3433cb75e904b854fcc53 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 27 May 2015 15:14:19 +0200
> Subject: [PATCH] gnu: Add edirect.
>
> * gnu/packages/bioinformatics.scm (edirect): New variable.

[...]

> +    (description
> +     "Entrez Direct (EDirect) is a method for accessing the NCBI's set of

Could you expand “NCBI” on the first occurrence?

Otherwise LGTM, thanks!

Ludo’.

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

end of thread, other threads:[~2015-05-27 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 13:16 [PATCH] Add edirect Ricardo Wurmus
2015-05-27 15:29 ` 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).