pyVIA.plotting_via.animate_atlas

pyVIA.plotting_via.animate_atlas(hammerbundle_dict=None, via_object=None, linewidth_bundle=2, frame_interval=10, n_milestones=None, facecolor='white', cmap='plasma_r', extra_title_text='', size_scatter=1, alpha_scatter=0.2, saveto='/home/user/Trajectory/Datasets/animation_default.gif', time_series_labels=None, lineage_pathway=[], sc_labels_numeric=None, show_sc_embedding=False, sc_emb=None, sc_size_scatter=10, sc_alpha_scatter=0.2, n_intervals=50, n_repeat=2)[source]
Parameters:
  • ax – axis to plot on

  • hammer_bundle – hammerbundle object with coordinates of all the edges to draw

  • layout – coords of cluster nodes and optionally also contains the numeric value associated with each cluster (such as time-stamp) layout[[‘x’,’y’,’numeric label’]] sc/cluster/milestone level

  • CSM – cosine similarity matrix. cosine similarity between the RNA velocity between neighbors and the change in gene expression between these neighbors. Only used when available

  • velocity_weight – percentage weightage given to the RNA velocity based transition matrix

  • pt – cluster-level pseudotime

  • alpha_bundle – alpha when drawing lines

  • linewidth_bundle – linewidth of bundled lines

  • edge_color

  • frame_interval (int) – smaller number, faster refresh and video

  • facecolor (str) – default = white

  • headwidth_bundle – headwidth of arrows used in bundled edges

  • arrow_frequency – min dist between arrows (bundled edges otherwise have overcrowding of arrows)

  • show_direction – True will draw arrows along the lines to indicate direction

  • milestone_edges – pandas DataFrame milestone_edges[[‘source’,’target’]]

:param t_diff_factor scaling the average the time intervals (0.25 means that for each frame, the time is progressed by 0.25* mean_time_differernce_between adjacent times (only used when sc_labels_numeric are directly passed instead of using pseudotime) :type show_sc_embedding: bool :param show_sc_embedding: plot the single cell embedding under the edges :param sc_emb numpy array of single cell embedding (ncells x 2) :param sc_alpha_scatter, Alpha transparency value of points of single cells (1 is opaque, 0 is fully transparent) :param sc_size_scatter. size of scatter points of single cells :param n_repeat. number of times you repeat the whole process :return: axis with bundled edges plotted