Description Usage Arguments Value Examples
This function overlays information from a Seurat object or SingleCellExperiment object containing barcodes onto a H & E image. There are 4 plots available showing a) the number of genes detected per spot, b) the number of reads detected per spot, c) clustering results, d) the gene expression of a selected gene.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
object |
Either a Seurat object (version 3) or a SingleCellExperiment object containing barcode coordinates in the metadata (Seurat) or colData (SingleCellExperiment). |
grob |
an grob to be used as the backgound image see(parseImage). This is used for original Spatial Transcriptomics objects but not Visium |
techType |
Either 1) "Original" (default) for the original Spatial Transcriptomics slides where the image has been cropped to the edge of the spots 2) "Visium" for 10X slides. |
byCoord |
TRUE/FALSE option to plot original Spatial Transcriptomics data using pixel coordinates instead of by spot coordinates. Not required if techType = "Visium". Default is FALSE. |
imgDims |
pixel dimensions of histological image. Required when byCoord parameter is set to TRUE, Not required if techType = "Visium". |
plotType |
There are 5 types of plots avaiable: 1) NoGenes - This shows the number of genes per spot and uses information from "nFeature_RNA" column of Seurat object or "detected" from a SingleCellExperiment object. 2) CountsPerSpot - This shows the number of counts per spot. It uses information from "nCount_RNA" column of Seurat object or "sum" from a singleCellExperiment object. 3) Cluster - This plot is designed to show clustering results stored in the meta.data or colData of an object 4) Gene- This plot shows the expression of a single gene. This plot uses scaled/normalised expressin data from the scale.data slot of Seurat object or logcounts of a SingleCellExperiment object. 5) Other - A generic plot to plot any column from the meta.data or colData of an object. |
gene |
Gene to plot |
clusterRes |
which cluster resolution to plot |
customTitle |
Specify plot title (optional) |
scaleData |
Show scaled data on plot (default is TRUE) |
showFilter |
Logical filter showing pass/fail for spots |
ptSize |
Point size used for cluster plot default is 2 |
ptSizeMin |
Minimum point size used for QC and Gene Expression plots default is 0 |
ptSizeMax |
Maximum point size used for QC and Gene Expression plots default is 5 |
A ggplot spatial transcriptomics plot
1 2 3 4 5 6 7 8 9 | pathToTenXOuts <- file.path(system.file(package = "Spaniel"), "extdata/outs")
sceObj <- createVisiumSCE(tenXDir=pathToTenXOuts,
resolution="Low")
filter <- sceObj$detected > 0
spanielPlot(object = sceObj,
plotType = "NoGenes",
showFilter = filter,
techType = "Visium",
ptSizeMax = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.