View source: R/plotCCIspatial.R
| plotCCIspatial | R Documentation |
For a selected ligand-receptor pair, identifies the dominant interacting cell-type pair at each significant hotspot bin and draws a spatial map of the tissue coloured by those pairs. Receiver cells are those inside hotspot bins; sender cells are drawn from the neighbouring bins defined by the LR pair's signalling mode.
plotCCIspatial(
x,
counts_by_group,
index = 1,
ligand = NULL,
receptor = NULL,
top_pairs = 30,
weighted = TRUE
)
x |
A |
counts_by_group |
Named list of gene-by-bin count matrices, one per
cell type. Typically the |
index |
Integer. Row index into |
ligand |
Character. Ligand gene symbol. When both |
receptor |
Character. Receptor gene symbol. Must be supplied together
with |
top_pairs |
Integer. Maximum number of distinct cell-type pairs to show
in the legend; remaining pairs are grouped as |
weighted |
Logical. If |
A ggplot object.
plotHotspots for a significance-based spatial map of
hotspot bins.
## Not run:
# Continuing from the blisa() example:
# result <- blisa(spe, bin_size = 50, group = "cell_type")
binned <- hexBinCells(
as.data.frame(SpatialExperiment::spatialCoords(spe)),
SummarizedExperiment::assay(spe, "counts"),
bin_size = 50, group = spe$cell_type
)
plotCCIspatial(result, binned$counts_by_group, index = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.