第一种方法
mapIds(x, keys, column, keytype, …, multiVals)
参数:
x——the AnnotationDb object
keys——the keys to select records for from the database
column——the column to search on (for mapIds)
keytype——the keytype that matches the keys used
library(AnnotationDbi)
gene<-c('CCDC136','LINC00917','DBT','MDM4','JAKMIP1')
t1<-mapIds(org.Hs.eg.db, gene, 'ENTREZID', 'SYMBOL')
# CCDC136 LINC00917 DBT MDM4 JAKMIP1
# "64753" "732275" "1629" "4194" "152789"
第二种方法
bitr(geneID, fromType, toType, OrgDb, drop = TRUE)
参数:
geneID——input gene id
fromType——input id type
toType——output id type
OrgDb——annotation db
drop——drop NA or not
t2<- bitr(gene, fromType = "SYMBOL",toType = 'ENTREZID',OrgDb = org.Hs.eg.db)
# SYMBOL ENTREZID
# 1 CCDC136 64753
# 2 LINC00917 732275
# 3 DBT 1629
# 4 MDM4 4194
# 5 JAKMIP1 152789
fromType和toType取决于OrgDb。 idTypes <- idType(OrgDb)
对于org.Hs.eg.db而言,idType(org.Hs.eg.db)
# [1] "ACCNUM" "ALIAS" "ENSEMBL" "ENSEMBLPROT"
"ENSEMBLTRANS"
# [6] "ENTREZID" "ENZYME" "EVIDENCE" "EVIDENCEALL"
"GENENAME"
# [11] "GO" "GOALL" "IPI" "MAP" "OMIM"
# [16] "ONTOLOGY" "ONTOLOGYALL" "PATH" "PFAM" "PMID"
# [21] "PROSITE" "REFSEQ" "SYMBOL" "UCSCKG" "UNIGENE"
# [26] "UNIPROT"
第三种方法
bitr_kegg(geneID, fromType, toType, organism, drop = TRUE)
其中,fromType, toType:“Path”, “Module”, “ncbi-proteinid”, “ncbi-geneid”, “uniprot”, “kegg”
t3<- bitr_kegg(t2$ENTREZID, fromType='ncbi-geneid', toType="ncbi-proteinid",organism='hsa')
# ncbi-geneid ncbi-proteinid
#1 152789 NP_001293062
#2 1629 NP_001909
#3 4194 NP_002384
#4 64753 NP_073579