AddNewMetaColumn: Add a new Seurat object metadata column based on current...

View source: R/SeuratUtils.R

AddNewMetaColumnR Documentation

Add a new Seurat object metadata column based on current metadata

Description

This function creates a new Seurat object metadata column based on current formulas applied to current metadata columns

Usage

AddNewMetaColumn(
  seuratObj,
  varname,
  formulavector,
  defaultname,
  enforceFunctionalFormulae = TRUE
)

Arguments

seuratObj

The seurat object

varname

The name of the new metadata column

formulavector

vector of formulas, e.g.: c(Tcell_NaiveToEffector > 10 ~ "Effector", Tcell_NaiveToEffector < 5 ~ "Naive")

defaultname

The default value applied when none of the formulas in formulavec are TRUE

enforceFunctionalFormulae

Boolean determining whether or not to sanity check that all defined formulae in formulavector labeled at least one cell in the Seurat Object.

Value

Updated Seurat object


bimberlabinternal/CellMembrane documentation built on Dec. 20, 2024, 11:13 p.m.