Adds additional data to the object. Can be any piece of information associated with a cell (examples include read depth, alignment rate, experimental batch, or subpopulation identity) or feature (ENSG name, variance). To add cell level information, add to the Seurat object. If adding feature-level metadata, add to the Assay object (e.g. object[["RNA"]]))
AddMetaData(object, metadata, col.name = NULL)# S3 method for Assay
AddMetaData(object, metadata, col.name = NULL)
# S3 method for Seurat
AddMetaData(object, metadata, col.name = NULL)
# S4 method for Assay
[[(x, i, j, ...) <- value
# S4 method for Seurat
[[(x, i, j, ...) <- value
An object
Name to store metadata or object as
Ignored
Arguments passed to other methods
Metadata or object to add
An object with metadata or and object added
# NOT RUN { cluster_letters <- LETTERS[Idents(object = pbmc_small)] names(cluster_letters) <- colnames(x = pbmc_small) pbmc_small <- AddMetaData( object = pbmc_small, metadata = cluster_letters, col.name = 'letter.idents' ) head(x = pbmc_small[[]]) # }
Run the code above in your browser using DataCamp Workspace