plotSasHeatmap | R Documentation |
Plots gene expression changes against the distance to the spatial annotation using a heatmap.
plotSasHeatmap(
object,
variables,
ids = idSA(object),
distance = "dte",
resolution = recSgsRes(object),
core = FALSE,
arrange_rows = "none",
unit = getDefaultUnit(object),
bcs_exclude = character(0),
smooth_span = 0.3,
multiplier = 10,
clrsp = NULL,
border_linealpha = 0.75,
border_linecolor = "black",
border_linesize = 1,
border_linetype = "dashed",
.f = NULL,
.cols = dplyr::everything(),
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 |
arrange_rows |
Alter the way the rows of the heatmap
are displayed in order to highlight patterns. Currently either 'maxima',
'minima' or 'input'. If 'input', variables are displayed
in the same order as they are provided in the argument |
unit |
Character value. Specifies the desired unit in
which distance measures
or area measures are provided.
Run |
bcs_exclude |
Character value containing the barcodes of observations to be excluded from the analysis. |
smooth_span |
Numeric value. Controls the degree of smoothing.
Given to argument |
multiplier |
Numeric value. For better visualization the transient pattern
is smoothed with a loess fit. The total number of predicted values (via |
clrsp |
Character value. Specifies the color spectrum to be used to represent
continuous values of numeric variables. Run |
border_linealpha , border_linecolor , border_linesize , border_linetype |
Given
to |
verbose |
Logical. If (Warning messages will always be printed.) |
... |
Used to absorb deprecated arguments or functions. |
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.