plotSasRidgeplot | R Documentation |
Plots gene expression changes against the distance to to the spatial annotation using the design of ridgeplots.
plotSasRidgeplot(
object,
variables,
ids = idSA(object),
distance = distToEdge(object, id),
resolution = recSgsRes(object),
angle_span = c(0, 360),
core = FALSE,
smooth_span = 0.3,
unit = getSpatialMethod(object)@unit,
bcs_exclude = character(0),
alpha = 1,
fill = NULL,
clrp = NULL,
clrp_adjust = NULL,
line_color = "black",
line_size = 1.5,
border_linealpha = 0.75,
border_linecolor = "black",
border_linesize = 1,
border_linetype = "dashed",
overlap = 0.5,
strip_pos = "right",
free_y = FALSE,
ggpLayers = NULL,
verbose = NULL,
...
)
object |
An object of class |
variables |
Character vector. The numeric variables to be included in the screening process. Makre sure that the correct matrix is active in the respective assays. |
ids |
Character vector. Specifies the IDs of the spatial annotations of interest. |
distance |
|
resolution |
Distance measure. The resolution
with which the expression gradient is inferred. Defaults are platform specific.
See more in detail section of |
angle_span |
Numeric vector of length 2. Confines the area screened by an angle span relative to the center of its closest spatial annotation. |
smooth_span |
Numeric value. Controls the degree of smoothing.
Given to argument |
unit |
Character value. Specifies the desired unit. |
bcs_exclude |
Character value containing the barcodes of observations to be excluded from the analysis. |
clrp |
Character value. Specifies the color palette to be used to represent
groups of discrete variables. Run |
clrp_adjust |
Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group. |
line_color |
Character. Affects color of the main lines of the plot. |
line_size |
Numeric. Affects size of the main lines of the plot. |
border_linealpha , border_linecolor , border_linesize , border_linetype |
Given
to |
ggpLayers |
List of |
verbose |
Logical. If (Warning messages will always be printed.) |
... |
Needed arguments that depend on the input/unit combination. If
one of both is 'px', argument |
scale |
Logical value. If |
A ggplot.
The vignette on distance measures in SPATA2 has been replaced. Click
here
to read it.
library(SPATA2)
library(ggplot2)
data("example_data")
object <- loadExampleObject("UKF313T", process = TRUE, meta = TRUE)
ids <- getSpatAnnIds(object, tags = c("necrotic", "compr"), test = "identical")
# visualize with lines
plotSasLineplot(object, ids = ids, variables = c("VEGFA", "HM_HYPOXIA", "RCTM_TCR_SIGNALING", "CD74")) +
labs(x = "Distance to Necrosis")
# visualize with ridgeplots
plotSasRidgeplot(object, ids = ids, variables = c("VEGFA", "HM_HYPOXIA", "RCTM_TCR_SIGNALING", "CD74")) +
labs(x = "Distance to Necrosis")
# visualize with a heatmap
plotSasHeatmap(object, ids = ids, variables = c("VEGFA", "HM_HYPOXIA", "RCTM_TCR_SIGNALING", "CD74")) +
labs(x = "Distance to Necrosis")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.