library(org.Dm.eg.db)
##example 1: convert a named vector
x <- runif(10)
names(x) <- names(as.list(org.Dm.egSYMBOL2EG))[1:10]
xEntrez <- drosoAnnotationConvertor(geneList=x, initialIDs="Symbol",
finalIDs="Entrez.gene")
##example 2: convert a data matrix with row names as gene ids
x <- cbind(runif(10), runif(10))
rownames(x) <- names(as.list(org.Dm.egSYMBOL2EG))[1:10]
xEntrez <- drosoAnnotationConvertor(geneList=x, initialIDs="Symbol",
finalIDs="Entrez.gene")
Run the code above in your browser using DataLab