AddNewAnnotation: AddNewAnnotation

View source: R/Seurat.Utils.R

AddNewAnnotationR Documentation

AddNewAnnotation

Description

This function creates a new metadata column based on an existing metadata column and a list of mappings (name <- IDs).

Usage

AddNewAnnotation(
  obj = obj,
  source = "RNA_snn_res.0.5",
  named.list.of.identities = ls.Subset.ClusterLists
)

Arguments

obj

A Seurat object for which the new annotation is to be created. Default: 'obj'.

source

A character string specifying the existing metadata column to be used as the basis for the new annotation. Default: 'RNA_snn_res.0.5'.

named.list.of.identities

A named list providing the mappings for the new annotation. Default: 'ls.Subset.ClusterLists'.

Value

A character vector representing the new metadata column.

Examples

## Not run: 
if (interactive()) {
  ls.Subset.ClusterLists <- list("hESC.h9" = c("4", "10", "14"), "hESC.176" = c("0", "1", "2"))
  AddNewAnnotation()
}

## End(Not run)

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