SingleFeatGate: Perform dual-feature gating on a Seurat object

View source: R/Seurat_based.R

SingleFeatGateR Documentation

Perform dual-feature gating on a Seurat object

Description

Perform dual-feature gating on a Seurat object

Usage

SingleFeatGate(
  SerObj,
  feat1 = NULL,
  thr1 = 0,
  dir1 = "pos",
  cols = c("maroon", "gray"),
  plotDimplot = T,
  returnSerObj = T
)

Arguments

SerObj

A Seurat object to perform gating on.

feat1

A character string representing the name of the first feature to gate on. Defaults to NULL.

thr1

A numeric threshold value for the first feature. Defaults to 0.

dir1

A character string representing the direction of the threshold for the first feature, either "pos" or "neg". Defaults to "pos".

plotDimplot

A logical value indicating whether to plot the result using Seurat's DimPlot function. Defaults to TRUE.

returnSerObj

A logical value indicating whether to return the modified Seurat object or just the gated cell names. Defaults to TRUE.

feat2

A character string representing the name of the second feature to gate on. Defaults to NULL.

thr2

A numeric threshold value for the second feature. Defaults to 0.

dir2

A character string representing the direction of the threshold for the second feature, either "pos" or "neg". Defaults to "pos".

Value

A Seurat object with the compGate metadata column added if returnSerObj is TRUE, otherwise a character vector of gated cell names.


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.