GOENTREZID2GO hard-coded in GOstats:makeGOGraph
1
0
Entering edit mode
Paul Shannon ★ 1.1k
@paul-shannon-578
Last seen 9.6 years ago
I use the 'makeGOGraph' function in the GOstats package to obtain the induced graph for supplied gene IDs. I typically follow with GOHyperG (now just a wrapper around hyperGTest) to calculate statistics on the nodes of the induced graph, and then render everything as a Cytoscape network. This bioc package is very handy, and popular with many with whom I work. Occasionally I use the yeast genome and the YEAST annotation package... which works fine with makeGOGraph and GOHyperG after I made one tiny change to the former function: I parameterized the environment consulted for GO annotation. makeGOGraph <- function (x, Ontology = "MF", geneName2GO.env = GOENTREZID2GO, removeRoot = TRUE) { match.arg(Ontology, c("MF", "BP", "CC")) wh <- paste("GO", Ontology, "PARENTS", sep = "") dataenv = get(wh, mode = "environment") newNodes <- mget(x, env = geneName2GO.env, ifnotfound = NA) # newNodes <- mget(x, env = GOENTREZID2GO, ifnotfound = NA) After this change, I can now call makeGOGraph for yeast: library (YEAST) makeGOGraph (c ('YAR007C','YNL312W','YJL173C'), 'MF', YEASTGO) A graphNEL graph with directed edges Number of Nodes = 7 Number of Edges = 6 If I am not completely missing the point here, may I ask if it might be worthwhile to change the signature of this method slightly, to something like this? makeGOGraph <- function (x, Ontology = "MF", geneName2GO.env = GOENTREZID2GO, removeRoot = TRUE) Regards, - Paul
Annotation GO Network Yeast graph GOstats Annotation GO Network Yeast graph GOstats • 945 views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.6 years ago
Hi Paul, Paul Shannon <pshannon at="" systemsbiology.org=""> writes: > I use the 'makeGOGraph' function in the GOstats package > to obtain the induced graph for supplied gene IDs. I typically > follow with GOHyperG (now just a wrapper around hyperGTest) to > calculate statistics on the nodes of the induced graph, and > then render everything as a Cytoscape network. I'm glad to hear that you and others are finding the software in the Category and GOstats packages useful. I will (shamelessly) take this opportunity to plug new developments as recently published here: http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btl567v1 and encourage you to look at the updated interfaces which provide among other things, more complete summarization of results. The GOHyperG function is deprecated and will, eventually, go away. I've recently added a lot of detail to the vignette in the devel version so that would be a good place to look for an intro to the new functions and classes. > Occasionally I use the yeast genome and the YEAST > annotation package... which works fine with makeGOGraph and > GOHyperG after I made one tiny change to the former function: > I parameterized the environment consulted for GO annotation. > > makeGOGraph <- function (x, Ontology = "MF", > geneName2GO.env = GOENTREZID2GO, removeRoot = TRUE) [snip] > If I am not completely missing the point here, may I ask if it might > be worthwhile to change the signature of this method slightly, to > something like this? > > makeGOGraph <- function (x, Ontology = "MF", > geneName2GO.env = GOENTREZID2GO, > removeRoot = TRUE) This is a clear improvement and I will patch the devel version of GOstats so that this will be available in the upcoming release. The environment parameter needs to come last so as to minimize the impact on existing code. Thanks for a nice suggestion :-) Best Wishes, + seth
ADD COMMENT

Login before adding your answer.

Traffic: 956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6