View source: R/visualization.R
ImageFeaturePlot | R Documentation |
Visualize expression in a spatial context
ImageFeaturePlot(
object,
features,
fov = NULL,
boundaries = NULL,
cols = if (isTRUE(x = blend)) {
c("lightgrey", "#ff0000", "#00ff00")
} else {
c("lightgrey", "firebrick1")
},
size = 0.5,
min.cutoff = NA,
max.cutoff = NA,
split.by = NULL,
molecules = NULL,
mols.size = 0.1,
mols.cols = NULL,
nmols = 1000,
alpha = 1,
border.color = "white",
border.size = NULL,
dark.background = TRUE,
blend = FALSE,
blend.threshold = 0.5,
crop = FALSE,
cells = NULL,
scale = c("feature", "all", "none"),
overlap = FALSE,
axes = FALSE,
combine = TRUE,
coord.fixed = TRUE
)
object |
Seurat object |
features |
Vector of features to plot. Features can come from:
|
fov |
Name of FOV to plot |
boundaries |
A vector of segmentation boundaries per image to plot; can be a character vector, a named character vector, or a named list. Names should be the names of FOVs and values should be the names of segmentation boundaries |
cols |
The two colors to form the gradient over. Provide as string vector with
the first color corresponding to low values, the second to high. Also accepts a Brewer
color scale or vector of colors. Note: this will bin the data into number of colors provided.
When blend is
|
size |
Point size for cells when plotting centroids |
min.cutoff , max.cutoff |
Vector of minimum and maximum cutoff values for each feature, may specify quantile in the form of 'q##' where '##' is the quantile (eg, 'q1', 'q10') |
split.by |
A factor in object metadata to split the plot by, pass 'ident' to split by cell identity' |
molecules |
A vector of molecules to plot |
mols.size |
Point size for molecules |
mols.cols |
A vector of color for molecules. The "Set1" palette from RColorBrewer is used by default. |
nmols |
Max number of each molecule specified in 'molecules' to plot |
alpha |
Alpha value for plotting (default is 1) |
border.color |
Color of cell segmentation border; pass |
border.size |
Thickness of cell segmentation borders; pass |
dark.background |
Set plot background to black |
blend |
Scale and blend expression values to visualize coexpression of two features |
blend.threshold |
The color cutoff from weak signal to strong signal; ranges from 0 to 1. |
crop |
Crop the plots to area with cells only |
cells |
Vector of cells to plot (default is all cells) |
scale |
Set color scaling across multiple plots; choose from:
Ignored if |
overlap |
Overlay boundaries from a single image to create a single
plot; if |
axes |
Keep axes and panel background |
combine |
Combine plots into a single |
coord.fixed |
Plot cartesian coordinates with fixed aspect ratio |
If combine = TRUE
, a patchwork
ggplot object; otherwise, a list of ggplot objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.