ggpLayerGroupOutline.Rd
Highlights groups of barcode-spots by encircling them.
Depending on the plot_type
this can be added to a surface plot
or a dimensional reduction plot.
An object of class spata2
.
Character value or NULL. If character, specifies the exact groups that are encircled. If NULL, all groups are encircled.
Character value. Either 'surface', 'tsne' or 'umap'.
Character. Affects color of the main lines of the plot.
Numeric. Affects size of the main lines of the plot.
Character vector or NULL.
If character, specifies barcode-spots that
are removed before analysis or plotting.
Logical. If TRUE
, spatial outlier of the group to outline
are removed from the outline via dbscan::dbscan(..., minPts = minPts
). Ignored
if plot_type
is not 'surface'.
Given to concavity
of ggforce::geom_mark_hull()
.
Can be optimized for every sample via object <- setDefault(object, concavity = ...)
.
Default by object initiation is 1.
Distance measure by which the outline of the area is expanded.
Additional arguments given to ggforce::geom_mark_hull()
. Affects
the encircling.
ggpLayer*()
-functions return lists of ggproto
objects
that can be added to ggplots via the +
operator. In most of the cases
they are supposed to be added to plots created with the plotSurface*()
family.
object <- downloadPubExample("269_T")
plotImageGgplot(object) +
ggpLayerGroupOutline(
object = object,
plot_type = "surface",
grouping = "histology",
groups_subset = "tumor",
line_color = color_vector("npg")[1]
)