monkeybread.plot.cell_contact_embedding
- monkeybread.plot.cell_contact_embedding(adata, contacts, group=None, basis='spatial', show=True, ax=None, **kwargs)
Shows embeddings of cells in contact. Can be spatial or any other basis.
Plots the results of
monkeybread.calc.cell_contact()
, highlighting the cells in contact.- Parameters
adata (
AnnData
) – Annotated data matrix.contacts (
Dict
[str
,Set
[str
]]) – The actual cell contacts, as calculated bymonkeybread.calc.cell_contact()
.group (
Optional
[str
] (default:None
)) – Column inadata.obs
to label cell contacts by.basis (
Optional
[str
] (default:'spatial'
)) – Coordinates inadata.obsm[X_{basis}]
to use. Defaults tospatial
.show (
Optional
[bool
] (default:True
)) – Whether to show the plot or return the Axes object.ax (
Optional
[Axes
] (default:None
)) – An Axes object to add the plots to.kwargs – Keyword arguments that will be passed to
scanpy.pl.embedding()
.
- Return type
- Returns
If
show = True
, returns nothing. Otherwise, returns the Axes object the plot is contained within.