convertGeneIDs: Convert Gene IDs

Description Usage Arguments Value Examples

View source: R/convertGeneIDs.R

Description

Convert the gene IDs in a SingleCellExperiment object using Bioconductor org.*.eg.db data packages. Because annotation databases do not have a 1:1 relationship, this tool removes rows with no corresponding annotation in your desired annotation, and remove any duplicate annotations after conversion.

Usage

1
convertGeneIDs(inSCE, inSymbol, outSymbol, database = "org.Hs.eg.db")

Arguments

inSCE

Input SingleCellExperiment object.

inSymbol

The input symbol type

outSymbol

The output symbol type

database

The org.*.eg.db database to use. The default is org.Hs.eg.db

Value

A SingleCellExperiment object with converted gene IDs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
if(requireNamespace("org.Mm.eg.db", quietly = TRUE)) {
  #convert mouse gene symbols to ensembl IDs
  library("org.Mm.eg.db")
  sample(rownames(mouseBrainSubsetSCE), 50)
  mouseBrainSubsetSymbol <- convertGeneIDs(inSCE = mouseBrainSubsetSCE,
                                           inSymbol = "SYMBOL",
                                           outSymbol = "ENSEMBL",
                                           database = "org.Mm.eg.db")
  sample(rownames(mouseBrainSubsetSymbol), 50)
}

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.