unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#71670] [PATCH 0/2] bioinformatics: Add python-muon
@ 2024-06-20  8:45 guix--- via Guix-patches via
  2024-06-20  8:50 ` [bug#71670] [PATCH 1/2] bioinformatics: Add python-mofapy2 guix--- via Guix-patches via
  2024-06-20  8:51 ` [bug#71670] [PATCH 2/2] bioinformatics: Add python-muon guix--- via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: guix--- via Guix-patches via @ 2024-06-20  8:45 UTC (permalink / raw)
  To: 71670; +Cc: tanguy, me, lars, Ricardo Wurmus, jgart, marius, sharlatanus

I am adding the packages python-muon and python-mofapy2 (as a muon
dependency).

Muon is a multi-omics analysis framework and is part of the scverse.

I had to modify a couple of tests slightly (explained in the comments).

Marco Baggio (2):
  bioinformatics: Add python-mofapy2
  bioinformatics: Add python-muon

 gnu/packages/bioinformatics.scm | 93 +++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)


base-commit: e32e3d0a03dc17c4c54a91aad053c9036998b601
--
2.45.1






^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#71670] [PATCH 1/2] bioinformatics: Add python-mofapy2
  2024-06-20  8:45 [bug#71670] [PATCH 0/2] bioinformatics: Add python-muon guix--- via Guix-patches via
@ 2024-06-20  8:50 ` guix--- via Guix-patches via
  2024-06-20  8:51 ` [bug#71670] [PATCH 2/2] bioinformatics: Add python-muon guix--- via Guix-patches via
  1 sibling, 0 replies; 4+ messages in thread
From: guix--- via Guix-patches via @ 2024-06-20  8:50 UTC (permalink / raw)
  To: 71670; +Cc: tanguy, me, lars, Ricardo Wurmus, jgart, marius, sharlatanus

Change-Id: Ide92878258511b3daf4e56d5faa94d190fdee62f
---
 gnu/packages/bioinformatics.scm | 38 +++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index cdda029809..37fa1727cb 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4443,6 +4443,44 @@ (define-public python-mudata
 omics data.")
     (license license:bsd-3)))
 
+(define-public python-mofapy2
+  (package
+    (name "python-mofapy2")
+    (version "0.7.1")
+    (source
+     (origin
+       ;; The tarball from PyPi doesn't include tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/bioFAM/mofapy2")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ahhnqk6gjrhyq286mrd5n7mxcv8l6040ffsawbjx9maqx8wbam0"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'disable-failing-tests
+            (lambda _
+              ;; cupy is an optional dependency, which
+              ;; itself has nonfree dependencies (CUDA)
+              (delete-file "mofapy2/notebooks/test_cupy.py"))))))
+    (propagated-inputs (list python-anndata
+                             python-pandas
+                             python-scipy
+                             python-numpy
+                             python-scikit-learn
+                             python-h5py))
+    (native-inputs (list python-poetry-core
+                         python-pytest))
+    (home-page "https:/biofam.github.io/MOFA2/")
+    (synopsis "Multi-omics factor analysis")
+    (description "Multi-omics factor analysis.")
+    (license license:lgpl3)))
+
 (define-public python-pyega3
   (deprecated-package "python-pyega3" python-ega-download-client))
 
-- 
2.45.1






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#71670] [PATCH 2/2] bioinformatics: Add python-muon
  2024-06-20  8:45 [bug#71670] [PATCH 0/2] bioinformatics: Add python-muon guix--- via Guix-patches via
  2024-06-20  8:50 ` [bug#71670] [PATCH 1/2] bioinformatics: Add python-mofapy2 guix--- via Guix-patches via
@ 2024-06-20  8:51 ` guix--- via Guix-patches via
  2024-07-01 14:21   ` bug#71670: " Ricardo Wurmus
  1 sibling, 1 reply; 4+ messages in thread
From: guix--- via Guix-patches via @ 2024-06-20  8:51 UTC (permalink / raw)
  To: 71670; +Cc: sharlatanus, me, lars, Ricardo Wurmus, jgart, marius, tanguy

Change-Id: I21431b089d1f404828b78d79124d96e7d36d5a2d
---
 gnu/packages/bioinformatics.scm | 55 +++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 37fa1727cb..b3fe67cae7 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -4481,6 +4481,61 @@ (define-public python-mofapy2
     (description "Multi-omics factor analysis.")
     (license license:lgpl3)))
 
+(define-public python-muon
+  (package
+    (name "python-muon")
+    (version "0.1.6")
+    (source
+     (origin
+       ;; The tarball from PyPi doesn't include tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/scverse/muon")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1kd3flgy41dc0sc71wfnirh8vk1psxgyjxkbx1zx9yskkh6anbgw"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      '(modify-phases %standard-phases
+         ;; Numba needs a writable dir to cache functions.
+         (add-before 'build 'set-numba-cache-dir
+           (lambda _
+             (setenv "NUMBA_CACHE_DIR" "/tmp")))
+         (add-before 'check 'disable-failing-tests
+           (lambda _
+             ;; even providing a random seed, scipy.sparse.rand
+             ;; produces inconsistent results across scipy versions
+             (substitute* "tests/test_atac_preproc.py"
+               (("^class TestTFIDFSparse.*" m)
+                (string-append "@unittest.skip(reason=\"\")\n" m))))))))
+    (propagated-inputs (list python-anndata
+                             python-h5py
+                             python-matplotlib
+                             python-mofapy2
+                             python-mudata
+                             python-numba
+                             python-numpy
+                             python-pandas
+                             python-protobuf
+                             python-pybedtools
+                             python-pysam
+                             python-scanpy
+                             python-scikit-learn
+                             python-seaborn
+                             python-tqdm
+                             python-umap-learn))
+    (native-inputs (list python-flit-core-bootstrap
+                         python-pytest
+                         python-pytest-flake8))
+    (home-page "https://github.com/scverse/muon")
+    (synopsis "Multimodal omics analysis framework")
+    (description "Multimodal omics analysis framework.")
+    (license license:bsd-3)))
+
 (define-public python-pyega3
   (deprecated-package "python-pyega3" python-ega-download-client))
 
-- 
2.45.1






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#71670: [PATCH 2/2] bioinformatics: Add python-muon
  2024-06-20  8:51 ` [bug#71670] [PATCH 2/2] bioinformatics: Add python-muon guix--- via Guix-patches via
@ 2024-07-01 14:21   ` Ricardo Wurmus
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2024-07-01 14:21 UTC (permalink / raw)
  To: guix; +Cc: tanguy, me, lars, jgart, marius, sharlatanus, 71670-done

guix@mawumag.com writes:

> +(define-public python-muon

Thank you for the patches!  I've applied them with minor changes.
(Commit ddce6b2303dc6064ca50b4fbd53389e50faa115d.)

-- 
Ricardo




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-01 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20  8:45 [bug#71670] [PATCH 0/2] bioinformatics: Add python-muon guix--- via Guix-patches via
2024-06-20  8:50 ` [bug#71670] [PATCH 1/2] bioinformatics: Add python-mofapy2 guix--- via Guix-patches via
2024-06-20  8:51 ` [bug#71670] [PATCH 2/2] bioinformatics: Add python-muon guix--- via Guix-patches via
2024-07-01 14:21   ` bug#71670: " Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).