Archived
1
0
Fork 0

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.
This commit is contained in:
Efraim Flashner 2020-01-08 12:17:58 +02:00
parent 2e3efa6e55
commit 0ab7f6c5f4
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -14941,24 +14941,6 @@ mutations from scRNA-Seq data.")
some of the details of opening and jumping in tabix-indexed files.") some of the details of opening and jumping in tabix-indexed files.")
(license license:expat))) (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 (define-public smithwaterman
;; TODO: Upgrading smithwaterman breaks FreeBayes. ;; TODO: Upgrading smithwaterman breaks FreeBayes.
(let ((commit "203218b47d45ac56ef234716f1bd4c741b289be1")) (let ((commit "203218b47d45ac56ef234716f1bd4c741b289be1"))
@ -15087,84 +15069,103 @@ library automatically handles index file generation and use.")
(license (list license:expat license:gpl2)))) (license (list license:expat license:gpl2))))
(define-public vcflib (define-public vcflib
(let ((commit "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92") (package
(revision "1")) (name "vcflib")
(package (version "1.0.1")
(name "vcflib") (source
(version (git-version "0.0.0" revision commit)) (origin
(source (method url-fetch)
(origin (uri (string-append "https://github.com/vcflib/vcflib/releases/"
(method git-fetch) "download/v" version
(uri (git-reference "/vcflib-" version "-src.tar.gz"))
(url "https://github.com/vcflib/vcflib/") (sha256
(commit commit))) (base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm"))
(file-name (git-file-name name version)) (modules '((guix build utils)))
(sha256 (snippet
(base32 "1gijvcz1lcdn5kvgzb671l6iby0379qk00nqmcrszgk67hfwx6kq")))) `(begin
(build-system gnu-build-system) (for-each delete-file-recursively
(inputs '("fastahack" "filevercmp" "fsom" "googletest" "intervaltree"
`(("zlib" ,zlib))) "libVCFH" "multichoose" "smithwaterman" "tabixpp"))
(native-inputs #t))))
`(("perl" ,perl) (build-system gnu-build-system)
("python" ,python-2) (inputs
;; Submodules. `(("htslib" ,htslib)
;; This package builds against the .o files so we need to extract the source. ("perl" ,perl)
("tabixpp-src" ,(package-source tabixpp-freebayes)) ("python" ,python)
("smithwaterman-src" ,(package-source smithwaterman)) ("zlib" ,zlib)))
("multichoose-src" ,(package-source multichoose)) (native-inputs
("fsom-src" ,(package-source fsom)) `(;; Submodules.
("filevercmp-src" ,(package-source filevercmp)) ;; This package builds against the .o files so we need to extract the source.
("fastahack-src" ,(package-source fastahack)) ("fastahack-src" ,(package-source fastahack))
("intervaltree-src" ,(package-source intervaltree)))) ("filevercmp-src" ,(package-source filevercmp))
(arguments ("fsom-src" ,(package-source fsom))
`(#:tests? #f ; no tests ("intervaltree-src" ,(package-source intervaltree))
#:phases ("multichoose-src" ,(package-source multichoose))
(modify-phases %standard-phases ("smithwaterman-src" ,(package-source smithwaterman))
(delete 'configure) ("tabixpp-src" ,(package-source tabixpp))))
(delete 'check) (arguments
(add-after 'unpack 'unpack-submodule-sources `(#:tests? #f ; no tests
(lambda* (#:key inputs #:allow-other-keys) #:make-flags (list (string-append "HTS_LIB="
(let ((unpack (lambda (source target) (assoc-ref %build-inputs "htslib")
(with-directory-excursion target "/lib/libhts.a")
(if (file-is-directory? (assoc-ref inputs source)) (string-append "HTS_INCLUDES= -I"
(copy-recursively (assoc-ref inputs source) ".") (assoc-ref %build-inputs "htslib")
(invoke "tar" "xvf" "/include/htslib")
(assoc-ref inputs source) (string-append "HTS_LDFLAGS= -L"
"--strip-components=1")))))) (assoc-ref %build-inputs "htslib")
(and "/include/htslib" " -lhts"))
(unpack "intervaltree-src" "intervaltree") #:phases
(unpack "fastahack-src" "fastahack") (modify-phases %standard-phases
(unpack "filevercmp-src" "filevercmp") (delete 'configure)
(unpack "fsom-src" "fsom") (delete 'check)
(unpack "multichoose-src" "multichoose") (add-after 'unpack 'unpack-submodule-sources
(unpack "smithwaterman-src" "smithwaterman") (lambda* (#:key inputs #:allow-other-keys)
(unpack "tabixpp-src" "tabixpp"))))) (let ((unpack (lambda (source target)
(replace 'build (mkdir target)
(lambda* (#:key inputs make-flags #:allow-other-keys) (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" (with-directory-excursion "tabixpp"
(invoke "make")) (substitute* "Makefile"
(invoke "make" "CC=gcc" (("-Ihtslib") (string-append "-I" htslib "/include/htslib"))
(string-append "CFLAGS=\"" "-Itabixpp " "\"") (("-Lhtslib") (string-append "-L" htslib "/lib/htslib"))
"all"))) (("htslib/htslib") (string-append htslib "/include/htslib")))
(replace 'install (invoke "make"
(lambda* (#:key outputs #:allow-other-keys) (string-append "HTS_LIB=" htslib "/lib/libhts.a")))
(let ((bin (string-append (assoc-ref outputs "out") "/bin")) (apply invoke "make" "CC=gcc" "CFLAGS=-Itabixpp" make-flags))))
(lib (string-append (assoc-ref outputs "out") "/lib"))) (replace 'install
(for-each (lambda (file) (lambda* (#:key outputs #:allow-other-keys)
(install-file file bin)) (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
(find-files "bin" ".*")) (lib (string-append (assoc-ref outputs "out") "/lib")))
;; The header files in src/ do not interface libvcflib, (for-each (lambda (file)
;; therefore they are left out. (install-file file bin))
(install-file "libvcflib.a" lib)) (find-files "bin" ".*"))
#t))))) ;; The header files in src/ do not interface libvcflib,
(home-page "https://github.com/vcflib/vcflib/") ;; therefore they are left out.
(synopsis "Library for parsing and manipulating VCF files") (install-file "libvcflib.a" lib))
(description "Vcflib provides methods to manipulate and interpret #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 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 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 format, and a collection of command-line utilities for executing complex
manipulations on VCF files.") manipulations on VCF files.")
(license license:expat)))) (license license:expat)))
(define-public freebayes (define-public freebayes
(let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb") (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")
@ -15196,7 +15197,7 @@ manipulations on VCF files.")
("vcflib-src" ,(package-source vcflib)) ("vcflib-src" ,(package-source vcflib))
;; These are submodules for the vcflib version used in freebayes. ;; These are submodules for the vcflib version used in freebayes.
;; This package builds against the .o files so we need to extract the source. ;; 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)) ("smithwaterman-src" ,(package-source smithwaterman))
("multichoose-src" ,(package-source multichoose)) ("multichoose-src" ,(package-source multichoose))
("fsom-src" ,(package-source fsom)) ("fsom-src" ,(package-source fsom))