From 12af58e7f29c5a96888ecba7d264669940f1f259 Mon Sep 17 00:00:00 2001 Message-ID: <12af58e7f29c5a96888ecba7d264669940f1f259.1713431532.git.rekado@elephly.net> From: Alexis Simon Date: Thu, 18 Apr 2024 11:10:22 +0200 Subject: [PATCH] gnu: Add python-cyvcf2. * gnu/packages/bioinformatics.scm (python-cyvcf2): New variable. Co-authored-by: Ricardo Wurmus Change-Id: I0db07e7b5840f5c1f5c68512ffabb3d6b39ab95c --- gnu/packages/bioinformatics.scm | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 448ea5d6de..d2e0656435 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2022, 2023 Navid Afkhami ;;; Copyright © 2022 Antero Mejr +;;; Copyright © 2024 Alexis Simon ;;; ;;; This file is part of GNU Guix. ;;; @@ -1916,6 +1917,58 @@ (define-public python-cmseq 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") base-commit: 7bed290fdfd830d690daf065de6d2ecab73309d9 prerequisite-patch-id: 5da8ef187becff2c53ea5f2031e8825db623eb65 prerequisite-patch-id: 13be25d244e0bf4742f2713c79b657a10206fd4a prerequisite-patch-id: 5eac5ecb9efd0643ee72851a87db05636faadb22 prerequisite-patch-id: c991e73ae60aab13d5b364946213cd75acff1787 prerequisite-patch-id: 88eb87c18d5e09956462a19515d2efb22d508cb4 prerequisite-patch-id: 6af49e118b9dbcc75d410d97c1a6f6e13d81bafe prerequisite-patch-id: 5444dc17e9de17cdd39e24c969589e5a94488076 prerequisite-patch-id: b3e368fe34327e828bc15d07383f9adf2e54102a prerequisite-patch-id: 1cbd95e12fd254f4d301786938e3734106949d1e prerequisite-patch-id: fc39a6a4a400c1d4b094cd1d3029ecfbe2f70e6d prerequisite-patch-id: 02cc7b0f2140f6342ed1d32a1f09cd7b2e61d2dd prerequisite-patch-id: b0c59b60fcda7ce3c4b76a2f679db0403ac4b1a5 prerequisite-patch-id: 2104d5a932eeb3def4e438643469c97f8d5703ac prerequisite-patch-id: 98982539329a10f4947ae1e412b9543ad15fdc3d prerequisite-patch-id: 577d37113f5124f1bfc50df84021190ed7d75edf prerequisite-patch-id: e049fd1dac3aac5fc727237642b6d385fd6bf33f prerequisite-patch-id: 98608c3b9c9f927167b0aad70567e6ee42fef7e5 prerequisite-patch-id: 4627ef56075e71c4eeb975c4a26ee1e749ee69b0 prerequisite-patch-id: e43d1ce95f721374308a3f05dc436e801e96cf37 prerequisite-patch-id: 51c0cfd16f8214e059d05a8576842f902fced7c4 prerequisite-patch-id: 5bb19f2748c376544fc69aafb74e2c5f192e5426 prerequisite-patch-id: 894cce561d9bdddf0c81d80b419544cdd2d8142b prerequisite-patch-id: aeca519cc08fb04843001e32fa8b69eb2b082548 prerequisite-patch-id: 5e9a637f0716105f3d00d44d1d8c24436f5cbb4f prerequisite-patch-id: e5bf09d839ad19c3d13a81f3a26751663f8766c0 prerequisite-patch-id: eb002e03793d80ee3e13a6f03340bd107ec3a3ea prerequisite-patch-id: d9c2389f4ec6e9899d5456853cb40fa2be1cc22d -- 2.41.0