From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Various samtools patches. Date: Tue, 28 Apr 2015 11:35:14 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn1vQ-0003lm-Mo for guix-devel@gnu.org; Tue, 28 Apr 2015 05:35:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn1vL-000285-EL for guix-devel@gnu.org; Tue, 28 Apr 2015 05:35:32 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:59952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn1vL-00026q-1M for guix-devel@gnu.org; Tue, 28 Apr 2015 05:35:27 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 8AF5238062C for ; Tue, 28 Apr 2015 11:35:20 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id taS7RnUj8rio for ; Tue, 28 Apr 2015 11:35:14 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 28 Apr 2015 11:35:14 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain Hi Guix, the first patch replaces a Makefile-patching build phase with make-flags. The second patch makes samtools install its libbam library. The third patch adds the most recent version of the 0.1 line of samtools. The input and output formats differ greatly from that used and produced by samtools 1.x (which has already been packaged as "samtools") and is still used in many bioinformatics pipelines. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-samtools-Remove-patch-makefile-curses-phase.patch" >From 5153c937e39cfeb59275594047fcccec6859f250 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 23 Apr 2015 15:23:26 +0200 Subject: [PATCH 1/3] gnu: samtools: Remove patch-makefile-curses phase. * gnu/packages/bioinformatics.scm (samtools)[arguments]: Remove patch-makefile-curses phase, use make-flags instead. --- gnu/packages/bioinformatics.scm | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index b654e05..65cf37f 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1123,32 +1123,27 @@ distribution, coverage uniformity, strand specificity, etc.") ;; systems. #:tests? ,(string=? (or (%current-system) (%current-target-system)) "x86_64-linux") - #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))) + #:make-flags (list "LIBCURSES=-lncurses" + (string-append "prefix=" (assoc-ref %outputs "out"))) #:phases (alist-cons-after 'unpack - 'patch-makefile-curses - (lambda _ - (substitute* "Makefile" - (("-lcurses") "-lncurses"))) - (alist-cons-after - 'unpack - 'patch-tests - (lambda* (#:key inputs #:allow-other-keys) - (let ((bash (assoc-ref inputs "bash"))) - (substitute* "test/test.pl" - ;; The test script calls out to /bin/bash - (("/bin/bash") - (string-append bash "/bin/bash")) - ;; There are two failing tests upstream relating to the "stats" - ;; subcommand in test_usage_subcommand ("did not have Usage" - ;; and "usage did not mention samtools stats"), so we disable - ;; them. - (("(test_usage_subcommand\\(.*\\);)" cmd) - (string-append "unless ($subcommand eq 'stats') {" cmd "};"))))) - (alist-delete - 'configure - %standard-phases))))) + 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "test/test.pl" + ;; The test script calls out to /bin/bash + (("/bin/bash") + (string-append bash "/bin/bash")) + ;; There are two failing tests upstream relating to the "stats" + ;; subcommand in test_usage_subcommand ("did not have Usage" + ;; and "usage did not mention samtools stats"), so we disable + ;; them. + (("(test_usage_subcommand\\(.*\\);)" cmd) + (string-append "unless ($subcommand eq 'stats') {" cmd "};"))))) + (alist-delete + 'configure + %standard-phases)))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("ncurses" ,ncurses) ("perl" ,perl) -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0002-gnu-samtools-Install-libbam.a-library.patch" >From f33a1acd0d882068520f85ad73c985492ee0b16b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 23 Apr 2015 16:42:50 +0200 Subject: [PATCH 2/3] gnu: samtools: Install libbam.a library. * gnu/packages/bioinformatics.scm (samtools)[arguments]: Add phase "install-library" to install the libbam.a library. --- gnu/packages/bioinformatics.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 65cf37f..42b1f4f 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1141,9 +1141,13 @@ distribution, coverage uniformity, strand specificity, etc.") ;; them. (("(test_usage_subcommand\\(.*\\);)" cmd) (string-append "unless ($subcommand eq 'stats') {" cmd "};"))))) - (alist-delete - 'configure - %standard-phases)))) + (alist-cons-after + 'install 'install-library + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (mkdir-p lib) + (copy-file "libbam.a" (string-append lib "/libbam.a")))) + (alist-delete 'configure %standard-phases))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("ncurses" ,ncurses) ("perl" ,perl) -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0003-gnu-Add-samtools-0.1.19.patch" >From f4ea1dbbb22b191c27f8bb1beb3af591855b9162 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 28 Apr 2015 11:28:16 +0200 Subject: [PATCH 3/3] gnu: Add samtools-0.1.19. * gnu/packages/bioinformatics.scm (samtools-0.1): New variable. --- gnu/packages/bioinformatics.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 42b1f4f..bd673ac 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1162,6 +1162,31 @@ variant calling (in conjunction with bcftools), and a simple alignment viewer.") (license license:expat))) +(define-public samtools-0.1 + (package (inherit samtools) + (version "0.1.19") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/samtools/" + version "/samtools-" version ".tar.bz2")) + (sha256 + (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h")))) + (arguments + (substitute-keyword-arguments (package-arguments samtools) + ((#:tests? tests) #f) ;no "check" target + ((#:phases phases) + `(modify-phases ,phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append + (assoc-ref outputs "out") "/bin"))) + (mkdir-p bin) + (copy-file "samtools" + (string-append bin "/samtools"))))) + (delete 'patch-tests))))))) + (define-public ngs-sdk (package (name "ngs-sdk") -- 2.1.0 --=-=-=--