compare_SThet.Rd
Plots the spatial autocorrelation statistics of genes across samples and colors samples acording to sample metadata.
compare_SThet(
x = NULL,
samplemeta = NULL,
genes = NULL,
color_by = NULL,
categorical = T,
color_pal = "muted",
ptsize = 1
)
an STlist.
a string indicating the name of the variable in the clinical data frame. If NULL, uses sample names
the name(s) of the gene(s) to plot.
the variable in x@spatial_meta
used to color points in the plot.
If NULL, each sample is assigned a different color
logical indicating whether or not to treat color_by
as a
categorical variable. Default is TRUE
a string of a color palette from khroma or RColorBrewer, or a vector with colors with enough elements to plot categories.
a number specifying the size of the points. Passed to the size
aesthetic.
a list of plots
This function takes the names of genes and their Moran's I or Geary's C computed for multiple samples and to provide a muti-sample comparison. Samples in the plot can be colored according to sample metadata to explore potential associations between spatial distribution of gene expression and sample-level data.