## This has to be in a dontrun block because otherwise I would have to
## expand the DEPENDS field for AnnotationDbi
## library("org.Hs.eg.db")
## library("org.Mm.eg.db")
## library("org.Sc.eg.db")
## library("hom.Hs.inp.db")
## library("hom.Mm.inp.db")
## library("hom.Sc.inp.db")
##Some IDs just for the example
library("org.Hs.eg.db")
ids = as.list(org.Hs.egUNIPROT)[10000:10500] ##get some ragged IDs
## Get entrez gene IDs (default) for uniprot IDs mapping from human to mouse.
MouseEGs = inpIDMapper(ids, "HOMSA", "MUSMU")
##Get yeast uniprot IDs in exchange for uniprot IDs from human
YeastUPs = inpIDMapper(ids, "HOMSA", "SACCE", destIDType="UNIPROT")
##Get yeast uniprot IDs but only return one ID per initial ID
YeastUPSingles = inpIDMapper(ids, "HOMSA", "SACCE", destIDType="UNIPROT", keepMultDestIDMatches = FALSE)
##Test out the intraIDMapper function:
HumanEGs = intraIDMapper(ids, species="HOMSA", srcIDType="UNIPROT",
destIDType="EG")
HumanPATHs = intraIDMapper(ids, species="HOMSA", srcIDType="UNIPROT",
destIDType="PATH")
##Test out the wrapper function
MousePATHs = idConverter(MouseEGs, srcSpecies="MUSMU", destSpecies="MUSMU",
srcIDType="EG", destIDType="PATH")
##Convert from Yeast uniprot IDs to Human entrez gene IDs.
HumanEGs = idConverter(YeastUPSingles, "SACCE", "HOMSA")
Run the code above in your browser using DataLab