dynamo-release
dynamo-release copied to clipboard
KeyError with running dynamics
Hello, I am very new to using this package and I am unable to run the dynamics function on my data because of a KeyError. I am not sure how to address this issue, I have pasted the error message below. Thanks!
File ~/Library/Python/3.10/lib/python/site-packages/dynamo/tools/dynamics.py:404, in dynamics(adata, filter_gene_mode, use_smoothed, assumption_mRNA, assumption_protein, model, est_method, NTR_vel, group, protein_names, concat_data, log_unnormalized, one_shot_method, fraction_for_deg, re_smooth, sanity_check, del_2nd_moments, cores, tkey, **est_kwargs)
389 if model.lower() == "stochastic" or use_smoothed:
390 moments(subset_adata)
391 (
392 U,
393 Ul,
394 S,
395 Sl,
396 P,
397 US,
398 U2,
399 S2,
400 t,
401 normalized,
402 ind_for_proteins,
403 assump_mRNA,
--> 404 ) = get_data_for_kin_params_estimation(
405 subset_adata,
406 has_splicing,
407 has_labeling,
...
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/anndata/_core/aligned_mapping.py:148, in AlignedActualMixin.__getitem__(self, key)
147 def __getitem__(self, key: str) -> V:
--> 148 return self._data[key]
KeyError: 'M_us'
Thanks @michelle-mantilla
This means that the M_us is not calculated. What is your input adata? Do you have spliced / unspliced layers or new and total RNA layers?
Thanks
Hello @Xiaojieqiu !
My input data is scRNA seq and TCR of CD4 cells. When I run the monocle recipe on my data, it returns back that no layers exist in my adata.
Thank you
Please consider generate unspliced/spliced RNA layers for your data using kb-python before running dynamo: https://github.com/pachterlab/kb_python
dynamo assumes you have such information --- otherwise it doesn't make sense for RNA velocity vector field analyses. we will also provide a new method that generates to datasets without splicing info etc. soon. Please check back in a few weeks.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days