spateo.tdr.models.models_migration.morphopath_model =================================================== .. py:module:: spateo.tdr.models.models_migration.morphopath_model Functions --------- .. autoapisummary:: spateo.tdr.models.models_migration.morphopath_model.construct_genesis_X spateo.tdr.models.models_migration.morphopath_model.construct_genesis spateo.tdr.models.models_migration.morphopath_model.construct_trajectory_X spateo.tdr.models.models_migration.morphopath_model.construct_trajectory Module Contents --------------- .. py:function:: construct_genesis_X(stages_X: List[numpy.ndarray], n_spacing: Optional[int] = None, key_added: str = 'genesis', label: Optional[Union[str, list, numpy.ndarray]] = None, color: Union[str, list, dict] = 'skyblue', alpha: Union[float, list, dict] = 1.0) -> Tuple[pyvista.MultiBlock, Optional[str]] Reconstruction of cell-level cell developmental change model based on the cell fate prediction results. Here we only need to enter the three-dimensional coordinates of the cells at different developmental stages. :param stages_X: The three-dimensional coordinates of the cells at different developmental stages. :param n_spacing: Subdivided into ``n_spacing`` time points between two periods. :param key_added: The key under which to add the labels. :param label: The label of cell developmental change model. If ``label == None``, the label will be automatically generated. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :returns: A MultiBlock contains cell models for all stages. plot_cmap: Recommended colormap parameter values for plotting. .. py:function:: construct_genesis(adata: anndata.AnnData, fate_key: str = 'fate_morpho', n_steps: int = 100, logspace: bool = False, t_end: Optional[Union[int, float]] = None, key_added: str = 'genesis', label: Optional[Union[str, list, numpy.ndarray]] = None, color: Union[str, list, dict] = 'skyblue', alpha: Union[float, list, dict] = 1.0) -> Tuple[pyvista.MultiBlock, Optional[str]] Reconstruction of cell-level cell developmental change model based on the cell fate prediction results. Here we only need to enter the three-dimensional coordinates of the cells at different developmental stages. :param adata: AnnData object that contains the fate prediction in the ``.uns`` attribute. :param fate_key: The key under which are the active fate information. :param n_steps: The number of times steps fate prediction will take. :param logspace: Whether or to sample time points linearly on log space. If not, the sorted unique set of all times points from all cell states' fate prediction will be used and then evenly sampled up to `n_steps` time points. :param t_end: The length of the time period from which to predict cell state forward or backward over time. :param key_added: The key under which to add the labels. :param label: The label of cell developmental change model. If ``label == None``, the label will be automatically generated. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :returns: A MultiBlock contains cell models for all stages. plot_cmap: Recommended colormap parameter values for plotting. .. py:function:: construct_trajectory_X(cells_states: Union[numpy.ndarray, List[numpy.ndarray]], init_states: Optional[numpy.ndarray] = None, n_sampling: Optional[Union[int, numpy.ndarray]] = None, sampling_method: str = 'trn', key_added: str = 'trajectory', label: Optional[Union[str, list, numpy.ndarray]] = None, tip_factor: Union[int, float] = 5, tip_radius: float = 0.2, trajectory_color: Union[str, list, dict] = 'gainsboro', tip_color: Union[str, list, dict] = 'orangered', alpha: Union[float, list, dict] = 1.0) -> Tuple[Any, Optional[str]] Reconstruction of cell developmental trajectory model. :param cells_states: Three-dimensional coordinates of all cells at all times points. :param init_states: Three-dimensional coordinates of all cells at the starting time point. :param n_sampling: n_sampling is the number of coordinates to keep after sampling. If there are too many coordinates in start_points, the generated arrows model will be too complex and unsightly, so sampling is used to reduce the number of coordinates. :param sampling_method: The method to sample data points, can be one of ``['trn', 'kmeans', 'random']``. :param key_added: The key under which to add the labels. :param label: The label of trajectory model. :param tip_factor: Scale factor applied to scaling the tips. :param tip_radius: Radius of the tips. :param trajectory_color: Color to use for plotting trajectory model. :param tip_color: Color to use for plotting tips. :param alpha: The opacity of the color to use for plotting model. :returns: 3D cell developmental trajectory model. plot_cmap: Recommended colormap parameter values for plotting. :rtype: trajectory_model .. py:function:: construct_trajectory(adata: anndata.AnnData, fate_key: str = 'fate_develop', n_sampling: Optional[Union[int, numpy.ndarray]] = None, sampling_method: str = 'trn', key_added: str = 'trajectory', label: Optional[Union[str, list, numpy.ndarray]] = None, tip_factor: Union[int, float] = 5, tip_radius: float = 0.2, trajectory_color: Union[str, list, dict] = 'gainsboro', tip_color: Union[str, list, dict] = 'orangered', alpha: float = 1.0) -> Tuple[Any, Optional[str]] Reconstruction of cell developmental trajectory model based on cell fate prediction. :param adata: AnnData object that contains the fate prediction in the ``.uns`` attribute. :param fate_key: The key under which are the active fate information. :param n_sampling: n_sampling is the number of coordinates to keep after sampling. If there are too many coordinates in start_points, the generated arrows model will be too complex and unsightly, so sampling is used to reduce the number of coordinates. :param sampling_method: The method to sample data points, can be one of ``['trn', 'kmeans', 'random']``. :param key_added: The key under which to add the labels. :param label: The label of trajectory model. :param tip_factor: Scale factor applied to scaling the tips. :param tip_radius: Radius of the tips. :param trajectory_color: Color to use for plotting trajectory model. :param tip_color: Color to use for plotting tips. :param alpha: The opacity of the color to use for plotting model. :returns: 3D cell developmental trajectory model. plot_cmap: Recommended colormap parameter values for plotting. :rtype: trajectory_model