>From 2f61ecb17e155c41624a81d4d95d2e80823da02c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Sep 2016 13:47:53 +0100 Subject: [PATCH 4/6] gnu: Add bcftools. * gnu/packages/bioinformatics.scm (bcftools): New variable. --- gnu/packages/bioinformatics.scm | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index a598351..e9ab05f 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -265,6 +265,66 @@ instance, it implements several methods to assess contig-wise read coverage.") BAM files.") (license license:expat))) +(define-public bcftools + (package + (name "bcftools") + (version "1.3.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/samtools/bcftools/releases/download/" + version "/bcftools-" version ".tar.bz2")) + (sha256 + (base32 + "095ry68vmz9q5s1scjsa698dhgyvgw5aicz24c19iwfbai07mhqj")) + (modules '((guix build utils))) + (snippet + ;; Delete bundled htslib. + '(delete-file-recursively "htslib-1.3.1")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags (list + "USE_GPL=1" + (string-append "prefix=" (assoc-ref %outputs "out")) + (string-append + "HTSDIR=" (assoc-ref %build-inputs "htslib") "/include") + (string-append + "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.a") + (string-append + "BGZIP=" (assoc-ref %build-inputs "htslib") "/bin/bgzip") + (string-append + "TABIX=" (assoc-ref %build-inputs "htslib") "/bin/tabix")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-Makefile + (lambda _ + (substitute* "Makefile" + ;; Do not attempt to build htslib. + (("^include \\$\\(HTSDIR\\)/htslib\\.mk") "") + ;; Link against GSL cblas. + (("-lcblas") "-lgslcblas")) + #t)) + (delete 'configure) + (add-before 'check 'patch-/bin/bash + (lambda _ + (substitute* "test/test.pl" + (("/bin/bash") (which "bash")))))))) + (native-inputs + `(("htslib" ,htslib) + ("perl" ,perl))) + (inputs + `(("gsl" ,gsl) + ("zlib" ,zlib))) + (home-page "https://samtools.github.io/bcftools/") + (synopsis "Utilities for variant calling and manipulating VCFs and BCFs") + (description + "BCFtools is a set of utilities that manipulate variant calls in the +Variant Call Format (VCF) and its binary counterpart BCF. All commands work +transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed.") + ;; The sources are dual MIT/GPL, but becomes GPL-only when USE_GPL=1. + (license (list license:gpl3+ license:expat)))) + (define-public bedops (package (name "bedops") -- 2.10.0