From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHTI6-0007Xg-Jb for guix-patches@gnu.org; Wed, 22 Nov 2017 06:34:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHTI2-0004Bm-7g for guix-patches@gnu.org; Wed, 22 Nov 2017 06:34:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:43248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHTI2-0004Bd-2v for guix-patches@gnu.org; Wed, 22 Nov 2017 06:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eHTI1-0007xm-TH for guix-patches@gnu.org; Wed, 22 Nov 2017 06:34:01 -0500 Subject: [bug#29394] [PATCH 06/12] gnu: Add java-picard. Resent-Message-ID: From: Date: Wed, 22 Nov 2017 12:30:36 +0100 Message-ID: <20171122113042.1734-6-ricardo.wurmus@mdc-berlin.de> In-Reply-To: <20171122113042.1734-1-ricardo.wurmus@mdc-berlin.de> References: <20171122113042.1734-1-ricardo.wurmus@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29394@debbugs.gnu.org Cc: Ricardo Wurmus From: Ricardo Wurmus * gnu/packages/bioinformatics.scm (java-picard): New variable. --- gnu/packages/bioinformatics.scm | 78 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 6c71d7362..0896edf25 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3008,6 +3008,84 @@ sequencing (HTS) data. There are also an number of useful utilities for manipulating HTS data.") (license license:expat))) +;; This version matches java-htsjdk 2.3.0. Later versions also require a more +;; recent version of java-htsjdk, which depends on gradle. +(define-public java-picard + (package + (name "java-picard") + (version "2.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/broadinstitute/picard.git") + (commit version))) + (file-name (string-append "java-picard-" version "-checkout")) + (sha256 + (base32 + "1ll7mf4r3by92w2nhlmpa591xd1f46xlkwh59mq6fvbb5pdwzvx6")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete pre-built binaries. + (delete-file-recursively "lib") + (mkdir-p "lib") + (substitute* "build.xml" + ;; Remove build-time dependency on git. + (("failifexecutionfails=\"true\"") + "failifexecutionfails=\"false\"") + ;; Use our htsjdk. + (("depends=\"compile-htsjdk, ") + "depends=\"") + (("depends=\"compile-htsjdk-tests, ") + "depends=\"") + ;; Build picard-lib.jar before building picard.jar + (("name=\"picard-jar\" depends=\"" line) + (string-append line "picard-lib-jar, "))) + #t)))) + (build-system ant-build-system) + (arguments + `(#:build-target "picard-jar" + #:test-target "test" + ;; Tests require jacoco:coverage. + #:tests? #f + #:make-flags + (list (string-append "-Dhtsjdk_lib_dir=" + (assoc-ref %build-inputs "java-htsjdk") + "/share/java/htsjdk/") + "-Dhtsjdk-classes=dist/tmp" + (string-append "-Dhtsjdk-version=" + ,(package-version java-htsjdk))) + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'use-our-htsjdk + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "build.xml" + (("\\$\\{htsjdk\\}/lib") + (string-append (assoc-ref inputs "java-htsjdk") + "/share/java/htsjdk/"))) + #t)) + (add-after 'unpack 'make-test-target-independent + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "build.xml" + (("name=\"test\" depends=\"compile, ") + "name=\"test\" depends=\"")) + #t)) + (replace 'install (install-jars "dist"))))) + (inputs + `(("java-htsjdk" ,java-htsjdk) + ("java-guava" ,java-guava))) + (native-inputs + `(("java-testng" ,java-testng))) + (home-page "http://broadinstitute.github.io/picard/") + (synopsis "Tools for manipulating high-throughput sequencing data and formats") + (description "Picard is a set of Java command line tools for manipulating +high-throughput sequencing (HTS) data and formats. Picard is implemented +using the HTSJDK Java library to support accessing file formats that are +commonly used for high-throughput sequencing data such as SAM, BAM, CRAM and +VCF.") + (license license:expat))) + (define-public htslib (package (name "htslib") -- 2.14.1