GuangyuWangLab2021 / cellDancer

Predict RNA velocity through deep learning
https://guangyuwanglab2021.github.io/cellDancer_website/
BSD 3-Clause "New" or "Revised" License
60 stars 11 forks source link

The plot of RNA velocity has no arrows #22

Open zcaiwei opened 8 months ago

zcaiwei commented 8 months ago

Hi, I'm having another problem when plotting RNA velocity. The following is my command:

cellDancer_df=cd.compute_cell_velocity(cellDancer_df=cellDancer_df, projection_neighbor_choice='gene', expression_scale='power10', projection_neighbor_size=5, speed_up=(100,100))
fig, ax = plt.subplots(figsize=(10,10))
cdplt.scatter_cell(ax,
                   cellDancer_df,
                   colors=color_dict,
                   alpha=0.5,
                   s=30,
                   velocity=True,
                   legend='on',
                   min_mass=15,
                   arrow_grid=(20,20),
                   )
ax.axis('off')
plt.show()

This is my plot of RNA velocity: RNA_velocity_without_arrows We can see the plot has no arrows. So I checked the velocity1 values of cellDancer_df, and I found some data rows(3268 rows × 17 columns) have values, the following are my data without NaN: nonan_plot

Can you tell me how to adjust the parameters to get the arrows in the RNA velocity plot?

xiao00su commented 8 months ago

try projection_neighbor_choice='embedding',

zcaiwei commented 8 months ago

Thanks for your reply! I used this command cellDancer_df=cd.compute_cell_velocity(cellDancer_df=cellDancer_df, projection_neighbor_choice='embedding', expression_scale='power10', projection_neighbor_size=5, speed_up=(100,100)) but the plot I got still has no arrows: RNA_velocity_plot_noarrows

Abclisy commented 8 months ago

Hello zcaiwei, thank you for reaching out! Is it possible for you to try to decrease the parameter min_mass when plotting? If you have any other questions, please feel free to contact us.

min_mass (optional, float (default: 2)) – Filter by using the isotropic gaussian kernel to display the arrow on grids. The lower the min_mass, the more arrows.

zcaiwei commented 8 months ago

Hello zcaiwei, thank you for reaching out! Is it possible for you to try to decrease the parameter min_mass when plotting? If you have any other questions, please feel free to contact us.

min_mass (optional, float (default: 2)) – Filter by using the isotropic gaussian kernel to display the arrow on grids. The lower the min_mass, the more arrows.

Thanks for your reply! I tried to lower the parameter min_ mass, for example, I set 2, 1, 0.1, 0.01, 0.001, but there are still no arrows in the cell velocity plot. Can you tell me what's wrong?

Abclisy commented 5 months ago

Hello, could you change it to 0 and see what happens? Thank you!