cellDancer icon indicating copy to clipboard operation
cellDancer copied to clipboard

The plot of RNA velocity has no arrows

Open zcaiwei opened this issue 2 years ago • 5 comments

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?

zcaiwei avatar Dec 22 '23 07:12 zcaiwei

try projection_neighbor_choice='embedding',

xiao00su avatar Dec 23 '23 02:12 xiao00su

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

zcaiwei avatar Dec 24 '23 08:12 zcaiwei

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.

Abclisy avatar Jan 02 '24 16:01 Abclisy

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?

zcaiwei avatar Jan 03 '24 01:01 zcaiwei

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

Abclisy avatar Mar 15 '24 19:03 Abclisy