summary refs log tree commit diff
path: root/gnu/packages/bioinformatics.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-06-23 10:54:00 +0200
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-07-08 17:05:00 +0200
commit56e373ef75d161325d4878f8cfaafffa7dba24a5 (patch)
tree61eab520e4526306959992ba84b174af3e198620 /gnu/packages/bioinformatics.scm
parent5bdda30b32676528bcfa0a169c30237fabaa4607 (diff)
downloadguix-56e373ef75d161325d4878f8cfaafffa7dba24a5.tar.gz
gnu: Add preseq.
* gnu/packages/bioinformatics.scm (preseq): New variable.
* gnu/packages/patches/preseq-1.0.2-install-to-PREFIX.patch: New file.
* gnu/packages/patches/preseq-1.0.2-link-with-libbam.patch: New file.
* gnu-system.am (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/bioinformatics.scm')
-rw-r--r--gnu/packages/bioinformatics.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f6349cfb8f..2b7f78be34 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2087,6 +2087,62 @@ subsequent visualization, annotation and storage of results.")
     ;; LGPLv2.1+
     (license (list license:gpl2 license:lgpl2.1+))))
 
+(define-public preseq
+  (package
+    (name "preseq")
+    (version "1.0.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "http://smithlabresearch.org/downloads/preseq-"
+                              version ".tar.bz2"))
+              (sha256
+               (base32 "0r7sw07p6nv8ygvc17gd78lisbw5336v3vhs86b5wv8mw3pwqksc"))
+              (patches (list (search-patch "preseq-1.0.2-install-to-PREFIX.patch")
+                             (search-patch "preseq-1.0.2-link-with-libbam.patch")))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Remove bundled samtools.
+               '(delete-file-recursively "preseq-master/samtools"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;no "check" target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'enter-dir
+          (lambda _
+            (chdir "preseq-master")
+            #t))
+         (add-after
+          'unpack 'use-samtools-headers
+          (lambda _
+            (substitute* '("smithlab_cpp/SAM.cpp"
+                           "smithlab_cpp/SAM.hpp")
+              (("sam.h") "samtools/sam.h"))
+            #t))
+         (delete 'configure))
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out"))
+                          (string-append "LIBBAM="
+                                         (assoc-ref %build-inputs "samtools")
+                                         "/lib/libbam.a"))))
+    (inputs
+     `(("gsl" ,gsl)
+       ("samtools" ,samtools-0.1)
+       ("zlib" ,zlib)))
+    (home-page "http://smithlabresearch.org/software/preseq/")
+    (synopsis "Program for analyzing library complexity")
+    (description
+     "The preseq package is aimed at predicting and estimating the complexity
+of a genomic sequencing library, equivalent to predicting and estimating the
+number of redundant reads from a given sequencing depth and how many will be
+expected from additional sequencing using an initial sequencing experiment.
+The estimates can then be used to examine the utility of further sequencing,
+optimize the sequencing depth, or to screen multiple libraries to avoid low
+complexity samples.")
+    (license license:gpl3+)))
+
 (define-public sra-tools
   (package
     (name "sra-tools")