将Ensembl 中的蛋白ID转化成基因ID,可以通过clusterProfiler这个包。
如以大鼠的基因与蛋白转化为例;
安装clusterProfiler与大鼠org.Rn.eg.db,如果是人的注释包为org.Hs.eg.db,小鼠的注释包为org.Mm.eg.db.
BiocManager::install("clusterProfiler")
BiocManager::install("org.Rn.eg.db")
library(clusterProfiler)
library(org.Rn.eg.db)
查看可以转化的ID:
keytypes(org.Rn.eg.db)
[1] "ACCNUM" "ALIAS" "ENSEMBL" "ENSEMBLPROT" "ENSEMBLTRANS"
[6] "ENTREZID" "ENZYME" "EVIDENCE" "EVIDENCEALL" "GENENAME"
[11] "GO" "GOALL" "IPI" "ONTOLOGY" "ONTOLOGYALL"
[16] "PATH" "PFAM" "PMID" "PROSITE" "REFSEQ"
[21] "SYMBOL" "UNIGENE" "UNIPROT"
将蛋白ID转为基因ID:
PROT2SYMBOL<-bitr(data$Protein.Group.Accessions,fromType = "ENSEMBLPROT",toType = "SYMBOL",OrgDb = org.Rn.eg.db)
head(PROT2SYMBOL)