monkeybread.plot.cell_transcript_proximity
- monkeybread.plot.cell_transcript_proximity(adata, cells, transcripts=None, label=None, legend=False, pairwise=False, show=True, ax=None, **kwargs)
Plots cell boundaries and optionally transcripts in the surrounding area.
- Parameters
adata (
AnnData
) – Annotated data matrix.transcripts (
Optional
[DataFrame
] (default:None
)) – Transcripts to plot, as calculated bymonkeybread.calc.cell_transcript_proximity()
.label (
Optional
[str
] (default:None
)) – A column inadata
to use to color cells.legend (
Optional
[bool
] (default:False
)) – Whether to include cell/transcript labels in a legend.pairwise (
Optional
[bool
] (default:False
)) – Whether to draw a matrix of subplots [i, j] where the plot at [i, j] contains only the genes demarcated by the row and column. Allows for more fine-tuned observation of specific genes.show (
Optional
[bool
] (default:True
)) – Whether to show the plot or return the Axes object.ax (
Optional
[Axes
] (default:None
)) – An axis object to use, only used ifpairwise = False
.kwargs – Keyword arguments passed to
seaborn.scatterplot()
for transcripts.
- Return type
- Returns
A matplotlib Axes containing the plot if
pairwise = False
, otherwise a matplotlib Figure containing all of the subplots. Only returned ifshow = False
.