From patchwork Mon Dec 12 14:27:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 45196 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E67FA27BBEB; Mon, 12 Dec 2022 14:28:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F2A6E27BBE9 for ; Mon, 12 Dec 2022 14:28:57 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4jmw-0005iJ-C8; Mon, 12 Dec 2022 09:28:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4jmn-0005Vh-RO for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4jmn-0006D5-K5 for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4jmn-0007V9-Fv for guix-patches@gnu.org; Mon, 12 Dec 2022 09:28:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60009] [PATCH 06/18] gnu: python-hicexplorer: Update to 3.7.2. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Dec 2022 14:28:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60009 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 60009@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 60009-submit@debbugs.gnu.org id=B60009.167085526528714 (code B ref 60009); Mon, 12 Dec 2022 14:28:05 +0000 Received: (at 60009) by debbugs.gnu.org; 12 Dec 2022 14:27:45 +0000 Received: from localhost ([127.0.0.1]:53275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4jmS-0007Sy-QH for submit@debbugs.gnu.org; Mon, 12 Dec 2022 09:27:45 -0500 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4jmP-0007Sk-Ae for 60009@debbugs.gnu.org; Mon, 12 Dec 2022 09:27:42 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1670855258; cv=none; d=zohomail.com; s=zohoarc; b=SEPhFlpNSSk8ASATm7kabG89WAixfvwLWk0BigLIcWVZEyNFl5uAWTEbs5vnj5y/Mfg2mbKXPwAb/8a+2PTdnoIFnns8QWREkE02rnSEadGVbEcPwX2kuyts8vbjCBJDHwLSFri3ZAZUXTjHANSV5yUFXxH0QYKrHOx1d3aHQnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670855258; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uSzwXnuuhz18/d01xuAGZkKjZ5VpOSJCIKTeC/wQzTg=; b=mCwtUbhaydUbwcXBe8veBHm21o5FAbyw/U/n5254a3xMxPo5qyt8eI3hL9NwO9aAVbod9pOA/5A5KvhOTEIPjiTD4JeyomZ+NB9WU9ZZdaD291k64M3iVSJoZYcv3KWCR+4XDBZtZuQ/UqIAxZdT3pBUohvCZu5dSaJ/VpZE+DY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670855258; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=uSzwXnuuhz18/d01xuAGZkKjZ5VpOSJCIKTeC/wQzTg=; b=Jolnf+Eu2+UB5PTSuzlQ/6zK+qTar0lKjorzu+/YTVgeUUamtLa61qDXtI5pBdXA qj2Zm1SYNImrsEseto3ZDfvA1mPvOBX3mJ8QL4gzWSuRCByY7+gXrV48oppC79ZN4pF 9b1m6pEVHol+wMxOfXQzcFHFlkHL0ztBJ4ajoqUA= Received: from localhost (48-111-142-46.pool.kielnet.net [46.142.111.48]) by mx.zohomail.com with SMTPS id 1670855256905546.081618334264; Mon, 12 Dec 2022 06:27:36 -0800 (PST) From: Ricardo Wurmus Date: Mon, 12 Dec 2022 15:27:04 +0100 Message-Id: <20221212142716.9460-6-rekado@elephly.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221212142716.9460-1-rekado@elephly.net> References: <87h6y03dkr.fsf@elephly.net> <20221212142716.9460-1-rekado@elephly.net> MIME-Version: 1.0 X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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