UpdateGenesSeurat: Update Gene Symbols in a Seurat Object

View source: R/Seurat.Utils.R

UpdateGenesSeuratR Documentation

Update Gene Symbols in a Seurat Object

Description

This function updates gene symbols in a Seurat object based on current gene nomenclature guidelines, using HGNChelper(). It checks and updates gene symbols to their latest approved versions,ensuring that gene annotations are current and consistent. The function optionally enforces unique gene symbols and provides statistics on the update process.

Usage

UpdateGenesSeurat(
  obj = ls.Seurat[[i]],
  species_ = "human",
  assay = "RNA",
  EnforceUnique = TRUE,
  ShowStats = FALSE
)

Arguments

obj

A Seurat object containing gene expression data. Default: ls.Seurat[[i]] (ensure to replace i with the actual index or variable referencing your Seurat object).

species_

The species for which the gene symbols are checked and updated, used to ensure the correct gene nomenclature is applied. Default: 'human'. Supports 'human', 'mouse', etc., as specified in the HGNChelper package.

EnforceUnique

Logical flag indicating whether to enforce unique gene symbols within the Seurat object. When set to TRUE, it resolves issues with duplicated gene symbols by appending unique identifiers. Default: TRUE.

ShowStats

Logical flag indicating whether to display statistics about the gene symbol update process. When set to TRUE, it prints detailed information on the console about the changes made. Default: FALSE.

Value

A modified Seurat object with updated gene symbols. The function directly modifies the input Seurat object, ensuring that gene symbols adhere to the latest nomenclature.

See Also

checkGeneSymbols for details on checking and updating gene symbols.

Examples

## Not run: 
if (interactive()) {
  # Assuming `mySeuratObject` is your Seurat object
  updatedSeuratObject <- UpdateGenesSeurat(
    obj = mySeuratObject, species_ = "human",
    EnforceUnique = TRUE, ShowStats = TRUE
  )
  # `updatedSeuratObject` now has updated gene symbols
}

## End(Not run)


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