theislab/scvelo

Metabolic labeling inference fails with latest Pandas

WeilerP opened this issue · 0 comments

The iteritems method has been removed in Pandas, causing the metabolic labeling inference to fail.

alpha, gamma, r0, success, opt_res = get_parameters(
    adata=adata,
    use_rep="labeled_smoothed",
    time_key="labeling_time",
    experiment_key="experiment",
    n_neighbors=n_neighbors,
    x0=None
)
Error output
_RemoteTraceback: 
Traceback (most recent call last):
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/joblib/parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/joblib/parallel.py", line 598, in <listcomp>
    return [func(*args, **kwargs)
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/scvelo/inference/_metabolic_labeling.py", line 446, in _fit
    _counts = get_counts(
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/scvelo/inference/_metabolic_labeling.py", line 308, in get_counts
    for idx, val in neighbors.iteritems()
  File "/miniconda3/envs/scvelo/lib/python3.10/site-packages/pandas/core/generic.py", line 6299, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'iteritems'
Versions
# paste the ouput of scv.logging.print_versions() here
pandas==2.0.3