celldancer.compute_cell_velocity

celldancer.compute_cell_velocity(cellDancer_df, gene_list=None, speed_up=(60, 60), expression_scale=None, projection_neighbor_size=200, projection_neighbor_choice='embedding')

Project the RNA velocity onto the embedding space.

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

  • gene_list (optional, list (default: None)) – Genes selected to calculate the cell velocity. None if all genes in the cellDancer_df are to be used.

  • speed_up (optional, tuple (default: (60,60))) – Speed up by giving the sampling grid to downsample cells. None if all cells are used to compute cell velocity.

  • expression_scale (optional, str (default: None)) – None if no expression scale is to be used. ‘power10’ if the 10th power is been used to scale spliced and unspliced reads.

  • projection_neighbor_size (optional, int (default: ‘200’)) – The number of neighboring cells used for the transition probability matrix for one cell.

  • projection_neighbor_choice (optional, str (default: ‘embedding’)) – ‘embedding’ if using the embedding space to obtain the neighbors. ‘gene’ if using the spliced reads of all genes to obtain the neighbors.

Returns

cellDancer_df – The updated cellDancer_df with additional columns [‘velocity1’, ‘velocity2’].

Return type

pandas.DataFrame