FeaturePlot3-grid: Simultaneous Visualization of Three Features on a Grid of...

FeaturePlot3.gridR Documentation

Simultaneous Visualization of Three Features on a Grid of Plots

Description

This function allows for the simultaneous visualization of three features across multiple plots, utilizing a grid layout. It supports two color blending systems (RYB or RGB) to represent the intensity of each feature within a single plot, providing a comprehensive overview of expression patterns across a dataset.

Usage

FeaturePlot3.grid(
  seu,
  features,
  color = c("ryb", "rgb"),
  color.range = c(0.1, 0.95),
  reduction = "umap",
  order = T,
  pt.size = 0.1,
  legend = F
)

Arguments

seu

A Seurat object containing single-cell RNA sequencing data.

features

A vector of feature names (genes or other continuous variables) to be displayed. This vector should be divisible by three, with each triplet of features being plotted in a separate subplot within the grid. If a triplet includes 'NA', that position will not display a feature, allowing for flexibility in visualization.

color

Specifies the color blending system used to display the features. The available options are "ryb" for red-yellow-blue and "rgb" for red-green-blue. This parameter controls how the three features are visually represented based on their expression levels.

color.range

Adjusts the luminance range used for feature visualization to ensure that low expressions are visible and not obscured by the background color. Default: c(0.1, 0.95), where 0.1 prevents the lowest expressions from being pure white and 0.95 keeps the highest expressions from saturating to pure color.

reduction

The dimensionality reduction technique to use for the plot layout. Typically 'umap' or 'tsne' are used, with 'umap' being the default.

order

Controls whether cells with higher feature expressions are plotted above those with lower expressions. This is useful for ensuring that cells with significant expression levels are visible and not obscured by those with lower levels. Default: TRUE.

pt.size

Point size for plotting individual cells in the grid. Smaller values are typically used for large datasets or dense plots, whereas larger values enhance visibility for plots with fewer cells or less overlap. Default: 0.1.

legend

Determines whether to display a legend describing the features and color scales. Default: FALSE.

Details

The 'FeaturePlot3.grid' function is particularly useful for exploratory data analysis where visualization of multiple gene interactions or expression patterns across different cell populations is required. It effectively combines data from multiple features into a single coherent visual representation.

Value

A ggplot object displaying a grid of dimension reduction plots, each illustrating the expression patterns of three features using the specified color blending system.

Examples

library(Seurat)
library(SeuratExtend)

FeaturePlot3.grid(
  pbmc,
  features = c("CD3D", "CD14", "CD79A", "FCGR3A", NA, "LYZ"),
  color = "ryb",
  pt.size = 0.5
)


huayc09/SeuratExtend documentation built on July 15, 2024, 6:22 p.m.