FeatureScatter: Scatter plot of single cell data

Description Usage Arguments Value Examples

View source: R/visualization.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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
)

Arguments

object

Seurat object

feature1

First feature to plot. Typically feature expression but can also be metrics, PC scores, etc. - anything that can be retreived with FetchData

feature2

Second feature to plot.

cells

Cells to include on the scatter plot.

group.by

Name of one or more metadata columns to group (color) cells by (for example, orig.ident); pass 'ident' to group by identity class

cols

Colors to use for identity class plotting.

pt.size

Size of the points on the plot

shape.by

Ignored for now

span

Spline span in loess function call, if NULL, no spline added

smooth

Smooth the graph (similar to smoothScatter)

combine

Combine plots into a single patchworked

slot

Slot to pull data from, should be one of 'counts', 'data', or 'scale.data'

plot.cor

Display correlation in plot title

raster

Convert points to raster format, default is NULL which will automatically use raster if the number of points plotted is greater than 100,000

Value

A ggplot object

Examples

1
2
data("pbmc_small")
FeatureScatter(object = pbmc_small, feature1 = 'CD9', feature2 = 'CD3E')

ibseq/scs-analysis documentation built on Feb. 27, 2021, 12:35 a.m.