renameRows: Rename Row Names (Ensembl ID to Symbol)

Description Usage Arguments Value

View source: R/renameRows.R

Description

For generic analysis of data not generated commercial pipelines (i.e. SMART-SEQ2), we are usually given a raw count matrix, where rows are Ensembl IDs. To rename the rows from Ensembl IDs to gene Symbols, a few things need to be considered:

First, row names of Seurat object can NOT be modified, so the renaming operation MUST be done on original expression matrix, usually loaded as a dataframe. Second, different Ensembl IDs could map to the same gene Symbol, causing duplicated row names, which is forbidden in dataframe. To circumvent this, we attach a digit to the Symbols.

Usage

1
renameRows(df, anno)

Arguments

anno

Annotation table. Used to search mapping relationships between Ensembl IDs and Symbols.

data

A dataframe, rows are features named as Ensembl IDs, columns are cells.

Value

A dataframe, rows are features renamed as gene Symbols.


RuiyuRayWang/scWidgets documentation built on Dec. 18, 2021, 11:54 a.m.