Description Usage Arguments Value
View source: R/visualize_genes.R
This function visualizes the results of the clustering and analysis using spatial plots and heatmaps
1 2 3 4 5 6 7 8 9 | visualize_genes(
counts,
ids,
img = NULL,
clustering,
genelist,
filepath = NULL,
plot.params = list(nx = 35, ny = 33, ox = 0, oy = 0)
)
|
counts |
non-negative numeric matrix containing gene counts, rows correspond to spots, columns correspond to genes |
ids |
data frame or matrix assigning spatial coordinates to the spots |
img |
image of ST slide, read using EBImage::readImage() |
clustering |
numeric vector, same order as rownames(counts), assigning each spot a cluster |
genelist |
data frame containing genes of interest (e.g. output of filter_genes) |
filepath |
character, directory in which to save plots; if not specified, plots will not be saved to disk |
plot.params |
plotting parameters as returned by plot_adjustment() |
list containing 4 plots (ggplot objects):
spatial.cluster - overlay of clustering on ST image if image was supplied; NULL otherwise
spatial.cluster.legend - spatial clustering, without ST image in background, but with legend
heatmap.plt - simplified heatmap, depicting mean expression of all interesting genes in the different clusters
heatmap.full.plt - heatmap visualizing expression of all interesting genes in all spots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.