diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-01-08 12:17:58 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-01-09 14:30:38 +0200 |
commit | 0ab7f6c5f4646ca52d6aa54e0adbb4f8b45f9263 (patch) | |
tree | 5b8c4c9244cad3aaf981615a22a385868589e4ac /gnu | |
parent | 2e3efa6e558ea7adf6980e6f07c002a59597ad51 (diff) | |
download | guix-0ab7f6c5f4646ca52d6aa54e0adbb4f8b45f9263.tar.gz |
gnu: vcflib: Update to 1.0.1.
* gnu/packages/bioinformatics.scm (vcflib): Update to 1.0.1. [source]: Download using url-fetch. [native-inputs]: Sort alphabetically. Move perl, python ... [inputs]: ... to here. [arguments]: Add make-flags. Update custom 'build phase. (tabixpp-freebayes): Remove variable. (freebayes)[native-inputs]: Use tabixpp-source over tabixpp-freebayes.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/bioinformatics.scm | 185 |
1 files changed, 93 insertions, 92 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 76026e7065..bde4aad785 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14941,24 +14941,6 @@ mutations from scRNA-Seq data.") 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")) @@ -15087,84 +15069,103 @@ library automatically handles index file generation and use.") (license (list license:expat license:gpl2)))) (define-public vcflib - (let ((commit "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92") - (revision "1")) - (package - (name "vcflib") - (version (git-version "0.0.0" revision 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) - (inputs - `(("zlib" ,zlib))) - (native-inputs - `(("perl" ,perl) - ("python" ,python-2) - ;; 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" ,(package-source intervaltree)))) - (arguments - `(#:tests? #f ; no tests - #: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"))))) - (replace 'build - (lambda* (#:key inputs make-flags #:allow-other-keys) + (package + (name "vcflib") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/vcflib/vcflib/releases/" + "download/v" version + "/vcflib-" version "-src.tar.gz")) + (sha256 + (base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm")) + (modules '((guix build utils))) + (snippet + `(begin + (for-each delete-file-recursively + '("fastahack" "filevercmp" "fsom" "googletest" "intervaltree" + "libVCFH" "multichoose" "smithwaterman" "tabixpp")) + #t)))) + (build-system gnu-build-system) + (inputs + `(("htslib" ,htslib) + ("perl" ,perl) + ("python" ,python) + ("zlib" ,zlib))) + (native-inputs + `(;; Submodules. + ;; This package builds against the .o files so we need to extract the source. + ("fastahack-src" ,(package-source fastahack)) + ("filevercmp-src" ,(package-source filevercmp)) + ("fsom-src" ,(package-source fsom)) + ("intervaltree-src" ,(package-source intervaltree)) + ("multichoose-src" ,(package-source multichoose)) + ("smithwaterman-src" ,(package-source smithwaterman)) + ("tabixpp-src" ,(package-source tabixpp)))) + (arguments + `(#:tests? #f ; no tests + #:make-flags (list (string-append "HTS_LIB=" + (assoc-ref %build-inputs "htslib") + "/lib/libhts.a") + (string-append "HTS_INCLUDES= -I" + (assoc-ref %build-inputs "htslib") + "/include/htslib") + (string-append "HTS_LDFLAGS= -L" + (assoc-ref %build-inputs "htslib") + "/include/htslib" " -lhts")) + #: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) + (mkdir 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 "fastahack-src" "fastahack") + (unpack "filevercmp-src" "filevercmp") + (unpack "fsom-src" "fsom") + (unpack "intervaltree-src" "intervaltree") + (unpack "multichoose-src" "multichoose") + (unpack "smithwaterman-src" "smithwaterman") + (unpack "tabixpp-src" "tabixpp"))))) + (replace 'build + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((htslib (assoc-ref inputs "htslib"))) (with-directory-excursion "tabixpp" - (invoke "make")) - (invoke "make" "CC=gcc" - (string-append "CFLAGS=\"" "-Itabixpp " "\"") - "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)) - #t))))) - (home-page "https://github.com/vcflib/vcflib/") - (synopsis "Library for parsing and manipulating VCF files") - (description "Vcflib provides methods to manipulate and interpret + (substitute* "Makefile" + (("-Ihtslib") (string-append "-I" htslib "/include/htslib")) + (("-Lhtslib") (string-append "-L" htslib "/lib/htslib")) + (("htslib/htslib") (string-append htslib "/include/htslib"))) + (invoke "make" + (string-append "HTS_LIB=" htslib "/lib/libhts.a"))) + (apply invoke "make" "CC=gcc" "CFLAGS=-Itabixpp" make-flags)))) + (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)) + #t))))) + (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)))) + (license license:expat))) (define-public freebayes (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb") @@ -15196,7 +15197,7 @@ manipulations on VCF files.") ("vcflib-src" ,(package-source vcflib)) ;; These are submodules for the vcflib version used in freebayes. ;; This package builds against the .o files so we need to extract the source. - ("tabixpp-src" ,(package-source tabixpp-freebayes)) + ("tabixpp-src" ,(package-source tabixpp)) ("smithwaterman-src" ,(package-source smithwaterman)) ("multichoose-src" ,(package-source multichoose)) ("fsom-src" ,(package-source fsom)) |