{"action":"created","issue":{"url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/24","labels_url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/24/comments","events_url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/24/events","html_url":"https://github.com/GuangchuangYu/clusterProfiler/issues/24","id":106503131,"number":24,"title":"Matching EntrezID with go term","user":{"login":"adomingues","id":2607577,"avatar_url":"https://avatars.githubusercontent.com/u/2607577?v=3","gravatar_id":"","url":"https://api.github.com/users/adomingues","html_url":"https://github.com/adomingues","followers_url":"https://api.github.com/users/adomingues/followers","following_url":"https://api.github.com/users/adomingues/following{/other_user}","gists_url":"https://api.github.com/users/adomingues/gists{/gist_id}","starred_url":"https://api.github.com/users/adomingues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adomingues/subscriptions","organizations_url":"https://api.github.com/users/adomingues/orgs","repos_url":"https://api.github.com/users/adomingues/repos","events_url":"https://api.github.com/users/adomingues/events{/privacy}","received_events_url":"https://api.github.com/users/adomingues/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-15T07:58:45Z","updated_at":"2015-09-15T09:30:38Z","closed_at":"2015-09-15T09:30:38Z","body":"Hi Guangchuang,\r\n\r\nnot really an issue, but more of a question (quite possibly related to DOSE). I am interested in creating a data.frame with my original data, which included entrezIDs, and add associated GO terms. Is there an easy/simple way of matching entrezIDs with the GO terms returned by clusterProfiler? \r\n\r\nFor instance, when using `groupGO` the result (`summary(head(ggo))`) is a table with the GO_ID, description, (..), and geneID. However, as far as can see the geneID is the gene symbol, and not the input for `groupGO` (entrezID). The information currently returned by `groupGO` is very informative, but This makes it somewhat difficult to merge together with the original input.\r\n\r\nThe information seems to be in `ggo@geneInCategory`, and I am just wondering if there is a way of getting in a nice format. For instance (made up IDs):\r\n> Entrez   GO\r\n> 0065009 GO:0044085 regulation of transcription\r\n> 0012890 GO:0019953 sexual reproduction\r\n> (..)\r\n\r\nThis would be really helpful.\r\n\r\nCheers. "},"comment":{"url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/comments/140336465","html_url":"https://github.com/GuangchuangYu/clusterProfiler/issues/24#issuecomment-140336465","issue_url":"https://api.github.com/repos/GuangchuangYu/clusterProfiler/issues/24","id":140336465,"user":{"login":"GuangchuangYu","id":626539,"avatar_url":"https://avatars.githubusercontent.com/u/626539?v=3","gravatar_id":"","url":"https://api.github.com/users/GuangchuangYu","html_url":"https://github.com/GuangchuangYu","followers_url":"https://api.github.com/users/GuangchuangYu/followers","following_url":"https://api.github.com/users/GuangchuangYu/following{/other_user}","gists_url":"https://api.github.com/users/GuangchuangYu/gists{/gist_id}","starred_url":"https://api.github.com/users/GuangchuangYu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuangchuangYu/subscriptions","organizations_url":"https://api.github.com/users/GuangchuangYu/orgs","repos_url":"https://api.github.com/users/GuangchuangYu/repos","events_url":"https://api.github.com/users/GuangchuangYu/events{/privacy}","received_events_url":"https://api.github.com/users/GuangchuangYu/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T09:30:38Z","updated_at":"2015-09-15T09:30:38Z","body":"By default, `readable=FALSE` and `clusterProfiler` will not convert geneID to symbol and you can match the output with associated info of your input easily.\r\n\r\nTo tidy the output in the format you mentioned above, you can use the following command:\r\n\r\n```r\r\nde=names(geneList)[geneList > 2]\r\nx=groupGO(de, level=3)\r\nstack(x@geneInCategory) -> go\r\nclusterProfiler:::TERM2NAME.GO(unique(go[,2])) -> termname\r\ngo$desc = termname[go[,2]]\r\n```\r\n\r\n```\r\n> head(go)\r\n  values        ind\r\n1   6280 GO:0005886\r\n2   9833 GO:0005886\r\n3   6279 GO:0005886\r\n4   8685 GO:0005886\r\n5   3627 GO:0005886\r\n6   8140 GO:0005886\r\n                                                           desc\r\n1 nuclear outer membrane-endoplasmic reticulum membrane network\r\n2 nuclear outer membrane-endoplasmic reticulum membrane network\r\n3 nuclear outer membrane-endoplasmic reticulum membrane network\r\n4 nuclear outer membrane-endoplasmic reticulum membrane network\r\n5 nuclear outer membrane-endoplasmic reticulum membrane network\r\n6 nuclear outer membrane-endoplasmic reticulum membrane network\r\n```\r\n"}}