cvt_id: Converting gene ids using annotation databases

View source: R/cvt_id.R

cvt_idR Documentation

Converting gene ids using annotation databases

Description

This function is designed to convert one type of gene ids to another type, such as Ensembl, Entrez, UniProt.

Usage

cvt_id(db, data, from.id, to.id, desc = FALSE, other = NULL)

Arguments

db

A character of the annotation database name such as 'org.Hs.eg.db'.

data

A data.frame containing the gene ids in rownames to convert from.

from.id, to.id

The type of ids to convert from ('ENSEMBL', rownames in data) and to ('SYMBOL') (UniProt) respectively.

desc

Logical. If TRUE, the description of each gene will be included.

other

Other information to be added, such as ‘c(’ENZYME', 'PATH')'. See 'columns(org.Hs.eg.db)'.

Value

A data.frame.

Author(s)

Jianhai Zhang jzhan067@ucr.edu
Dr. Thomas Girke thomas.girke@ucr.edu

References

Pagès H, Carlson M, Falcon S, Li N (2022). _AnnotationDbi: Manipulation of SQLite-based annotations in Bioconductor_. R package version 1.60.0, <https://bioconductor.org/packages/AnnotationDbi>. Morgan M, Obenchain V, Hester J, Pagès H (2022). SummarizedExperiment: SummarizedExperiment container. R package version 1.28. 0, <https://bioconductor.org/packages/SummarizedExperiment>.

Examples

library(org.Hs.eg.db)
# Human Ensembl gene ids are rownames in the data frame.
data <- data.frame(tissue1=10:12, tissue2=20:22, row.names=c('ENSG00000006047', 
'ENSG00000268433', 'ENSG00000268555'))
data <- cvt_id(db='org.Hs.eg.db', data=data, from.id='ENSEMBL', to.id='SYMBOL', desc=TRUE)
data

jianhaizhang/spatialHeatmap documentation built on Nov. 28, 2024, 4:44 p.m.