theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
408 stars 103 forks source link

Recover_dynamics() seems to not work on AnnCollections #1191

Closed jwalewski closed 6 months ago

jwalewski commented 6 months ago

Calling recover_dynamics() on an AnnCollection fails as these objects do not have layers. Is there a workaround, or should the stochastic model be used instead?

In theory this should apply to all AnnCollections

Error output ```pytb Traceback (most recent call last): File "", line 361, in File "", line 354, in main File "", line 317, in recover_and_velocity File "/home/jw2894/.local/lib/python3.10/site-packages/scvelo/tools/dynamical_model.py", line 454, in recover_dynamics if "Ms" not in adata.layers.keys() or "Mu" not in adata.layers.keys(): AttributeError: 'AnnCollection' object has no attribute 'layers'```
Versions ```pytb ERROR: XMLRPC request failed [code: -32500] RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information. ```
WeilerP commented 6 months ago

According to the stack trace, the attribute "layers" is missing, i.e., there unspliced/spliced counts do not exist; the stochastic model will not work in this case either.