qFeatureScatter: Scatter Plot of Two Features in Seurat Object

View source: R/Seurat.Utils.Visualization.R

qFeatureScatterR Documentation

Scatter Plot of Two Features in Seurat Object

Description

Generates a scatter plot comparing two features (genes or metrics) from a Seurat object and optionally saves it. The function wraps around Seurat's FeatureScatter for enhanced usability, including optional logarithmic transformations and saving capabilities.

Usage

qFeatureScatter(
  feature1 = "TOP2A",
  feature2 = "ID2",
  obj = combined.obj,
  ext = "png",
  plot = TRUE,
  logX = FALSE,
  logY = FALSE,
  ...
)

Arguments

feature1

The first feature for the scatter plot's x-axis.

feature2

The second feature for the scatter plot's y-axis.

obj

Seurat object containing the data for features.

ext

File extension for saving the plot, if enabled.

plot

Flag to display the plot within the R session.

logX

Apply logarithmic transformation to x-axis values.

logY

Apply logarithmic transformation to y-axis values.

...

Additional parameters passed to Seurat's FeatureScatter.

Value

A ggplot object of the feature scatter plot if plot is TRUE.

See Also

FeatureScatter, ggplot

Examples

## Not run: 
# Generate and display a scatter plot for features TOP2A and ID2
qFeatureScatter(feature1 = "TOP2A", feature2 = "ID2", obj = yourSeuratObject)

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.