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

Question about metabolic labeling analysis #1208

Closed
mingjianPeng opened this issue Jul 6, 2024 · 6 comments
Closed

Question about metabolic labeling analysis #1208

mingjianPeng opened this issue Jul 6, 2024 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@mingjianPeng
Copy link

...
Dear Developer, Hi, I noticed that CellRank 2 already supports the analysis of metabolic labeling data, I would like to know if there is a tutorial or a notebook about metabolic labeling?Looking forward to your reply, thanks!

@mingjianPeng mingjianPeng added the question Further information is requested label Jul 6, 2024
@WeilerP
Copy link
Member

WeilerP commented Jul 6, 2024

Hi @mingjianPeng, sorry, there isn't a dedicated tutorial yet, but you can follow the reproducibility notebooks for CellRank 2. This and this notebook should be what you are looking for.

@WeilerP WeilerP closed this as completed Jul 6, 2024
@Marius1311
Copy link
Collaborator

for now, I think we could just link to the reproducibility repo from our docs I suppose @WeilerP

@mingjianPeng
Copy link
Author

Hi, @WeilerP ,Thank you very much for your notebook, which is very helpful to me, but I found a small problem when I tried to reproduce the Parameter inference in this notebook.:

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,
    n_jobs=N_JOBS,
)

Running the above code will prompt:

TypeError: get_parameters() missing 1 required positional argument: 'x0'

The prompt is missing a parameter x0, can you help to see what is the reason?thanks.

@WeilerP
Copy link
Member

WeilerP commented Jul 10, 2024

Sorry about that! You can simply pass x0=None or specify custom initial guesses for the parameters.

@mingjianPeng
Copy link
Author

Sorry about that! You can simply pass x0=None or specify custom initial guesses for the parameters.

Thank you for replying, yes, I tried x0 = None before, but there are still some problems :

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,
    n_jobs=N_JOBS,x0=None
)

_RemoteTraceback: 
Traceback (most recent call last):
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/joblib/parallel.py", line 598, in __call__
    return [func(*args, **kwargs)
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/joblib/parallel.py", line 598, in <listcomp>
    return [func(*args, **kwargs)
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/scvelo/inference/_metabolic_labeling.py", line 446, in _fit
    _counts = get_counts(
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/lib/python3.10/site-packages/scvelo/inference/_metabolic_labeling.py", line 308, in get_counts
    for idx, val in neighbors.iteritems()
  File "/home/mingjian/miniconda3/envs/cellrank_2.0.3/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'

@WeilerP
Copy link
Member

WeilerP commented Jul 11, 2024

That seems to be Pandas related. You can either install an earlier version - I haven't tried which one works - or wait for this PR to be merged and install scvelo from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants