Visualize cells and gene expression according to spatial coordinates
spatGenePlot2D(
gobject,
show_image = F,
gimage = NULL,
image_name = "image",
sdimx = "sdimx",
sdimy = "sdimy",
expression_values = c("normalized", "scaled", "custom"),
genes,
cell_color_gradient = c("blue", "white", "red"),
gradient_midpoint = NULL,
gradient_limits = NULL,
show_network = F,
network_color = NULL,
spatial_network_name = "Delaunay_network",
edge_alpha = NULL,
show_grid = F,
grid_color = NULL,
spatial_grid_name = "spatial_grid",
midpoint = 0,
scale_alpha_with_expression = FALSE,
point_shape = c("border", "no_border", "voronoi"),
point_size = 1,
point_alpha = 1,
point_border_col = "black",
point_border_stroke = 0.1,
show_legend = T,
legend_text = 8,
background_color = "white",
vor_border_color = "white",
vor_alpha = 1,
vor_max_radius = 200,
axis_text = 8,
axis_title = 8,
cow_n_col = 2,
cow_rel_h = 1,
cow_rel_w = 1,
cow_align = "h",
show_plot = NA,
return_plot = NA,
save_plot = NA,
save_param = list(),
default_save_name = "spatGenePlot2D"
)
giotto object
show a tissue background image
a giotto image
name of a giotto image
x-axis dimension name (default = 'sdimx')
y-axis dimension name (default = 'sdimy')
gene expression values to use
genes to show
vector with 3 colors for numeric data
midpoint for color gradient
vector with lower and upper limits
show underlying spatial network
color of spatial network
name of spatial network to use
alpha of edge
show spatial grid
color of spatial grid
name of spatial grid to use
expression midpoint
scale expression with ggplot alpha parameter
shape of points (border, no_border or voronoi)
size of point (cell)
transparancy of points
color of border around points
stroke size of border around points
show legend
size of legend text
color of plot background
border colorr for voronoi plot
transparancy of voronoi 'cells'
maximum radius for voronoi 'cells'
size of axis text
size of axis title
cowplot param: how many columns
cowplot param: relative height
cowplot param: relative width
cowplot param: how to align
show plots
return ggplot object
directly save the plot [boolean]
list of saving parameters, see showSaveParameters
default save name for saving, don't change, change save_name in save_param
ggplot
Description of parameters.
Other spatial gene expression visualizations:
spatGenePlot3D()
,
spatGenePlot()
data(mini_giotto_single_cell)
all_genes = slot(mini_giotto_single_cell, 'gene_ID')
selected_genes = all_genes[1:2]
spatGenePlot2D(mini_giotto_single_cell, genes = selected_genes, point_size = 3)