spateo.tdr.models.models_individual.point_clouds ================================================ .. py:module:: spateo.tdr.models.models_individual.point_clouds Functions --------- .. autoapisummary:: spateo.tdr.models.models_individual.point_clouds.construct_pc Module Contents --------------- .. py:function:: construct_pc(adata: anndata.AnnData, layer: str = 'X', spatial_key: str = 'spatial', groupby: Union[str, tuple] = None, key_added: str = 'groups', mask: Union[str, int, float, list] = None, colormap: Union[str, list, dict] = 'rainbow', alphamap: Union[float, list, dict] = 1.0) -> Tuple[pyvista.PolyData, Optional[str]] Construct a point cloud model based on 3D coordinate information. :param adata: AnnData object. :param layer: If ``'X'``, uses ``.X``, otherwise uses the representation given by ``.layers[layer]``. :param spatial_key: The key in ``.obsm`` that corresponds to the spatial coordinate of each bucket. :param groupby: The key that stores clustering or annotation information in ``.obs``, a gene name or a list of gene names in ``.var``. :param key_added: The key under which to add the labels. :param mask: The part that you don't want to be displayed. :param colormap: Colors to use for plotting pc. The default colormap is ``'rainbow'``. :param alphamap: The opacity of the colors to use for plotting pc. The default alphamap is ``1.0``. :returns: A point cloud, which contains the following properties: ``pc.point_data[key_added]``, the ``groupby`` information. ``pc.point_data[f'{key_added}_rgba']``, the rgba colors of the ``groupby`` information. ``pc.point_data['obs_index']``, the obs_index of each coordinate in the original adata. plot_cmap: Recommended colormap parameter values for plotting. :rtype: pc