guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add python-whatshap.


From: guix-commits
Subject: branch master updated: gnu: Add python-whatshap.
Date: Wed, 20 Nov 2024 16:00:04 -0500

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new d5eab53a72 gnu: Add python-whatshap.
d5eab53a72 is described below

commit d5eab53a727a2390f963dc185d4045b8c9cca86a
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Nov 20 21:57:48 2024 +0100

    gnu: Add python-whatshap.
    
    * gnu/packages/bioinformatics.scm (python-whatshap): New variable.
    
    Change-Id: I42281932acb981a7500ef90b5700e7480b41dffe
---
 gnu/packages/bioinformatics.scm | 69 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f84306b6b9..27b7d3f5c8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3648,6 +3648,75 @@ alignments and perform the following operations:
 files.")
     (license license:expat)))
 
+(define-public python-whatshap
+  (let ((revision "0")
+        (commit "5722d69404532d3172758acd04e77fce734711c7")
+        (base-version "2.3"))
+    (package
+      (name "python-whatshap")
+      (version (git-version base-version revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/whatshap/whatshap";)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1f9jgwb2kzhn190lxzhc14ji4flmrrdqh39d0g42qzvr1i19yv7p"))))
+      (build-system pyproject-build-system)
+      (arguments
+       (list
+        #:test-flags
+        '(list "-k"
+               (string-append
+                ;; We have no solver for pulp.
+                "not test_blockcut_sensitivities3 "
+                "and not test_get_optimal_permutations2 "
+                ;; Unknown error with the test file.
+                "and not test_vcf_with_missing_headers "
+                ;; Missing test file.
+                "and not test_matrix"))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'pretend-version
+              (lambda _
+                (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$base-version)))
+            (replace 'check
+              (lambda* (#:key tests? test-flags #:allow-other-keys)
+                (when tests?
+                  ;; Step out of source dir so python does not import from CWD.
+                  (let ((tests (string-append (getcwd) "/tests")))
+                    (with-directory-excursion "/tmp"
+                      (setenv "HOME" "/tmp")
+                      ;; Test data files are looked up relative to the current
+                      ;; directory.
+                      (mkdir-p "tests/")
+                      (copy-recursively (string-append tests "/data")
+                                        "tests/data")
+                      (apply invoke "pytest" "-vv" tests test-flags)))))))))
+      (propagated-inputs (list python-biopython
+                               python-matplotlib
+                               python-networkx
+                               python-pulp
+                               python-pyfaidx
+                               python-scipy
+                               python-xopen))
+      (native-inputs (list python-cython
+                           python-pytest
+                           python-pysam
+                           python-setuptools
+                           python-setuptools-scm
+                           python-sphinx
+                           python-sphinx-issues))
+      (home-page "https://whatshap.readthedocs.io/";)
+      (synopsis "Read-based phasing of genomic variants")
+      (description
+       "WhatsHap is software for phasing genomic variants using DNA sequencing
+reads, also called read-based phasing or haplotype assembly.  It is especially
+suitable for long reads, but works also well with short reads.")
+      (license license:expat))))
+
 (define-public bioperl-minimal
   (package
     (name "bioperl-minimal")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]