From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: Add samtools Date: Thu, 11 Dec 2014 15:48:22 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5FZ-0000Ur-Kk for guix-devel@gnu.org; Thu, 11 Dec 2014 10:02:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz5FU-00014L-OR for guix-devel@gnu.org; Thu, 11 Dec 2014 10:01:53 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:60191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz5FU-000145-Co for guix-devel@gnu.org; Thu, 11 Dec 2014 10:01:48 -0500 Received: from localhost (localhost [127.0.0.1]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 21E11380F26 for ; Thu, 11 Dec 2014 16:01:40 +0100 (CET) Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4B5xUVbDW2w2 for ; Thu, 11 Dec 2014 16:01:34 +0100 (CET) Received: from HTCATWO.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Thu, 11 Dec 2014 16:01:34 +0100 (CET) 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@gnu.org * gnu/packages/bioinformatics.scm: New file * gnu-system.am (GNU_SYSTEM_MODULES): Add it --- gnu-system.am | 1 + gnu/packages/bioinformatics.scm | 83 +++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 84 insertions(+) create mode 100644 gnu/packages/bioinformatics.scm diff --git a/gnu-system.am b/gnu-system.am index e923340..d4d0b51 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -45,6 +45,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/base.scm \ gnu/packages/bash.scm \ gnu/packages/bdw-gc.scm \ + gnu/packages/bioinformatics.scm \ gnu/packages/bittorrent.scm \ gnu/packages/bison.scm \ gnu/packages/boost.scm \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.= scm new file mode 100644 index 0000000..4d27b12 --- /dev/null +++ b/gnu/packages/bioinformatics.scm @@ -0,0 +1,83 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2014 Ricardo Wurmus +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages bioinformatics) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages compression) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python)) + +(define-public samtools + (package + (name "samtools") + (version "1.1") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://sourceforge/samtools/" + version "/samtools-" version ".tar.bz2")) + (sha256 + (base32 + "1y5p2hs4gif891b4ik20275a8xf3qrr1zh9wpysp4g8m0g1jckf2")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags (list (string-append "prefix=3D" (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 "st= ats" + ;; subcommand in test_usage_subcommand ("did not have Usage" + ;; and "usage did not mention samtools stats"), so we disab= le + ;; 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) + ("python" ,python) + ("zlib" ,zlib))) + (home-page "http://samtools.sourceforge.net") + (synopsis "Efficient utilities on manipulating alignments in the SAM f= ormat") + (description + "Samtools implements various utilities for post-processing alignments= in +the SAM, BAM, and CRAM formats, including indexing, variant calling (in +conjunction with bcftools), and a simple alignment viewer.") + (license license:expat))) --=20 1.9.3