From 15a3c3d4f1e45f40f7a40722726c41b902ddb316 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 5 Mar 2015 10:24:12 +0100 Subject: [PATCH] gnu: Add htsjdk. * gnu/packages/bioinformatics.scm (htsjdk): New variable. --- gnu/packages/bioinformatics.scm | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 8ed871003a..d3b891996d 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -27,6 +27,7 @@ (define-module (gnu packages bioinformatics) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages java) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -446,6 +447,51 @@ (define-public htseq from high-throughput sequencing assays.") (license license:gpl3+))) +(define-public htsjdk + (package + (name "htsjdk") + (version "1.129") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/samtools/htsjdk/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0asdk9b8jx2ij7yd6apg9qx03li8q7z3ml0qy2r2qczkra79y6fw")) + (modules '((guix build utils))) + ;; remove build dependency on git + (snippet '(substitute* "build.xml" + (("failifexecutionfails=\"true\"") + "failifexecutionfails=\"false\""))))) + (build-system gnu-build-system) + (arguments + `(#:modules ((srfi srfi-1) + (guix build gnu-build-system) + (guix build utils)) + #:phases (alist-replace + 'build + (lambda _ + (setenv "JAVA_HOME" (assoc-ref %build-inputs "jdk")) + (zero? (system* "ant" "all" + (string-append "-Ddist=" + (assoc-ref %outputs "out") + "/share/java/htsjdk/")))) + (fold alist-delete %standard-phases + '(configure install check))))) + (native-inputs + `(("ant" ,ant) + ("jdk" ,icedtea6 "jdk"))) + (home-page "http://samtools.github.io/htsjdk/") + (synopsis "Java API for high-throughput sequencing data (HTS) formats") + (description + "HTSJDK is an implementation of a unified Java library for accessing +common file formats, such as SAM and VCF, used for high-throughput +sequencing (HTS) data. There are also an number of useful utilities for +manipulating HTS data.") + (license license:expat))) + (define-public macs (package (name "macs")