dynamo.pl.dynamics
- dynamo.pl.dynamics(adata, genes, unit='hours', log_unnormalized=True, y_log_scale=False, ci=None, ncols=None, figsize=None, dpi=None, boxwidth=None, barwidth=None, true_param_prefix=None, show_moms_fit=False, show_variance=True, show_kin_parameters=True, gene_order='column', font_size_scale=1, save_show_or_return='show', save_kwargs={})[source]
Plot the data and fitting of different metabolic labeling experiments.
Note that if non-smoothed data was used for kinetic fitting, you often won’t see boxplot but only the triangles for the mean values. This is because the raw data has a lot of dropouts, thus the median is outside of the whiskers of the boxplot and the boxplot is then not drawn by default.
- Parameters:
adata (
AnnData
) – an Annodata object.unit (
str
) – the unit of the labeling time, for example, hours or minutes. Defaults to “hours”.log_unnormalized (
bool
) – whether the data has logged value. Defaults to True.y_log_scale (
bool
) – whether to use log scale for y-axis. Defaults to False.ci (
Optional
[str
]) – the confidence interval to be drawn for the parameter fitting. Currently not used. Defaults to None.ncols (
Optional
[int
]) – the number of columns in the plot. Defaults to None.figsize (
Union
[List
[float
],Tuple
[float
,float
],None
]) – the size of the each panel in the figure. Defaults to None.dpi (
Optional
[float
]) – the resolution of the figure. Defaults to None.boxwidth (
Optional
[float
]) – the width of the box of the boxplot. Defaults to None.barwidth (
Optional
[float
]) – the width of the bar of the barplot. Defaults to None.true_param_prefix (
Optional
[str
]) – the prefix for the column names of true parameters in the .var attributes. Useful for the simulation data. Defaults to None.show_moms_fit (
bool
) – whether to show fitting curves associated with the stochastic models, only works for non-deterministic models. Defaults to False.show_variance (
bool
) – whether to add a boxplot to show the variance at each time point. Defaults to True.show_kin_parameters (
bool
) – whether to include the estimated kinetic parameter values on the plot. Defaults to True.gene_order (
Literal
['column'
,'row'
]) – the order of genes to present on the figure, either row-major or column major. Defaults to “column”.font_size_scale (
float
) – the scale factor of fonts. Defaults to 1.save_show_or_return (
Literal
['save'
,'show'
,'return'
]) – whether to save, show or return the figure. Defaults to “show”.save_kwargs (
dict
) –a dictionary that will be passed to the save_fig function. By default, it is an empty dictionary and the save_fig function will use the {
”path”: None, “prefix”: ‘dynamics’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True
} as its parameters. Otherwise, you can provide a dictionary that properly modify those keys according to your needs. Defaults to {}.
- Raises:
ValueError – the gene specified does not have fitted kinetic parameters.
- Return type:
- Returns:
None would be returned in default and the plotted metabolic fitting figure would be shown directly. If set save_show_or_return=’return’ as a kwarg, the axes of the plot would be returned.