me
/
guix
Archived
1
0
Fork 0

gnu: Add python-cyvcf2.

* gnu/packages/bioinformatics.scm (python-cyvcf2): New variable.

Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
Change-Id: I0db07e7b5840f5c1f5c68512ffabb3d6b39ab95c
master
Alexis Simon 2024-04-18 11:10:22 +02:00 committed by Ricardo Wurmus
parent 8e5186ca9f
commit 78d24b78d3
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 53 additions and 0 deletions

View File

@ -25,6 +25,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2022, 2023 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2024 Alexis Simon <alexis.simon@runbox.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -1916,6 +1917,58 @@ from high-throughput single-cell RNA sequencing (scRNA-seq) data.")
and sequence consensus.")
(license license:expat)))
(define-public python-cyvcf2
(package
(name "python-cyvcf2")
(version "0.30.28")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/brentp/cyvcf2")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "16yhfax509zyip8kkq2b0lflx5bdq5why7d785ayrqyzzq2rxqkk"))
(modules '((guix build utils)))
(snippet
;; Delete bundled library
'(delete-file-recursively "htslib"))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'build-extensions
(lambda _
;; Cython extensions have to be built before running the tests.
(invoke "python" "setup.py" "build_ext" "--inplace")))
(add-after 'unpack 'fix-setup
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "setup.py"
(("^htslib_include_dirs =.*")
(string-append "htslib_include_dirs = [\""
#$(this-package-input "htslib") "/include\"]\n"))
(("lib_name = \"libhts.so\"")
(string-append "lib_name = \""
(search-input-file inputs "lib/libhts.so.3")
"\"\n")))))
(add-before 'build 'use-system-htslib-package
(lambda _
(setenv "CYTHONIZE" "1")
(setenv "CYVCF2_HTSLIB_MODE" "EXTERNAL"))))))
(inputs (list curl htslib libdeflate openssl zlib))
(native-inputs (list python-cython python-pytest))
(propagated-inputs
(list python-click
python-coloredlogs
python-numpy))
(home-page "https://github.com/brentp/cyvcf2/")
(synopsis "Fast vcf file parsing with Cython and htslib")
(description "Cyvcf2 is a Cython wrapper around htslib built for fast
parsing of Variant Call Format (VCF) files.")
(license license:expat)))
(define-public python-decoupler-py
;; This latest commit fixes a bug in test_omnip.py.
(let ((commit "459b235348ddd9135217a3722d9dd1caa9a14ace")