theislab / cellrank

CellRank: dynamics from multi-view single-cell data
https://cellrank.org
BSD 3-Clause "New" or "Revised" License
344 stars 46 forks source link

vk has no attribute plot_projection? #1111

Closed ziyangliu93 closed 1 year ago

ziyangliu93 commented 1 year ago

... Thank you for developing such a nice tool for unified cell fate inference. I try to follow your tutorial as shown here: https://cellrank.readthedocs.io/en/latest/notebooks/tutorials/kernels/200_rna_velocity.html

when I hit the line: vk.plot_projection(adata), an error occurred telling me that vk has no attribute plot_projection.

I just wonder if I did something wrong?

ziyangliu93 commented 1 year ago

and by the way, I used cell rank 2.0.0

ziyangliu93 commented 1 year ago

even if I reinstall the old version of cellrank==1.5.1, vk still can not find the plot_projection() attribute, but I can find compute_projection() attribute in vk, which, if run, will work normally and output the same verbosity message as what is shown in the tutorial: https://cellrank.readthedocs.io/en/latest/notebooks/tutorials/kernels/200_rna_velocity.html

aka, the following line:

Projecting transition matrix onto umap Adding adata.obsm['T_fwd_umap'] Finish (0:00:01)

Marius1311 commented 1 year ago

... Thank you for developing such a nice tool for unified cell fate inference. I try to follow your tutorial as shown here: https://cellrank.readthedocs.io/en/latest/notebooks/tutorials/kernels/200_rna_velocity.html

when I hit the line: vk.plot_projection(adata), an error occurred telling me that vk has no attribute plot_projection.

I just wonder if I did something wrong?

Hi @ziyangliu93, try not passing an AnnData object (i.e. just vk.plot_projection()), as in the tutorial, and explained in the API here: https://cellrank.readthedocs.io/en/latest/api/_autosummary/kernels/cellrank.kernels.VelocityKernel.html#cellrank.kernels.VelocityKernel.plot_projection

ziyangliu93 commented 1 year ago

Hi, @Marius1311 thank you for your quick reply, sorry to bother you. Just as you mentioned above, I did exactly as what is shown in the tutorial by direct invoking of vk.plot_projection() without passing any argument, but the same error occurred like this:


AttributeError Traceback (most recent call last) Cell In [504], line 1 ----> 1 vk.plot_projection()

AttributeError: 'VelocityKernel' object has no attribute 'plot_projection'

peterzhao1998 commented 1 year ago

Hi, @Marius1311 thank you for your quick reply, sorry to bother you. Just as you mentioned above, I did exactly as what is shown in the tutorial by direct invoking of vk.plot_projection() without passing any argument, but the same error occurred like this:

AttributeError Traceback (most recent call last) Cell In [504], line 1 ----> 1 vk.plot_projection()

AttributeError: 'VelocityKernel' object has no attribute 'plot_projection'

Hi

I met the same problem couple days ago. After I upgrade cellrank, the problem is gone. You can have a try.

best wishes

ziyangliu93 commented 1 year ago

Hi, @Marius1311 @peterzhao1998 , I solved this issue by reinstall cellrank==2.0.0, thank you for your help.

Marius1311 commented 1 year ago

Amazing, thanks for letting me know @peterzhao1998 @ziyangliu93