From patchwork Sat May 18 17:26:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 14000 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DD59A17027; Sat, 18 May 2019 18:27:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 1640F1701E for ; Sat, 18 May 2019 18:27:12 +0100 (BST) Received: from localhost ([127.0.0.1]:36688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS371-0004Ks-Im for patchwork@mira.cbaines.net; Sat, 18 May 2019 13:27:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS36w-0004GI-Gd for guix-patches@gnu.org; Sat, 18 May 2019 13:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hS36u-0001N0-OS for guix-patches@gnu.org; Sat, 18 May 2019 13:27:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hS36u-0001Mh-K2 for guix-patches@gnu.org; Sat, 18 May 2019 13:27:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hS36u-0007ud-FG for guix-patches@gnu.org; Sat, 18 May 2019 13:27:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35792] [PATCH 6/7] gnu: Add vcflib. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 May 2019 17:27:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35792 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35792@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155820042030364 (code B ref -1); Sat, 18 May 2019 17:27:04 +0000 Received: (at submit) by debbugs.gnu.org; 18 May 2019 17:27:00 +0000 Received: from localhost ([127.0.0.1]:32928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hS36p-0007ta-Ol for submit@debbugs.gnu.org; Sat, 18 May 2019 13:27:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hS36k-0007sE-M2 for submit@debbugs.gnu.org; Sat, 18 May 2019 13:26:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:57655) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hS36e-0001BU-5Q for submit@debbugs.gnu.org; Sat, 18 May 2019 13:26:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hS36c-0004DP-Gk for guix-patches@gnu.org; Sat, 18 May 2019 13:26:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hS36Z-00017m-LW for guix-patches@gnu.org; Sat, 18 May 2019 13:26:45 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35443) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hS36Z-00015x-2e for guix-patches@gnu.org; Sat, 18 May 2019 13:26:43 -0400 X-Originating-IP: 92.169.116.19 Received: from localhost.localdomain (lfbn-1-4117-19.w92-169.abo.wanadoo.fr [92.169.116.19]) (Authenticated sender: mail@ambrevar.xyz) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C14E724000F for ; Sat, 18 May 2019 17:26:41 +0000 (UTC) From: Pierre Neidhardt Date: Sat, 18 May 2019 19:26:39 +0200 Message-Id: <20190518172640.7165-6-mail@ambrevar.xyz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190518172640.7165-1-mail@ambrevar.xyz> References: <20190518172543.6766-1-mail@ambrevar.xyz> <20190518172640.7165-1-mail@ambrevar.xyz> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bioinformatics.scm (vcflib): New variable. --- gnu/packages/bioinformatics.scm | 107 ++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 3ad0a2a421..665c807de9 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14870,6 +14870,24 @@ might be caused by ATAC-seq library prep or sequencing. The main program, some of the details of opening and jumping in tabix-indexed files.") (license license:expat))) +(define tabixpp-freebayes + ;; This version works with FreeBayes while the released + ;; version doesn't. The released creates a variable with the name \"vcf\" + ;; somewhere, which is also the name of a namespace in vcflib. + (let ((commit "bbc63a49acc52212199f92e9e3b8fba0a593e3f7")) + (package + (inherit tabixpp) + (name "tabixpp-freebayes") + (version (git-version "0.0.0" "1" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/tabixpp/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "017qsmsc2kyiyzqr9nl8cc6pfldxf16dbn8flx5i59mbqr9ydi7g"))))))) + (define-public smithwaterman ;; TODO: Upgrading smithwaterman breaks FreeBayes. (let ((commit "203218b47d45ac56ef234716f1bd4c741b289be1")) @@ -14996,3 +15014,92 @@ provides a FASTA reader and indexer that can be embedded into applications which would benefit from directly reading subsequences from FASTA files. The library automatically handles index file generation and use.") (license (list license:expat license:gpl2))))) + +(define-public vcflib + (let ((commit "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92" )) + (package + (name "vcflib") + (version (git-version "1.0.2" "1" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vcflib/vcflib/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1gijvcz1lcdn5kvgzb671l6iby0379qk00nqmcrszgk67hfwx6kq")))) + (build-system gnu-build-system) + (native-inputs + `(("zlib" ,zlib) + ;; Submodules. + ;; This package builds against the .o files so we need to extract the source. + ("tabixpp-src" ,(package-source tabixpp-freebayes)) + ("smithwaterman-src" ,(package-source smithwaterman)) + ("multichoose-src" ,(package-source multichoose)) + ("fsom-src" ,(package-source fsom)) + ("filevercmp-src" ,(package-source filevercmp)) + ("fastahack-src" ,(package-source fastahack)) + ("intervaltree-src" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/intervaltree/") + (commit "dbb4c513d1ad3baac516fc1484c995daf9b42838"))) + (file-name "intervaltree-src.tar.gz") + (sha256 + (base32 "1fy5qbj4bg8d2bjysvaa9wfnqn2rj2sk5yra2h4l5pzvy53f23fj")))))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (if (file-is-directory? (assoc-ref inputs source)) + (copy-recursively (assoc-ref inputs source) ".") + (invoke "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and + (unpack "intervaltree-src" "intervaltree") + (unpack "fastahack-src" "fastahack") + (unpack "filevercmp-src" "filevercmp") + (unpack "fsom-src" "fsom") + (unpack "multichoose-src" "multichoose") + (unpack "smithwaterman-src" "smithwaterman") + (unpack "tabixpp-src" "tabixpp"))))) + (add-after 'unpack-submodule-sources 'fix-makefile + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("Makefile") + (("^GIT_VERSION.*") "GIT_VERSION = v1.0.0")))) + (replace 'build + (lambda* (#:key inputs make-flags #:allow-other-keys) + (with-directory-excursion "tabixpp" + (invoke "make")) + (invoke "make" "CC=gcc" + (string-append "CFLAGS=\"" "-Itabixpp " + ;; "-I" (assoc-ref inputs "htslib") "/include " + "\"") + "all"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin")) + (lib (string-append (assoc-ref outputs "out") "/lib"))) + (for-each (lambda (file) + (install-file file bin)) + (find-files "bin" ".*")) + ;; The header files in src/ do not interface libvcflib, + ;; therefore they are left out. + (install-file "libvcflib.a" lib))))))) + (home-page "https://github.com/vcflib/vcflib/") + (synopsis "Library for parsing and manipulating VCF files") + (description "Vcflib provides methods to manipulate and interpret +sequence variation as it can be described by VCF. It is both an API for parsing +and operating on records of genomic variation as it can be described by the VCF +format, and a collection of command-line utilities for executing complex +manipulations on VCF files.") + (license license:expat))))