convert_geneid: This function converts a vector of gene identifiers to other...

View source: R/convert_geneid.R

convert_geneidR Documentation

This function converts a vector of gene identifiers to other identifiers

Description

This function converts a vector of gene identifiers to other identifiers

Usage

convert_geneid(
  gene_vec,
  gene_from = "SYMBOL",
  gene_to = "ENTREZID",
  annotation = "org.Hs.eg.db"
)

Arguments

gene_vec

Vector of gene identifiers to convert to entrezID.

gene_from

Character string specifying the gene identifier is gene_vec, By default SYMBOL, can also be ENTREZID, ENSEMBL, UNIGENE

gene_to

Character string specifying what the gene id we want to convert the gene_vec to. By default ENTREZID, can also be SYMBOL, ENSEMBL, UNIGENE

annotation

Character string specifying specifying the annotation of the organism to use. By default human org.Hs.eg.db but you can also choose mouse org.Mm.eg.db.

Value

Named vector with ENTREZID as the values.

Examples

## Not run: 
  symbol_vec <- c("MS4A1", "CD4", "FOXP3")
  entrezid_vec <- convert_geneid(
  gene_vec = symbol_vec,
  gene_from = "SYMBOL",
  gene_to = "ENTREZID",
  annotation = "org.Hs.eg.db")

## End(Not run)

Single-Cell-Genomics-Group-CNAG-CRG/SCrafty-package documentation built on Aug. 20, 2022, 9:29 a.m.