Visualize multiple types of spatial features in ST data.
Usage
SpaCET.visualize.spatialFeature(
SpaCET_obj,
spatialType,
spatialFeatures = NULL,
scaleTypeForGeneExpression = "LogTPM",
sameScaleForFraction = FALSE,
colors = NULL,
pointSize = 1,
pointAlpha = 1,
nrow = 1,
imageBg = TRUE,
imageSize = "CompleteImage",
legend.position = "right",
interactive = FALSE
)
Arguments
- SpaCET_obj
A SpaCET object.
- spatialType
Type of spatial features, i.e., "QualityControl", "GeneExpression", "CellFraction", "LRNetworkScore", "Interface", and "GeneSetScore". See ‘details’ for more information.
- spatialFeatures
A vector of spatial features.
- scaleTypeForGeneExpression
Scale type of gene expression, i.e., "RawCounts","LogRawCounts","LogTPM/10", and "LogTPM".
- sameScaleForFraction
Indicate whether all cell types have the same scale for cell fraction.
- colors
A vector of colors for spots.
- pointSize
Size of spots.
- pointAlpha
Alpha transparency scales of spots. Must lie between 0 and 1.
- nrow
Row number of the combined panel for multiple spatial features.
- imageBg
Logical: should the image be shown as background?
- imageSize
Size of the image, i.e., "CompleteImage", "CaptureArea".
- legend.position
The position of the legend. Set it as "none" if you want to remove the legend.
- interactive
Logical: should the interactive app be activited?
Details
`SpaCET.visualize.spatialFeature` is able to plot multiple types of spatial features, including "QC", "GeneExp", "CellFraction", and "LRNetworkScore". "QualityControl" refers to quality control metrics. User can visualize the total counts of UMI and genes across all spots. "GeneExpr" is set to visualize the expression level of genes. "CellFraction" refers to the cell fraction of cell types. "LRNetworkScore" is selected to show the Ligand-Receptor network score. See `SpaCET.CCI.LRNetworkScore` for how to calculate it.
Examples
SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = "QualityControl", spatialFeatures=c("UMI","Gene"))
SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = "GeneExpression", spatialFeatures=c("EPCAM","MS4A1"))
SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = "CellFraction", spatialFeatures=c("Malignant","Macrophage"))
SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = "CellFraction", spatialFeatures="All", pointSize = 0.1, nrow=5)
SpaCET.visualize.spatialFeature(SpaCET_obj, spatialType = "LRNetworkScore", spatialFeatures=c("Network_Score","Network_Score_pv"))