capital.pl.gene_expression_trend

capital.pl.gene_expression_trend(aligned_data, gene, alignment=None, col_pseudotime=None, outliers=[100, 0], polyfit_dimension=3, switch_psedotime=False, multi_genes=True, data1_name='data1', data2_name='data2', data1_color='tomato', data2_color='lightskyblue', data1_line_color='red', data2_line_color='blue', ncols=2, widthspace=0.5, heightspace=0.3, fontsize=12, legend_fontsize=12, ticksize=12, dpi=600, show=True, save=False)

Plot gene expression trend.

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.

  • outliers (list) – Outliers for gene expression, by default [100, 0].

  • polyfit_dimension (int) – Degree of the fitting polynomial, by default 3.

  • switch_psedotime (bool, optional) – If False, data1’s pseudotime is used to plot two expression trends. If True, switch it to data2’s pseudotime, by default False.

  • multi_genes (bool) – If True, figures are plotted using the cell-cell match of cp.tl.dtw(multi_genes=True), by default False.

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

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

  • data1_color (str) – Color of data1 scatter plot, by default “tomato”.

  • data2_color (str) – Color of data2 scatter plot, by default “lightskyblue”.

  • data1_line_color (str) – Color of data1 line that are calculated using polynomial curve fitting, by default “red”.

  • data2_line_color (str) – Color of data2 line that are calculated using polynomial curve fitting, by default “blue”.

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

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

  • 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 axes, by default 12.

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