scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.9k stars 597 forks source link

sc.pp.regress_out() trouble importing _centered from scipy.signal.signaltools #2137

Open johnjeang opened 2 years ago

johnjeang commented 2 years ago

Hello,

This may be a problem outside the realm of scanpy functionality, but I thought it best to bring up in case it is relevant or in case anyone here has seen something before while trying to use scanpy. It looks like I can having trouble importing a dependency of the sc.pp.regress() function. I don't think the data here is relevant, just something in my set up. I tried updating all the libraries so that everything is up to date. This problem just started occurring today (2/10/21) and had no issue yesterday, so I figure it was a change on the scanpy end that I didn't keep up with proprely.

sc.pp.regress_out(merged_adata, ['pct_counts_mt', 'pct_counts_rp'])

yields the following error

/broad/software/free/Linux/redhat_7_x86_64/pkgs/anaconda3_2020.07/lib/python3.8/site-packages/statsmodels/tsa/filters/filtertools.py in <module>
     16 import scipy.fftpack as fft
     17 from scipy import signal
---> 18 from scipy.signal.signaltools import _centered as trim_centered
     19 
     20 from statsmodels.tools.validation import array_like, PandasWrapper

ImportError: cannot import name '_centered' from 'scipy.signal.signaltools' (/home/unix/jjeang/.local/lib/python3.8/site-packages/scipy/signal/signaltools.py)

Versions

scanpy==1.6.0 anndata==0.7.8 umap==0.3.10 numpy==1.22.2 scipy==1.8.0 pandas==1.2.5 scikit-learn==0.22.2.post1 statsmodels==0.11.1 python-igraph==0.9.9 louvain==0.7.0 leidenalg==0.8.0
lorenaribeiro93 commented 2 years ago

Olá, estou encontrando o mesmo erro. Conseguiu solucionar?