aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAlexis Simon <alexis.simon@runbox.com>2024-04-18 11:10:22 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-04-22 11:29:29 +0200
commit78d24b78d36a333576a7a32c03a191eff4e449f4 (patch)
tree2799eeefbcf2b4a48a433a52c0a8246adb6ccd74 /gnu
parent8e5186ca9f9ec9ceaa46cbd9faa9255ca3b1e463 (diff)
downloadguix-78d24b78d36a333576a7a32c03a191eff4e449f4.tar.gz
guix-78d24b78d36a333576a7a32c03a191eff4e449f4.zip
gnu: Add python-cyvcf2.
* gnu/packages/bioinformatics.scm (python-cyvcf2): New variable. Co-authored-by: Ricardo Wurmus <rekado@elephly.net> Change-Id: I0db07e7b5840f5c1f5c68512ffabb3d6b39ab95c
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index c2e9f209bc..1bc451715c 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -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")