celldancer.cdplt.scatter_cell

celldancer.cdplt.scatter_cell(ax, cellDancer_df, colors=None, custom_xlim=None, custom_ylim=None, vmin=None, vmax=None, alpha=0.5, s=5, legend_marker_size=5, gene=None, velocity=False, legend='off', colorbar='on', min_mass=2, arrow_grid=(30, 30))

Plot the RNA velocity on the embedding space; or plot the kinetic parameters (‘alpha’, ‘beta’, ‘gamma’, ‘splice’, ‘unsplice’, or ‘pseudotime’) of one gene on the embedding space.

Parameters
  • ax (ax) – ax of plt.subplots()

  • cellDancer_df (pandas.DataFrame) – Dataframe of velocity estimation, cell velocity, and pseudotime results. Columns=[‘cellIndex’, ‘gene_name’, ‘unsplice’, ‘splice’, ‘unsplice_predict’, ‘splice_predict’, ‘alpha’, ‘beta’, ‘gamma’, ‘loss’, ‘cellID’, ‘clusters’, ‘embedding1’, ‘embedding2’, ‘velocity1’, ‘velocity2’, ‘pseudotime’]

  • colors (list, dict, or str) – When the input is a list: build a colormap dictionary for a list of cell type; When the input is a dictionary: it is the customized color map dictionary of each cell type; When the input is a str: one of {‘alpha’, ‘beta’, ‘gamma’, ‘splice’, ‘unsplice’, ‘pseudotime’} is used as input.

  • custom_xlim (optional, float (default: None)) – Set the x limit of the current axes.

  • custom_ylim (optional, float (default: None)) – Set the y limit of the current axes.

  • vmin (optional, float (default: None)) – Set the minimum color limit of the current image.

  • vmax (optional, float (default: None)) – Set the maximum color limit of the current image.

  • alpha (optional, float (default: 0.5)) – The alpha blending value, between 0 (transparent) and 1 (opaque).

  • s (optional, float (default: 5)) – The marker size.

  • legend_marker_size (optional, float (default: 5)) – The lengend marker size.

  • gene (optional, str (default: None)) – Gene name for plotting.

  • velocity (optional, bool (default: False)) – True if plot velocity.

  • legend (optional, str (default: ‘off’)) – ‘off’ if the color map of cell legend is not plotted. ‘only’ if only plot the cell type legend.

  • colorbar (optional, str (default: ‘on’)) – ‘on’ if the colorbar of the plot of alpha, beta, gamma, splice, or unsplice is to be shown. ‘off’ if the colorbar is to be not shown.

  • 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.

  • arrow_grid (optional, tuple (default: (30,30))) – The sparsity of the grids of velocity arrows. The larger, the more compact, and more arrows will be shown.

Returns

ax

Return type

matplotlib.axes.Axes