Learn R Programming

Seurat (version 5.0.3)

PlotPerturbScore: Function to plot perturbation score distributions.

Description

Density plots to visualize perturbation scores calculated from RunMixscape function.

Usage

PlotPerturbScore(
  object,
  target.gene.class = "gene",
  target.gene.ident = NULL,
  mixscape.class = "mixscape_class",
  col = "orange2",
  split.by = NULL,
  before.mixscape = FALSE,
  prtb.type = "KO"
)

Value

A ggplot object.

Arguments

object

An object of class Seurat.

target.gene.class

meta data column specifying all target gene names in the experiment.

target.gene.ident

Target gene name to visualize perturbation scores for.

mixscape.class

meta data column specifying mixscape classifications.

col

Specify color of target gene class or knockout cell class. For control non-targeting and non-perturbed cells, colors are set to different shades of grey.

split.by

For datasets with more than one cell type. Set equal TRUE to visualize perturbation scores for each cell type separately.

before.mixscape

Option to split densities based on mixscape classification (default) or original target gene classification. Default is set to NULL and plots cells by original class ID.

prtb.type

specify type of CRISPR perturbation expected for labeling mixscape classifications. Default is KO.