powered by
Creates a scatter plot of two features (typically feature expression), across a set of single cells. Cells are colored by their identity class. Pearson correlation between the two features is displayed above the plot.
FeatureScatter( object, feature1, feature2, cells = NULL, group.by = NULL, cols = NULL, pt.size = 1, shape.by = NULL, span = NULL, smooth = FALSE, combine = TRUE, slot = "data", plot.cor = TRUE, raster = NULL )
Seurat object
First feature to plot. Typically feature expression but can also be metrics, PC scores, etc. - anything that can be retreived with FetchData
Second feature to plot.
Cells to include on the scatter plot.
Name of one or more metadata columns to group (color) cells by (for example, orig.ident); pass 'ident' to group by identity class
Colors to use for identity class plotting.
Size of the points on the plot
Ignored for now
Spline span in loess function call, if NULL, no spline added
NULL
Smooth the graph (similar to smoothScatter)
Combine plots into a single patchworked
patchworked
Slot to pull data from, should be one of 'counts', 'data', or 'scale.data'
Display correlation in plot title
Convert points to raster format, default is NULL which will automatically use raster if the number of points plotted is greater than 100,000
A ggplot object
# NOT RUN { data("pbmc_small") FeatureScatter(object = pbmc_small, feature1 = 'CD9', feature2 = 'CD3E') # }
Run the code above in your browser using DataLab