vscentrum / vsc-software-stack

Central repository of easyconfigs used in the software installations on VSC clusters.
2 stars 6 forks source link

HTSplotter #433

Open laraPPr opened 1 month ago

laraPPr commented 1 month ago
laraPPr commented 1 month ago

For this request I had simply installed the exhisting easyconfig. There is however an incompatibility between SciPy and HTSplotter which the user ran into. The scipy is expecteing and new argument confidence that was added in version 1.9.0 of SciPy.

This causes the following error:

TypeError: rv_generic_interval() missing 1 required positional argument: 'confidence'

The weird part is that the SciPy of foss/2022b should also be to new but their she does not encounter the error.

pavelToman commented 3 weeks ago

What I have to do to get this error? For latest HTSplotter-2.11 there is scipy==1.6.2 in requirements.txt

laraPPr commented 3 weeks ago

These are the commands that the user is using.

cd /data/gent/gvo000/gvo00027/vsc46055
module load HTSplotter/2.11-foss-2023a
python3
import HTSplotter as HTSP
hts = HTSP.Analyser()
hts.execute_from_file("input-file-combination.txt")
boegel commented 2 weeks ago

Looks like a small patch will be needed to fix that problem:

--- /apps/gent/RHEL8/zen2-ib/software/HTSplotter/2.11-foss-2023a/lib/python3.11/site-packages/HTSplotter/save_hdf5brfiles.py    2024-09-26 18:19:12.714984000 +0200
+++ /tmp/save_hdf5brfiles.py    2024-11-07 10:54:48.343503657 +0100
@@ -264,7 +264,7 @@
         # calculate 95 % CI
         df = len(mean_list) - 1
         alpha = 1 - 0.95
-        inter = (stats.t.interval(alpha=0.95, df=len(aux_list)-1, loc=mean_list,
+        inter = (stats.t.interval(confidence=0.95, df=len(aux_list)-1, loc=mean_list,
                                   scale=stats.sem(aux_list)))
         confinterval.append(np.squeeze([entry for entry in inter]))

see also https://github.com/KatherLab/marugoto/issues/14

See also scipy release notes (https://docs.scipy.org/doc/scipy/release/1.9.0-notes.html#deprecated-features):

Similarly, use of the distribution interval method with keyword arguments alpha is deprecated. Keyword alpha is replaced with keyword confidence.
PetrKralCZ commented 1 week ago