about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpjotrp2020-12-10 12:54:05 +0000
committerpjotrp2020-12-15 13:10:59 +0000
commitbe517e1e2398276c67ea799eb33d1699d3d1f467 (patch)
treea15ecea54775f7b5a27cb580144f6394781c6bf8
parent3ebdd5d2e0d80317dcec9b05fd23f8b97d35b998 (diff)
downloadguix-bioinformatics-be517e1e2398276c67ea799eb33d1699d3d1f467.tar.gz
Try htslib with codecs
-rw-r--r--gn/packages/sambamba.scm48
1 files changed, 47 insertions, 1 deletions
diff --git a/gn/packages/sambamba.scm b/gn/packages/sambamba.scm
index cb10355..31ec54f 100644
--- a/gn/packages/sambamba.scm
+++ b/gn/packages/sambamba.scm
@@ -10,14 +10,60 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages bioinformatics) ; for samtools in sambamba
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages dlang)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ruby)
-  #:use-module (gnu packages dlang)
+  #:use-module (gnu packages tls)
   #:use-module (gn packages shell)
   #:use-module (srfi srfi-1))
 
+
+(define-public htslib
+  (package
+    (name "htslib")
+    (version "1.11-codecs")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/samtools/htslib/releases/download/"
+                    version "/htslib-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1mrq4mihzx37yqhj3sfz6da6mw49niia808bzsw2gkkgmadxvyng"))))
+    (build-system gnu-build-system)
+    ;; Let htslib translate "gs://" and "s3://" to regular https links with
+    ;; "--enable-gcs" and "--enable-s3". For these options to work, we also
+    ;; need to set "--enable-libcurl".
+    (arguments
+     `(#:configure-flags '("--enable-gcs"
+                           "--enable-libcurl"
+                           "--enable-s3"
+                           "--enable-lzma"
+                           "--enable-bz2")))
+    (inputs
+     `(("curl" ,curl)
+       ("openssl" ,openssl)
+       ("xz" ,xz)          ; for liblzma codec
+       ("bzip2" ,bzip2)))  ; for libz2 codec
+    ;; This is referred to in the pkg-config file as a required library.
+    (propagated-inputs
+     `(("zlib" ,zlib)))
+    (native-inputs
+     `(("perl" ,perl)))
+    (home-page "https://www.htslib.org")
+    (synopsis "C library for reading/writing high-throughput sequencing data")
+    (description
+     "HTSlib is a C library for reading/writing high-throughput sequencing
+data.  It also provides the @command{bgzip}, @command{htsfile}, and
+@command{tabix} utilities.")
+    ;; Files under cram/ are released under the modified BSD license;
+    ;; the rest is released under the Expat license
+    (license (list license:expat license:bsd-3))))
+
+
 (define-public sambamba
   (let ((commit "7cff06533b539a99b4e0db681fb573214d63aae2"))
     (package