unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 60009@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#60009] [PATCH 06/18] gnu: python-hicexplorer: Update to 3.7.2.
Date: Mon, 12 Dec 2022 15:27:04 +0100	[thread overview]
Message-ID: <20221212142716.9460-6-rekado@elephly.net> (raw)
In-Reply-To: <20221212142716.9460-1-rekado@elephly.net>

* gnu/packages/bioinformatics.scm (python-hicexplorer): Update to 3.7.2.
[build-system]: Use pyproject-build-system.
[arguments]: Use gexp; remove phase "loosen-up-requirements"; add test-flags
to skip some tests; add phase "remove-dependency-on-krbalancing" to remove a
dependency on an unlicensed package; add phase "fix-references"; add phase
"run-only-low-mem-tests".
[propagated-inputs]: Remove python-configparser and python-six; add
python-biopython, python-cleanlab-1, python-fit-nbinom, python-graphviz,
python-hic2cool, python-hicmatrix, python-hyperopt, python-imbalanced-learn,
python-ipykernel, python-psutil, python-pybedtools, python-pygenometracks,
python-scikit-learn, and python-tqdm.
[native-inputs]: Add graphviz.
---
 gnu/packages/bioinformatics.scm | 106 ++++++++++++++++++++++++++++----
 1 file changed, 94 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e6a8789ea6..ea33311a2c 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -13413,7 +13413,7 @@ (define-public python-hicmatrix
 (define-public python-hicexplorer
   (package
     (name "python-hicexplorer")
-    (version "2.1.4")
+    (version "3.7.2")
     (source
      (origin
        ;; The latest version is not available on Pypi.
@@ -13424,32 +13424,114 @@ (define-public python-hicexplorer
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0q5gpbzmrkvygqgw524q36b4nrivcmyi5v194vsx0qw7b3gcmq08"))))
-    (build-system python-build-system)
+         "1yavgxry38g326z10bclvdf8glmma05fxj5m73h15m1r2l9xmw3v"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'loosen-up-requirements
-           (lambda _
-             (substitute* "setup.py"
-               (("==") ">="))
-             #t)))))
+     (list
+      #:test-flags
+      '(list "hicexplorer/test/general/"
+             "--ignore" "hicexplorer/test/general/test_hicTADClassifier.py"
+             "--ignore" "hicexplorer/test/general/test_hicTrainTADClassifier.py"
+             "-k"
+             (string-append
+              ;; Unknown chromosome: ChrX
+              "not test_build_matrix_restrictionCutFile_two"
+              ;; fixture 'keepSelfLigation' not found
+              " and not test_build_matrix_restrictionCutFile_six"
+              ;; ValueError: object dtype is not supported by sparse matrices
+              " and not test_hic_transfer_obs_exp_perChromosome"
+
+              ;; No KR balancing available
+              " and not test_correct_matrix_KR_partial_cool"
+              " and not test_correct_matrix_KR_cool"
+              " and not test_correct_matrix_KR_H5"))
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; See https://github.com/deeptools/Knight-Ruiz-Matrix-balancing-algorithm/issues/23
+          (add-after 'unpack 'remove-dependency-on-krbalancing
+            (lambda _
+              (substitute* "hicexplorer/hicCorrectMatrix.py"
+                (("from krbalancing import.*") "")
+                (("( *)assert\\(args.correctionMethod == 'KR'\\)" m indent)
+                 (string-append m "\n"
+                                indent "log.error('krbalancing not available')\n"
+                                indent "exit(1)")))
+              (substitute* "setup.py"
+                (("\"krbalancing >= 0.0.5\",") ""))
+              (substitute* "requirements.txt"
+                (("krbalancing >= 0.0.5") ""))))
+          (add-after 'unpack 'fix-references
+            (lambda _
+              (let ((site (string-append #$output "/lib/python"
+                                         #$(version-major+minor
+                                            (package-version python))
+                                         "/site-packages")))
+                (substitute* "hicexplorer/lib/tadClassifier.py"
+                  (("model_location = site.getsitepackages\\(\\)\\[0\\]")
+                   (string-append "model_location = \"" site "\""))))
+              (substitute* "hicexplorer/hicFindRestSite.py"
+                (("subprocess.check_output\\(\\[\"cat\"")
+                 (string-append "subprocess.check_output([\""
+                                (which "cat") "\""))
+                (("cmd = 'sort -k1")
+                 (string-append "cmd = '" (which "sort") " -k1")))))
+          ;; The tests aim to detect available memory and run more tests when
+          ;; there is more available memory.  Let's run them deterministically
+          ;; instead and don't run any tests that require more than 1GB of
+          ;; RAM.
+          (add-after 'unpack 'run-only-low-mem-tests
+            (lambda _
+              (with-directory-excursion "hicexplorer/test"
+                (substitute* '("trivial_runs/test_hicBuildMatrix_trivial_runs_2.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_five.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_four.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_two_1.py"
+                               "trivial_runs/test_hicBuildMatrix_trivial_runs.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_two_3.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_three.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_two.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_two_2.py"
+                               "trivial_runs/test_hicAggregateContacts_trivial_runs_six.py"
+                               "general/test_hicDifferentialTAD.py"
+                               "general/test_hicDetectLoops.py"
+                               "general/test_hicPlotMatrix.py"
+                               "general/test_hicHyperoptDetectLoops.py"
+                               "general/test_hicCreateThresholdFile.py"
+                               "general/test_hicMergeDomains.py"
+                               "general/test_hicHyperoptDetectLoopsHiCCUPS.py"
+                               "general/test_hicAggregateContacts.py"
+                               "general/test_hicInterIntraTAD.py")
+                  (("^memory =.*") "memory = 1\n"))))))))
     (propagated-inputs
      (list python-biopython
-           python-configparser
+           python-cleanlab-1
            python-cooler
+           python-fit-nbinom
            python-future
+           python-graphviz
+           python-hic2cool
+           python-hicmatrix
+           python-hyperopt
+           python-imbalanced-learn
            python-intervaltree
+           python-ipykernel
            python-jinja2
            python-matplotlib
            python-numpy
            python-pandas
+           python-psutil
+           python-pybedtools
            python-pybigwig
+           python-pygenometracks
            python-pysam
+           python-scikit-learn
            python-scipy
-           python-six
            python-tables
+           python-tqdm
            python-unidecode))
+    (native-inputs
+     (list graphviz)) ;for hicexplorer/test/test_compute_function.py
     (home-page "https://hicexplorer.readthedocs.io")
     (synopsis "Process, analyze and visualize Hi-C data")
     (description
-- 
2.36.1





  parent reply	other threads:[~2022-12-12 14:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 14:22 [bug#60009] Update python-graphviz and other Python updates Ricardo Wurmus
2022-12-12 14:26 ` [bug#60009] [PATCH 01/18] gnu: python-graphviz: Update to 0.20.1 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 02/18] gnu: python-hyperopt: Update to 0.2.7 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 03/18] gnu: python-biopython: Update to 1.80 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 04/18] gnu: python-hicmatrix: Update to 16 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 05/18] gnu: python-pygenometracks: Update to 3.5 Ricardo Wurmus
2022-12-12 14:27   ` Ricardo Wurmus [this message]
2022-12-12 14:27   ` [bug#60009] [PATCH 07/18] gnu: python-dna-features-viewer: Update to 3.1.1 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 08/18] gnu: python-bokeh: Skip failing PIL test Ricardo Wurmus
2022-12-12 19:10     ` zimoun
2022-12-12 20:09       ` Ricardo Wurmus
2022-12-12 20:37         ` Simon Tournier
2022-12-12 23:06           ` Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 09/18] gnu: sqlite-next: Update to 3.40.0 Ricardo Wurmus
2022-12-12 19:08     ` zimoun
2022-12-12 20:11       ` Ricardo Wurmus
2022-12-12 20:56         ` Simon Tournier
2022-12-12 23:02           ` Ricardo Wurmus
2022-12-12 23:21             ` Simon Tournier
2022-12-12 23:26               ` bug#60009: " Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 10/18] gnu: python-apsw: Update to 3.40.0.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 11/18] gnu: python-cgatcore: Update to 0.6.14 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 12/18] gnu: python-flask-restful: Update to 0.3.9 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 13/18] gnu: python-marshmallow: Update to 3.19.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 14/18] gnu: python-apispec: Update to 6.0.2 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 15/18] gnu: python-pyjwt: Update to 2.6.0 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 16/18] gnu: python-flasgger: Update to 0.9.5 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 17/18] gnu: seqmagick: Update to 0.8.4 Ricardo Wurmus
2022-12-12 14:27   ` [bug#60009] [PATCH 18/18] gnu: cnvkit: Update to 0.9.9 Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221212142716.9460-6-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=60009@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).