Entering edit mode
Tim Smith
★
1.1k
@tim-smith-1532
Last seen 10.2 years ago
Hi,
I was trying to get GO terms that were annotated to my set of genes.
Although the 'get' function returns what I want when I do it one gene
at a time, the 'mget' function does not appear to do the same for a
set of genes. For example:
> library(org.Hs.eg.db)
> ent2GO <- org.Hs.egGO
> ids <- c('1','2')
> names(get('1',ent2GO))
[1] "GO:0008150" "GO:0005576" "GO:0003674"
> names(get('2',ent2GO))
[1] "GO:0006886" "GO:0007584" "GO:0010037" "GO:0051260" "GO:0051384"
"GO:0005576" "GO:0004867" "GO:0008320" "GO:0017114" "GO:0019899"
"GO:0019959"
[12] "GO:0019966" "GO:0043120"
> names(mget(ids,ent2GO))
[1] "1" "2"
What else do I need to do for the mget function to return a set of GO
ids?
thanks!
[[alternative HTML version deleted]]