View source: R/Seurat.Utils.Metadata.R
addTranslatedMetadata | R Documentation |
This function translates a specified metadata vector in a Seurat object using a named vector of old and new values and adds it to the Seurat object with a specified suffix. The function also generates UMAP plots for the new metadata.
addTranslatedMetadata(
obj = combined.obj,
orig.ident = "RNA_snn_res.0.4",
translation_as_named_vec,
new_col_name = substitute_deparse(translation_as_named_vec),
suffix = NULL,
plot = F,
...
)
obj |
A Seurat object to be updated. Default: combined.obj. |
orig.ident |
A character string specifying the original metadata to be translated. Default: "RNA_snn_res.0.4". |
translation_as_named_vec |
A named vector where names are old values and values are new translations. Default: None. |
new_col_name |
A character string specifying the name of the new metadata column. Default: "translation_as_named_vec". |
suffix |
A character string specifying the suffix for the new metadata column name. Default: ".". |
plot |
A logical indicating whether to plot the UMAP for the new metadata. Default: FALSE. |
An updated Seurat object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.