seu.map.and.add.new.ident.to.meta: seu.map.and.add.new.ident.to.meta

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

seu.map.and.add.new.ident.to.metaR Documentation

seu.map.and.add.new.ident.to.meta

Description

Adds a new metadata column to a Seurat object based on an identity mapping table.

Usage

seu.map.and.add.new.ident.to.meta(
  obj = combined.obj,
  ident.table = clusterIDs.GO.process,
  orig.ident = Idents(obj),
  metaD.colname = substitute_deparse(ident.table)
)

Arguments

obj

The Seurat object to which the new metadata column will be added. Default: combined.obj.

ident.table

A data frame or matrix with identity mapping data. This parameter is used to map the old identities to the new ones. Default: clusterIDs.GO.process.

orig.ident

The original identities of the Seurat object. Default: Idents(obj).

metaD.colname

A string specifying the name of the new metadata column. The default value is the name of the provided ident.table.

Value

A Seurat object with the new metadata column added.

Examples

## Not run: 
if (interactive()) {
  # Example usage:
  combined.obj <- seu.map.and.add.new.ident.to.meta(
    obj = combined.obj,
    ident.table = clusterIDs.GO.process
  )
}

## End(Not run)

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