pseudodynamics.plotting_fns.density_plot¶
Functions
|
cell type proportion |
|
|
|
|
|
|
|
s : cellstate coordinates, [n_grid**2, 2] train_DS : reader.MeshGrid_logDS classs |
|
train_DS : reader.HigDim_AnnDS classs save_path : str, a path ends with .gif |
|
|
|
|
|
A very basic functions plotting cellular attribute in the umap and stratified by time |
- pseudodynamics.plotting_fns.density_plot.celltype_proportion(p_celltype_melt, timepoints, cm_celltype, ct_key, density_key='value', x_lim=None)[source]¶
cell type proportion
- pseudodynamics.plotting_fns.density_plot.resampling_animation_meshgrid(s, train_DS, save_path)[source]¶
s : cellstate coordinates, [n_grid**2, 2] train_DS : reader.MeshGrid_logDS classs
- pseudodynamics.plotting_fns.density_plot.resampling_animation_umap(train_DS, save_path)[source]¶
train_DS : reader.HigDim_AnnDS classs save_path : str, a path ends with .gif
- pseudodynamics.plotting_fns.density_plot.umap_by_time(attribute, anndata, timepoints=[3, 7, 12, 27, 49, 76, 112, 161, 269], time_mask=True, subplot_kws=None, cell_of_t=True, umap_kws=None)[source]¶
A very basic functions plotting cellular attribute in the umap and stratified by time
- Parameters:
attribute (str or callable, a function of time or a obs_key of the anndata)
anndata (anndata)
time_mask (bool or str, default to True. If bool, only visualize cells of each timepoint (True) or show all cells in each panel (False). If str, use the given obs key for timepoint selection.)
timepoints (iterable, list of real-time , like the number of columns)
- Returns:
matplotlb figure and axes
Example
>>> u_b = DataSet.u_b >>> adata = DataSet.adata >>> for i, t in enumerate(DataSet.popD['t']): adata.obs[f'Day{t}_u'] = u_b[i] >>> # use a lambda function as attributes to plot >>> PINN.pl.umap_by_time(lambda x: f'Day{x}_u', adata, DataSet.popD['t']);