### Install easy_vitessce with pip Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Install the easy_vitessce package. Requires Python 3.10 or greater. ```sh pip install easy_vitessce ``` -------------------------------- ### Create a heatmap with scanpy Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Loads the pbmc68k_reduced dataset and generates a heatmap using sc.pl.heatmap with groupby='bulk_labels' and a list of marker genes. This example is intended to be used with EasyVitessce to add interactivity. ```python adata = sc.datasets.pbmc68k_reduced() sc.pl.heatmap(adata, groupby="bulk_labels", var_names=['C1QA', 'PSAP', 'CD79A', 'CD79B', 'CST3', 'LYZ']) ``` -------------------------------- ### SpatialData object file structure (no Labels folder) Source: https://vitessce.github.io/easy_vitessce/index.html File structure of the SpatialData example above. It has Images, Points, Shapes, and Tables folders but no Labels folder, so pl.render_labels() will not display any data. ```text SpatialData object, with associated Zarr store: ├── Images │ └── 'rasterized': DataArray[cyx] (1, 522, 575) ├── Points │ └── 'single_molecule': DataFrame with shape: (, 3) (2D points) ├── Shapes │ ├── 'anatomical': GeoDataFrame shape: (6, 1) (2D shapes) │ └── 'cells': GeoDataFrame shape: (2389, 2) (2D shapes) └── Tables └── 'table': AnnData (2389, 268) ``` -------------------------------- ### Spatial plot with SpatialData-plot Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Create a spatial plot using SpatialData's mouse brain MERFISH dataset. spatialdata_filepath should lead to a .zarr file containing spatial data with an Images folder. Since the example data has no Labels folder, calling pl.render_labels() will not display any data. ```py sdata = sd.read_zarr(spatialdata_filepath) sdata.pl.render_images(element="rasterized").pl.render_shapes(element="cells", color="Acta2").pl.show() ``` -------------------------------- ### Pretty-print current configuration with config.pprint Source: https://vitessce.github.io/easy_vitessce/customization.html Import the Donfig-based `config` variable and call `pprint()` to display the current configuration in a readable format. ```python import easy_vitessce as ev # Pretty-print the current configuration ev.config.pprint() ``` -------------------------------- ### Register on-disk AnnData path with register_data_path Source: https://vitessce.github.io/easy_vitessce/customization.html Tell `easy_vitessce` that an AnnData object is already stored on-disk to avoid redundant writes. Provide the path to the `.zarr` or `.h5ad` file. ```python import easy_vitessce as ev ev.register_data_path(adata, '/path/to/my_object.adata.zarr') # or ev.register_data_path(adata, '/path/to/my_object.h5ad') ``` -------------------------------- ### SpatialData object file structure Source: https://vitessce.github.io/easy_vitessce/_sources/index.md File structure of the SpatialData object used in the spatial plot example. It shows the Images, Points, Shapes, and Tables folders, and notes the absence of a Labels folder. ```text SpatialData object, with associated Zarr store: ├── Images │ └── 'rasterized': DataArray[cyx] (1, 522, 575) ├── Points │ └── 'single_molecule': DataFrame with shape: (, 3) (2D points) ├── Shapes │ ├── 'anatomical': GeoDataFrame shape: (6, 1) (2D shapes) │ └── 'cells': GeoDataFrame shape: (2389, 2) (2D shapes) └── Tables └── 'table': AnnData (2389, 268) ``` -------------------------------- ### Configure scatterplot views with color, size, and linking (easy_vitessce.configure_plots) Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html The first block handles multiple colors (or a list of titles/sizes) by creating one scatterplot per color, linking each to an OBS_SETS or FEATURE_LIST view when the color is in adata.obs or adata.var, then linking zoom/pan, embedding type, radius, colormap range, and colormap across all scatterplots, and finally laying them out in a grid using hconcat/vconcat. The second block is the else branch for a single color or color=None: it creates one scatterplot, optionally adds OBS_SETS or FEATURE_LIST control views based on has_color_in_obs/has_color_in_var, and links the embedding type. ```python for color_i, color_val in enumerate(color): scatterplot_props = {} if type(title) == str and color_i == 0: scatterplot_props['title'] = title elif type(title) == list and len(color) == len(title): scatterplot_props['title'] = title[color_i] scatterplot_view = vc.add_view(vt.SCATTERPLOT, dataset=dataset).set_props(**scatterplot_props) scatterplot_views.append(scatterplot_view) if type(size) is list and len(size) == len(color): vc.link_views(scatterplot_views, ["embeddingObsRadiusMode", "embeddingObsRadius"], ["manual", size[color_i]] ) # Check if color[i] is in obs or var. if color_val in adata.obs.columns: if obs_sets_view is None: obs_sets_view = vc.add_view(vt.OBS_SETS, dataset=dataset) # TODO: simplify this once https://github.com/vitessce/vitessce/issues/2254 is addressed. group_name = color_val.capitalize() obs_set_categories = adata.obs[color_val].unique().tolist() obs_set_paths = [ [group_name, str(cat)] for cat in obs_set_categories ] vc.link_views([scatterplot_view, obs_sets_view], ["obsColorEncoding", "obsSetSelection", "obsSetExpansion"], ["cellSetSelection", obs_set_paths, [[group_name]]] ) elif color_val in adata.var.index: if feature_list_view is None: feature_list_view = vc.add_view(vt.FEATURE_LIST, dataset=dataset) vc.link_views([scatterplot_view, feature_list_view], ["featureSelection", "obsColorEncoding"], [[color_val], "geneSelection"] ) # Link the zoom/pan interactions across all scatterplot views. vc.link_views(scatterplot_views, ["embeddingZoom", "embeddingTargetX", "embeddingTargetY"], [None, None, None] ) # Other linkings that are common across all scatterplot views. vc.link_views(scatterplot_views, ["embeddingType"], [basis_name] ) if size is not None and type(size) is not list: vc.link_views(scatterplot_views, ["embeddingObsRadiusMode", "embeddingObsRadius"], ["manual", size] ) if vmin is not None or vmax is not None: vc.link_views(scatterplot_views, ["featureValueColormapRange"], [ [ vmin if vmin is not None else 0.0, vmax if vmax is not None else 1.0, ] ] ) if color_map is not None and color_map in ["viridis", "plasma", "jet", "greys"]: vc.link_views(scatterplot_views, ["featureValueColormap"], [color_map] ) # Layout the views. all_views = ( scatterplot_views + ([obs_sets_view] if obs_sets_view is not None else []) + ([feature_list_view] if feature_list_view is not None else []) ) rows_of_views = [] for view_i, view in enumerate(all_views): if view_i % ncols == 0: # Start a new row. rows_of_views.append([view]) else: rows_of_views[-1].append(view) # Combine rows. row_layouts = [hconcat(*row) for row in rows_of_views] vc.layout(vconcat(*row_layouts)) ``` ```python else: # Single color or color=None: single scatterplot view. scatterplot_props = {} if title is None else { 'title': title } scatterplot_view = vc.add_view(vt.SCATTERPLOT, dataset=dataset).set_props(**scatterplot_props) control_views = [] if has_color_in_obs: obs_sets_view = vc.add_view(vt.OBS_SETS, dataset=dataset) control_views.append(obs_sets_view) if has_color_in_var: feature_list_view = vc.add_view(vt.FEATURE_LIST, dataset=dataset) control_views.append(feature_list_view) # Link views. vc.link_views([scatterplot_view], ["embeddingType"], [basis_name] ) ``` -------------------------------- ### Enable or disable plots with configure_plots Source: https://vitessce.github.io/easy_vitessce/_sources/customization.md Use `configure_plots` to enable or disable specific plotting functions. Alternatively, use `enable_plots` or `disable_plots` for simpler toggling. The example shows enabling 'embedding' and disabling 'violin' and 'heatmap'. ```python import easy_vitessce as ev # Enable or disable particular plotting functions ev.configure_plots(enable_plots=["embedding"], disable_plots=["violin", "heatmap"]) # or ev.enable_plots(["embedding"]) # or ev.disable_plots(["violin", "heatmap"]) ``` -------------------------------- ### Choose widget display function with config.update Source: https://vitessce.github.io/easy_vitessce/customization.html Set `widget_function` to `'display'` to use `VitessceConfig.display` instead of the default `VitessceConfig.widget` for showing the widget. ```python import easy_vitessce as ev ev.config.update({ 'widget_function': 'display' }) ``` -------------------------------- ### Heatmap with sc.pl.heatmap Source: https://vitessce.github.io/easy_vitessce/index.html Create a heatmap using Easy Vitessce's heatmap function. ```python adata = sc.datasets.pbmc68k_reduced() sc.pl.heatmap(adata, groupby="bulk_labels", var_names=['C1QA', 'PSAP', 'CD79A', 'CD79B', 'CST3', 'LYZ']) ``` -------------------------------- ### Configure widget parameters with config.update or config.set Source: https://vitessce.github.io/easy_vitessce/customization.html Update the `widget` configuration to set parameters passed to `VitessceConfig.widget`. Use `config.update` or `config.set` with the same effect. ```python import easy_vitessce as ev ev.config.update({ 'widget': { 'js_dev_mode': True } }) # or ev.config.set({ 'widget': { 'js_dev_mode': True } }) ``` -------------------------------- ### Configure scatterplot view linking and layout Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html Configures view linking and layout for a scatterplot with optional controls. Applies size, colormap range, color encoding, and layout based on conditions. Requires variables like size, vmin, vmax, has_color_in_obs, has_color_in_var, color_map, and control_views to be defined. ```python if size is not None: vc.link_views([scatterplot_view], ["embeddingObsRadiusMode", "embeddingObsRadius"], ["manual", size] ) if vmin is not None or vmax is not None: vc.link_views([scatterplot_view], ["featureValueColormapRange"], [ [ vmin if vmin is not None else 0.0, vmax if vmax is not None else 1.0, ] ] ) if has_color_in_obs: vc.link_views([scatterplot_view, *control_views], ["obsColorEncoding"], ["cellSetSelection"] ) vc.link_views([obs_sets_view], ["obsSetExpansion"], [[[obs_set_names[0]]]] ) if has_color_in_var: vc.link_views([scatterplot_view, *control_views], ["featureSelection", "obsColorEncoding"], [[color[0]], "geneSelection"] ) if color_map is not None and color_map in ["viridis", "plasma", "jet", "greys"]: vc.link_views([scatterplot_view], ["featureValueColormap"], [color_map] ) # Layout views. if len(control_views) > 0: vc.layout(hconcat(scatterplot_view, vconcat(*control_views), split=[2, 1])) else: vc.layout(scatterplot_view) ``` -------------------------------- ### Access VitessceConfig from widget Source: https://vitessce.github.io/easy_vitessce/advanced.html Shows how to access the VitessceConfig instance from the `vw` variable, including the static config, its dictionary representation, and the live config. ```python # Access the configuration powering this widget instance. vw.config # or vw.config.to_dict(base_url="") # or, for "live" dynamically-updated config vw._config ``` -------------------------------- ### Register existing data path for AnnData Source: https://vitessce.github.io/easy_vitessce/_sources/customization.md Avoid redundant writing of AnnData objects by registering an existing on-disk path. Use `register_data_path` with either a `.zarr` or `.h5ad` path. ```python import easy_vitessce as ev ev.register_data_path(adata, '/path/to/my_object.adata.zarr') # or ev.register_data_path(adata, '/path/to/my_object.h5ad') ``` -------------------------------- ### heatmap(adata, var_names, groupby, *, gene_symbols=None, layer=None, swap_axes=False, vmin=None, vmax=None, **kwargs) Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html Creates an interactive heatmap using Vitessce. It takes an AnnData object and parameters to configure the heatmap display. ```APIDOC ## heatmap(adata, var_names, groupby, *, gene_symbols=None, layer=None, swap_axes=False, vmin=None, vmax=None, **kwargs) ### Description Creates an interactive heatmap using Vitessce. It takes an AnnData object and parameters to configure the heatmap display. ### Parameters - **adata** (AnnData) - Required - AnnData object. - **var_names** (list[str]) - Required - List of genes. - **groupby** (str) - Required - Category group, a column in adata.obs. - **gene_symbols** (str) - Optional - Key in adata.var to use for gene symbols, if different from adata.var.index. - **layer** (str) - Optional - Layer in AnnData to use for expression values. Defaults to None, which uses adata.X. - **swap_axes** (bool) - Optional - If True, transpose the heatmap. Defaults to False. - **vmin** (float) - Optional - Minimum value for color map scaling. - **vmax** (float) - Optional - Maximum value for color map scaling. - **color_map** (str) - Optional - Color map (viridis, plasma, jet). Defaults to viridis. ### Returns - Vitessce widget. Documentation can be found `here. `_ ``` -------------------------------- ### Spatial plot with Scanpy Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Create a spatial plot using Scanpy's Visium dataset. Uses easy_vitessce's spatial function with Scanpy syntax. ```py adata = sc.datasets.visium_sge(sample_id="Targeted_Visium_Human_Glioblastoma_Pan_Cancer", include_hires_tiff=True) sc.pl.spatial(adata, color = "log1p_n_genes_by_counts") ``` -------------------------------- ### Configure spatial plots with VitessceConfig and AnnDataWrapper Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html Configures AnnData and image wrappers for spatial data, handling gene vs categorical color inputs, and adds views for feature list, histogram, spatial, and layer controller. Includes commented-out code for multiple colors and spot layer configuration. ```python if (type(color) == list and color[0] in adata.var.index) or (type(color) == str and color in adata.var.index): # gene # genes = kwargs["color"] # adata.var["genes"] = list(adata.var.index) # adata.var["in_color"] = adata.var["genes"].apply(lambda gene: True if gene in color else False) path = {"obs_feature_matrix_path": "X"} #path = {"feature_filter_path": ["var/in_color"]} new_coord_vals = {"featureType": 'gene', "featureValueType": 'expression'} # new_coord_vals = {"featureType": 'qualityMetric', "featureValueType": 'value'} adata_wrapper_dict.update(path) adata_wrapper_dict["coordination_values"].update(new_coord_vals) print(adata_wrapper_dict) elif (type(color) == list and color[0] in adata.obs.columns) or (type(color) == str and color in adata.obs.columns): # categorical adata.obs[color] = adata.obs[color].astype("float32") path = {"obs_feature_column_paths":[f"obs/{color}"]} new_coord_vals = {"obsType": 'cell', "featureType": 'qualityMetric', "featureValueType": 'value'} adata_wrapper_dict.update(path) adata_wrapper_dict["coordination_values"].update(new_coord_vals) print(adata_wrapper_dict) adata.write_zarr(output_adata, chunks=[adata.shape[0], VAR_CHUNK_SIZE]) # obs_feature_column_paths=[f"obs/{color}"], # feature_filter_path=[f"obs/{color}"], vc = VitessceConfig(schema_version="1.0.18", name="sc.pl.spatial (deprecated)") dataset = vc.add_dataset(name='spatial data').add_object( AnnDataWrapper( adata_path=output_adata, obs_spots_path = "obsm/spatial", obs_feature_matrix_path = "X" # obs_set_paths = ["obs/log1p_n_genes_by_counts"] ) ).add_object( ImageOmeZarrWrapper( img_path=output_img, coordinate_transformations = [ { "type": 'translation', "translation": [0, 0, 0], }, { "type": 'scale', "scale": [1, x, y], # [color, x, y] }, ] ) ).add_object( AnnDataWrapper(**adata_wrapper_dict) ) # adata_path=output_adata, # obs_feature_column_paths=[f"obs/{color}"], # for numerical data # # obs_feature_matrix_path = [] # coordination_values={ # "obsType": 'cell', # "featureType": 'qualityMetric', # "featureValueType": 'value', # } link_views_dict = { "obsType": 'cell', "featureSelection": [color], "obsColorEncoding": "geneSelection" # ?? } if color in adata.var.index: # gene genes = vc.add_view(vt.FEATURE_LIST, dataset=dataset) #assumes featureType = gene if color in adata.obs.columns: histogram = vc.add_view(vt.FEATURE_VALUE_HISTOGRAM, dataset=dataset) # if type(color) == list and len(color) > 1: # for i in range(0, len(color), 2): # adata.obs[color[i]] = adata.obs[color[i]].astype("float32") # path = {"obs_feature_column_paths":[f"obs/{color[i]}"]} # new_coord_vals = {"obsType": 'cell', "featureType": 'qualityMetric', "featureValueType": 'value'} # adata_wrapper_dict.update(path) # adata_wrapper_dict["coordination_values"].update(new_coord_vals) # # print(adata_wrapper_dict) # spotLayer = { # "spotLayer": CL([ # { # "obsType": "cell", # "spatialSpotRadius": 45, #might have to depend on scale factor as well # "featureValueColormap": color_map # }, # ]) } # spatial_view_1 = vc.add_view("spatialBeta", dataset=dataset) # spatial_view_2 = vc.add_view("spatialBeta", dataset=dataset) # vc.link_views_by_dict([spatial_view_1], **spotLayer, **link_views_dict) # vc.link_views_by_dict([spatial_view_2], **spotLayer, **link_views_dict) # vc.layout(spatial_view_1 | spatial_view_2) # vw = _to_widget(vc) # return vw spatial_view = vc.add_view("spatialBeta", dataset=dataset) lc_view = vc.add_view("layerControllerBeta", dataset=dataset) if color in adata.obs.columns: # categorical new_vals = {"featureType": 'qualityMetric', "featureValueType": 'value'} link_views_dict.update(new_vals) print(link_views_dict) ``` -------------------------------- ### Set custom output directory with data.out_dir Source: https://vitessce.github.io/easy_vitessce/customization.html Specify an alternative output directory for data files. The default is `data`. ```python import easy_vitessce as ev ev.config.update({ 'data.out_dir': '/path/to/some/dir' }) ``` -------------------------------- ### Create interactive heatmap with VitessceConfig Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html Creates an interactive heatmap using VitessceConfig. It copies the AnnData object, adds a boolean mask for initial feature filtering, configures an OBS_SETS view and a HEATMAP view, links views for color map and range, and lays them out horizontally. ```python def heatmap( adata, var_names, groupby, *, gene_symbols=None, layer=None, swap_axes=False, vmin=None, vmax=None, **kwargs ): """ Creates interactive heatmap. :param AnnData adata: AnnData object. :param list[str] var_names: List of genes. :param str groupby: Category group, a column in adata.obs. :param str gene_symbols: Key in adata.var to use for gene symbols, if different from adata.var.index. :param str layer: Layer in AnnData to use for expression values. Defaults to None, which uses adata.X. :param bool swap_axes: If True, transpose the heatmap. Defaults to False. :param float vmin: Minimum value for color map scaling. :param float vmax: Maximum value for color map scaling. :param str color_map: Color map (viridis, plasma, jet). Defaults to viridis. :returns: Vitessce widget. Documentation can be found `here. `_ """ # TODO: throw errors/warnings for unsupported parameters? vc = VitessceConfig(schema_version="1.0.18", name='sc.pl.heatmap') # We need to make a copy since we will be modifying adata. # TODO: this will mean the object will always be re-written to disk # (and redundantly if the function is called multiple times), # and breaking the functionality of register_data_path() if the user had specified an existing on-disk location. # Workarounds for future work (TODO: create github issues): # - Create a new AnnData object (or CSV file) to store var/__ev_initial_feature_filter__ column only. # - In JS, implement a way to specify a list of features directly rather than via a path in the AnnData object. adata = adata.copy() # We need to create a boolean mask in adata.var to indicate which genes to show initially. # We name it using double underscores to reduce the chance of name collisions. adata.var["__ev_initial_feature_filter__"] = adata.var_names.to_series().apply(lambda gene: True if gene in var_names else False) group_name = groupby.capitalize() wrapper_params = { "obs_set_paths": [f"obs/{groupby}"], "obs_set_names": [group_name], "obs_feature_matrix_path": "X" if layer is None else f"layers/{layer}", "initial_feature_filter_path": "var/__ev_initial_feature_filter__", } if gene_symbols is not None: wrapper_params["feature_labels_path"] = f"var/{gene_symbols}" dataset = vc.add_dataset(name='heatmap data').add_object(AnnDataWrapper( **_get_adata_wrapper_params(adata), **wrapper_params, )) obs_sets_view = vc.add_view(vt.OBS_SETS, dataset=dataset) heatmap_view = vc.add_view(vt.HEATMAP, dataset=dataset).set_props(transpose=(not swap_axes)) if "color_map" in kwargs: # TODO: color_map is not listed as a parameter for sc.pl.heatmap in Scanpy docs. # Should we still keep it here? color_map = kwargs["color_map"] vc.link_views([heatmap_view, obs_sets_view], ["featureValueColormap"], [color_map] ) vc.link_views([obs_sets_view], ['obsSetExpansion'], [[[group_name]]] ) if vmin is not None or vmax is not None: vc.link_views( [heatmap_view, obs_sets_view], ["featureValueColormapRange"], [ [ vmin if vmin is not None else 0.0, vmax if vmax is not None else 1.0, ] ] ) vc.layout(hconcat(heatmap_view, obs_sets_view, split=[2, 1])) vw = _to_widget(vc) return vw ``` -------------------------------- ### render_labels Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/spatialdata_plot.html Renders label data with options for coloring, grouping, and alpha values. Returns self for chaining. ```APIDOC ## render_labels ### Description Renders label data. This method allows users to visualize label elements from spatial data, with options for coloring by observation columns, grouping, and adjusting transparency. ### Method render_labels ### Signature render_labels(element=None, color=None, groups=None, palette=None, cmap=None, norm=None, outline_alpha=0.0, fill_alpha=0.4, table_name=None, table_layer=None, **kwargs) ### Parameters - **element** (str) - Optional - Name of the labels element. - **color** (str or None) - Optional - Name of an obs column, var index value, or color-like string. - **groups** (list[str] or str or None) - Optional - List of obs group names to select. - **palette** (list[str] or str or None) - Optional - Palette to color labels. If list, the number of colors should be equal to the number of groups. - **cmap** (str or None) - Optional - Quantitative colormap name, such as "viridis". - **norm** (matplotlib.colors.Normalize or None) - Optional - Normalization for quantitative colormap. - **outline_alpha** (float or int or None) - Optional - Alpha value for label outlines, between 0.0 and 1.0. Default is 0.0. - **fill_alpha** (float or int or None) - Optional - Alpha value for filling labels, between 0.0 and 1.0. Default is 0.4. - **table_name** (str or None) - Optional - Name of an annotating table to use for coloring. - **table_layer** (str or None) - Optional - Name of the layer in the annotating table to use for coloring. - **kwargs** - Optional - Additional keyword arguments passed to the underlying spatialdata-plot method. ### Returns Self, allowing for chaining. ### Example ```python plot_accessor.render_labels(element='labels', color='cell_type', groups=['A', 'B'], palette=['red', 'blue']) ``` ``` -------------------------------- ### Dotplot with sc.pl.dotplot Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Create a dotplot. To select/deselect multiple genes, hold SHIFT while clicking on genes in the Gene List. ```py adata = sc.datasets.pbmc68k_reduced() sc.pl.dotplot(adata, var_names=["C1QA", "PSAP", "CD79A", "CD79B", "CST3", "LYZ"], groupby="bulk_labels") ``` -------------------------------- ### Set AnnData output format to h5ad Source: https://vitessce.github.io/easy_vitessce/customization.html Change the default AnnData write format from `AnnData.write_zarr` to `AnnData.write_h5ad` by setting `data.anndata_format` to `'h5ad'`. ```python import easy_vitessce as ev ev.config.update({ 'data.anndata_format': 'h5ad' }) ``` -------------------------------- ### Import easy_vitessce as ev Source: https://vitessce.github.io/easy_vitessce/_sources/index.md Import the easy_vitessce package. By default, interactive plots are enabled via running this import statement. ```py import easy_vitessce as ev ``` -------------------------------- ### VitesscePlotAccessor.show() Source: https://vitessce.github.io/easy_vitessce/easy_vitessce.html Displays the spatial plot as a Vitessce widget. ```APIDOC ## VitesscePlotAccessor.show() ### Description Displays the spatial plot as a Vitessce widget. ### Method show ### Parameters - **coordinate_systems** (_optional_) - Optional - Coordinate systems to display. - **kwargs** - Optional - Additional keyword arguments. ### Returns Vitessce widget. Learn more at the vitessce-python docs. ``` -------------------------------- ### dotplot Source: https://vitessce.github.io/easy_vitessce/_modules/easy_vitessce/configure_plots.html Creates an interactive dotplot from an AnnData object. It configures a Vitessce widget with linked views for observation sets, feature list, and dot plot, and returns the widget. ```APIDOC ## dotplot ### Description Creates an interactive dotplot from an AnnData object. It configures a Vitessce widget with linked views for observation sets, feature list, and dot plot, and returns the widget. ### Method Function ### Signature ```python def dotplot( adata, var_names, groupby, *, expression_cutoff=None, title=None, gene_symbols=None, layer=None, cmap=None, swap_axes=False, **kwargs, ) ``` ### Parameters - **adata** (AnnData) - Required - AnnData object. - **var_names** (list[str]) - Required - List of gene IDs from adata.var.index. - **groupby** (str) - Required - Category group, a column in adata.obs. - **expression_cutoff** (float) - Optional - Expression cutoff for dot display. - **title** (str) - Optional - Title of the plot. - **gene_symbols** (str) - Optional - Key in adata.var to use for gene symbols, if different from adata.var.index. - **layer** (str) - Optional - Layer in AnnData to use for expression values. Defaults to None, which uses adata.X. - **cmap** (str) - Optional - Color map (viridis, plasma, jet). Defaults to viridis. - **swap_axes** (bool) - Optional - If True, transpose the dotplot. Defaults to False. ### Returns - **Vitessce widget** - Documentation can be found [here](https://python-docs.vitessce.io/api_config.html#vitessce-widget). ``` -------------------------------- ### enable_plots(plots=None) Source: https://vitessce.github.io/easy_vitessce/easy_vitessce.html Activates interactive Vitessce plots. If no plots are specified, enables all plots. ```APIDOC ## enable_plots(plots=None) ### Description Activates interactive Vitessce plots. ### Method Function call ### Endpoint easy_vitessce.configure_plots.enable_plots ### Parameters #### Parameters - **plots** (list[str]) - Optional - List of plots to enable. If None, enables all plots. ### Returns None ```