## load a package that creates an OrganismDb
library(Homo.sapiens)
ls(2)
## then the methods can be used on this object.
columns <- columns(Homo.sapiens)[c(7,10,11,12)]
keys <- head(keys(org.Hs.eg.db, "ENTREZID"))
keytype <- "ENTREZID"
res <- select(Homo.sapiens, keys, columns, keytype)
head(res)
res <- mapIds(Homo.sapiens, keys=c('1','10'), column='ALIAS',
keytype='ENTREZID', multiVals="CharacterList")
## get symbols for ranges in question:
ranges <- GRanges(seqnames=Rle(c('chr11'), c(2)),
IRanges(start=c(107899550, 108025550),
end=c(108291889, 108050000)), strand='*',
seqinfo=seqinfo(Homo.sapiens))
selectByRanges(Homo.sapiens, ranges, 'SYMBOL')
## Or extract the gene model for the 'A1BG' gene:
selectRangesById(Homo.sapiens, 'A1BG', keytype='SYMBOL')
## Get the DB connections or DB file paths associated with those for
## each.
dbconn(Homo.sapiens)
dbfile(Homo.sapiens)
## extract the taxonomyId
taxonomyId(Homo.sapiens)
##extract the resources
resources(Homo.sapiens)
Run the code above in your browser using DataLab