- spac.visualization.relational_heatmap(adata: AnnData, source_annotation: str, target_annotation: str, color_map: str = 'mint', **kwargs)[source]
Generates a relational heatmap from the given AnnData object. The color map refers to matplotlib color maps, default is mint. For more information on colormaps, see: https://matplotlib.org/stable/users/explain/colors/colormaps.html
- Parameters:
adata (anndata.AnnData) – The annotated data matrix.
source_annotation (str) – The source annotation to use for the relational heatmap.
target_annotation (str) – The target annotation to use for the relational heatmap.
color_map (str) – The color map to use for the relational heatmap. Default is mint.
**kwargs (dict, optional) – Additional keyword arguments. For example, you can pass font_size=12.0.
- Returns:
A dictionary containing: - “figure” (plotly.graph_objs._figure.Figure):
The generated relational heatmap as a Plotly figure.
- ”file_name” (str):
The name of the file where the relational matrix can be saved.
- ”data” (pandas.DataFrame):
A relational matrix DataFrame with percentage values. Rows represent source annotations, columns represent target annotations, and an additional “total” column sums the percentages for each source.
- Return type:
dict