addMetaDataSafe: Add Metadata to a Seurat object, safely with Checks

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

addMetaDataSafeR Documentation

Add Metadata to a Seurat object, safely with Checks

Description

Wrapper function for AddMetaData that includes additional checks and assertions.

Usage

addMetaDataSafe(
  obj,
  metadata,
  col.name,
  overwrite = FALSE,
  verbose = FALSE,
  strict = TRUE
)

Arguments

obj

Seurat object to which metadata will be added.

metadata

The metadata to be added.

col.name

The name of the new metadata column.

overwrite

Logical; if TRUE, overwrites the existing column.

verbose

Logical; if TRUE, prints additional information.

strict

...

Value

Modified Seurat object with additional metadata.


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