capital.tl.dtw¶
- capital.tl.dtw(aligned_data, gene, alignment=None, multi_genes=False, col_pseudotime=None)¶
Calculate dynamic time warping for genes.
This requires that dpt() has been run for the specified alignments.
- Parameters:
aligned_data (CapitalData) – The data matrices containing the results of CAPTIAL.
gene (Union[str, list, np.ndarray]) – Genes for calculating dynamic time warping.
alignment (Union[str, list, None]) – Specify which alignment is used to calculate dynamic time warping. If None, it calculates dynamic time warping for all the alignments, by default None.
multi_genes (bool) – If True, compute dynamic time warping using all genes in argument gene and return matched cells in cdata.alignmnetdict[‘alignmentid’][‘multi_genes’]. If False, compute dynamic time warping for each gene. By default False.
col_pseudotime (str) – Specify name of the column which store user defined pseudotime in cdata.adata1.obs and cdata.adata2.obs. If None, it calculates dynamic time warping using pseudotime calculated in cp.tl.dpt(). By default None.