Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metabolic labeling inference fails with latest Pandas #1261

Closed
WeilerP opened this issue Jul 11, 2024 · 0 comments · Fixed by #1262
Closed

Metabolic labeling inference fails with latest Pandas #1261

WeilerP opened this issue Jul 11, 2024 · 0 comments · Fixed by #1262
Labels
bug Something isn't working

Comments

@WeilerP
Copy link
Member

WeilerP commented Jul 11, 2024

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
@WeilerP WeilerP added the bug Something isn't working label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant