me
/
guix
Archived
1
0
Fork 0

gnu: tadbit: Patch for compatibility with latest scipy.

* gnu/packages/bioinformatics.scm (tadbit)[arguments]: Add phase
'scipy-compatibility.

Change-Id: Ib25b9cde75f0505c347c4ff470e61f06fb162839
master
Ricardo Wurmus 2024-05-02 16:37:03 +02:00
parent 453b7a267b
commit 93a397f8b7
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 12 additions and 0 deletions

View File

@ -14137,6 +14137,18 @@ applications for tackling some common problems in a user-friendly way.")
(list
#:phases
#~(modify-phases %standard-phases
;; Scipy 1.12 no longer has binom_test or polyfit
(add-after 'unpack 'scipy-compatibility
(lambda _
(substitute* '("_pytadbit/modelling/imp_modelling.py"
"_pytadbit/modelling/restraints.py")
(("from scipy .*import polyfit")
"from numpy import polyfit"))
(substitute* "_pytadbit/mapping/restriction_enzymes.py"
(("from scipy.stats import binom_test")
"from scipy.stats import binomtest")
(("binom_test\\(pats[k]['count'], nreads, 0.25\\*\\*len\\(k\\), alternative='greater'\\)")
"binomtest(pats[k]['count'], nreads, 0.25**len(k), alternative='greater').pval"))))
(add-after 'unpack 'fix-problems-with-setup.py
(lambda _
(substitute* "src/test/Makefile"