Colors single cells on a dimensional reduction plot according to a 'feature' (i.e. gene expression, PC scores, number of genes detected, etc.)
FeaturePlot(object, features.plot, min.cutoff = NA, max.cutoff = NA,
dim.1 = 1, dim.2 = 2, cells.use = NULL, pt.size = 1,
cols.use = c("yellow", "red"), pch.use = 16, overlay = FALSE,
do.hover = FALSE, data.hover = "ident", do.identify = FALSE,
reduction.use = "tsne", use.imputed = FALSE, nCol = NULL,
no.axes = FALSE, no.legend = TRUE, dark.theme = FALSE,
do.return = FALSE)
Seurat object
Vector of features to plot
Vector of minimum cutoff values for each feature, may specify quantile in the form of 'q##' where '##' is the quantile (eg, 1, 10)
Vector of maximum cutoff values for each feature, may specify quantile in the form of 'q##' where '##' is the quantile (eg, 1, 10)
Dimension for x-axis (default 1)
Dimension for y-axis (default 2)
Vector of cells to plot (default is all cells)
Adjust point size for plotting
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.
Pch for plotting
Plot two features overlayed one on top of the other
Enable hovering over points to view information
Data to add to the hover, pass a character vector of features to add. Defaults to cell name and identity. Pass 'NULL' to remove extra data.
Opens a locator session to identify clusters of cells
Which dimensionality reduction to use. Default is "tsne", can also be "pca", or "ica", assuming these are precomputed.
Use imputed values for gene expression (default is FALSE)
Number of columns to use when plotting multiple features.
Remove axis labels
Remove legend from the graph. Default is TRUE.
Plot in a dark theme
return the ggplot2 object
No return value, only a graphical output
# NOT RUN {
FeaturePlot(object = pbmc_small, features.plot = 'PC1')
# }
Run the code above in your browser using DataLab