Generate a spot plot for cell-cell interactions similar to the bertin plot. The size or height of the dot or bar represents the interaction strength. The color of the bars and dots represents the p values.
PlotSpot(
object,
which.cell = NULL,
which.gene = NULL,
aggregate = c("none", "cell", "gene"),
counted = FALSE,
selected = FALSE,
color = "RdBu",
color.bins = 7,
type = c("dot", "bar"),
order = FALSE,
order.dist = "minkowski",
p = 1,
filter = FALSE,
low.cutoff = -Inf,
high.cutoff = Inf,
dot.scale = 8,
plot.y.axis = TRUE,
fix.y.axis = TRUE,
do.return = FALSE
)
Matchmaker object.
Interacting cell type name (saperated by '|' i.e 'DC|Mac') or index to plot. Default is NULL.
Interacting gene name (saperated by '_' i.e 'CSF1_CSF1R') or index to plot. Default is NULL.
Type of aggregation used. Default is none.
cell, aggregated by cell-cell interactions strengths (Default).
gene, aggregated by ligand-receptor pairs strengths.
none, no aggregation.
Aggregate interactions counts instead of strengths. Default is FALSE.
Use selected data if calculated. Default is FALSE.
Color palette name. Default is "RdBu" (reversed order), high values are in blue and low values in red See details brewer.pal
.
Number of differen colors in pallete. Default is 7. See detail brewer.pal
.
Types of plot. Default is dotplot.
dot, dotplot or bertin plot (Default).
bar, barplot.
Whether to order the input data. Default is TRUE. See details seriate
.
Distance measure to be used. Default is "minkowski". See details dist
.
Power of Minkowski distance Default is 1, aka Manhattan distance. See details dist
.
Whether to filter the input data based on low.cutoff and high.cutoff. Default is FALSE.
Lower cutoff bound below which will be removed. Default is negative infinity.
Upper cutoff bound above which will be removed. Default is positive infinity.
Scale the size of the dots. Default is 8.
Whether to show y axis for each barplot. Default is TRUE.
Whether to fix the all barplot ticks or use the relative ticks for each barplot. Default is TRUE.
Whether to return the data used to plot. Default is FALSE.
A ggplot object or a list with strength and p value data used to generate the plot.
if (FALSE) {
PlotSpot(object, which.cell = 1:10, which.gene = 1:10)
}