capital.pl.dtw

capital.pl.dtw(aligned_data, gene, alignment=None, col_pseudotime=None, data1_name='data1', data2_name='data2', ncols=2, widthspace=0.1, heightspace=0.3, fontsize=12, legend_fontsize=12, ticksize=12, linecolor='grey', dpi=600, show=True, save=False)

Plot the results of dynamic time warping. When plotting the result of cp.tl.dtw(multi_genes=True), pass “multi_genes” to argument gene.

Parameters:
  • aligned_data (CapitalData) – The data matrices containing the results of CAPTIAL.

  • gene (Union[str, list]) – Keys for annotations of genes.

  • alignment (Union[str, list, None], optional) – Keys for alignments to be plotted. If None, all alignments will be plotted, by default None.

  • col_pseudotime (str) – Specify name of the column which store user defined pseudotime in cdata.adata1.obs and cdata.adata2.obs. If None, it uses pseudotime calculated in cp.tl.dpt(). By default None.

  • data1_name (Optional[str], optional) – Text of data1’s legend, by default “data1”.

  • data2_name (Optional[str], optional) – Text of data2’s legend, by default “data2”.

  • ncols (int) – Number of panels per row, by default 2.

  • widthspace (float) – Width of space in the panels, by default 0.10.

  • heightspace (float) – Height of space in the panels, by default 0.30.

  • fontsize (float) – Font size of the title, by default 12.

  • legend_fontsize (float, optional) – Font size of the legend, by default 12.

  • ticksize (float, optional) – Tick size of the x-axis, by default 12.

  • linecolor (str) – Color of lines that connect the cells between data1 and data2.

  • show (bool,) – If True, show the figure. If False, return the figure, by default True.

  • save (Union[str, bool]) – If True or str, save the figure. If a path is specified as str, the figure is saved in the path, by default False.