[BioC] Drawing induced GO graphs -- GOstats package
Wolfgang Huber
huber at ebi.ac.uk
Sat Sep 13 01:58:21 CEST 2008
Dear Daniel
thanks, and sorry for the delayed reply. I don't have much experience
with this function, but it seems that if you replace the last line of
your example code by
par(mfrow=c(3,3))
lapply(y, plotGOTermGraph, x,
node.colors=c(sig="white", not="blue"),
node.shape="circle", add.counts=FALSE)
a result is produced. AfaIu, plotGOTermGraph wants to work on elements
of the list y, not on y itself. I agree that the documentation in the
function's manual page ("g : A graph object as returned by
inducedTermGraph or termGraphs") would benefit from
clarification/correction.
Best wishes
Wolfgang
> sessionInfo()
R version 2.8.0 Under development (unstable) (2008-09-12 r46536)
x86_64-unknown-linux-gnu
locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] grid splines tools stats graphics
[6] grDevices utils datasets methods base
other attached packages:
[1] RbcBook1_1.9.0 geneplotter_1.19.1
[3] lattice_0.17-14 RColorBrewer_1.0-2
[5] Rgraphviz_1.19.3 org.Rn.eg.db_2.2.3
[7] GOstats_2.7.0 Category_2.7.4
[9] genefilter_1.21.1 survival_2.34-1
[11] RBGL_1.17.2 annotate_1.19.2
[13] xtable_1.5-3 graph_1.19.1
[15] GO.db_2.2.3 AnnotationDbi_1.3.10
[17] RSQLite_0.7-0 DBI_0.2-4
[19] Biobase_2.1.7 fortunes_1.3-5
loaded via a namespace (and not attached):
[1] cluster_1.11.11 GSEABase_1.3.5 KernSmooth_2.22-22
[4] XML_1.96-0
----------------------------------------------------
Wolfgang Huber, EMBL-EBI, http://www.ebi.ac.uk/huber
daniel jupiter wrote:
> Wolfgang,
>
> thanks!
> As you suggested, here is a full script, followed by the error message,
> and then the sessionInfo().
>
> Best regards,
>
> Dan.
>
> library(GO.db)
> library(GOstats)
> library(annotate)
> library(org.Rn.eg.db)
> library("Rgraphviz")
> library("RBGL")
> library("graph")
> library("RColorBrewer")
> library("geneplotter")
> library("RbcBook1")
>
> # Just some dummy genes to play with
> bkg=dbGetQuery(org.Rn.eg_dbconn(), "SELECT * from genes")
> bkg=bkg$gene_id
> test=bkg[1:100]
>
> params <- new("GOHyperGParams", geneIds = test,
> universeGeneIds = bkg,annotation="org.Rn.eg.db",
> conditional = FALSE, categoryName="GO", ontology="CC")
>
> x=hyperGTest(params)
>
> y=termGraphs(x,use.terms=TRUE , pvalue=.01)
>
> plotGOTermGraph(y,x, node.colors=c(sig="white",not="blue"),
> node.shape="circle", add.counts=FALSE)
>
>
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "nodes", for signature
> "list"
>
>
>
> > sessionInfo()
> R version 2.7.1 (2008-06-23)
> i386-apple-darwin8.10.1
>
> locale:
> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] grid splines tools stats graphics
> [6] grDevices utils datasets methods base
>
> other attached packages:
> [1] RbcBook1_1.8.0 geneplotter_1.18.0
> [3] lattice_0.17-8 RColorBrewer_1.0-2
> [5] Rgraphviz_1.18.1 org.Rn.eg.db_2.2.0
> [7] GOstats_2.6.0 Category_2.6.0
> [9] genefilter_1.20.0 survival_2.34-1
> [11] RBGL_1.16.0 annotate_1.18.0
> [13] xtable_1.5-2 graph_1.18.1
> [15] GO.db_2.2.0 AnnotationDbi_1.2.2
> [17] RSQLite_0.6-9 DBI_0.2-4
> [19] Biobase_2.0.1
>
> loaded via a namespace (and not attached):
> [1] KernSmooth_2.22-22 cluster_1.11.11
> >
>
>
> On Thu, Sep 4, 2008 at 11:17 AM, Wolfgang Huber <huber at ebi.ac.uk
> <mailto:huber at ebi.ac.uk>> wrote:
>
>
> Dear Daniel
>
> thank you for your feedback! Would it be possible to
>
> (i) send a code example that we can reproduce (i.e. where the
> variables "test" and "universe" are defined)?
>
> (ii) send the output of sessionInfo() after running the example?
>
> Best wishes
> Wolfgang
>
> --
> ----------------------------------------------------
> Wolfgang Huber, EMBL-EBI, http://www.ebi.ac.uk/huber
>
>
>
> daniel jupiter wrote:
>
> Hi all,
>
> undoubtedly this is a silly question.
> After struggling for quite some time, I think I've been able to do
> hypergerometric tests for GO enrichment using hyperGTest.
> The documentation is a bit thin, but it's eventually become clear.
> The next step is to draw the DAG, with significant genes
> highlighted, and
> term names replacing GO IDs.
> A wrinkle: I am just interested in a particular set of genes,
> relative to a
> universe - there is no array, no annotation involved.
>
> In any case, here is my code.
>
> params <- new("GOHyperGParams", geneIds = test,
> universeGeneIds = universe,annotation="org.Rn.eg.db",
> conditional = FALSE, categoryName="GO", ontology="CC",
> pvalueCutoff=.01)
>
> x=hyperGTest(params)
>
> y=termGraphs(x,use.terms=TRUE , pvalue=.01)
>
> plotGOTermGraph(y,x, node.colors=c(sig="white",not="blue"),
> node.shape="circle", add.counts=FALSE)
>
> I am returned the following error:
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "nodes", for
> signature
> "list"
>
> Am I doing something obviously wrong?
>
> Any help is greatly appreciated.
>
> Thanks
>
> Dan Jupiter.
>
>
>
>
> --
> Daniel C. Jupiter, Ph.D.
> Postdoctoral Research Associate
> Department of Systems Biology and Translational Medicine
> College of Medicine
> Texas A&M Health Science Center
> 702 SW H.K. Dodgen Loop
> Temple, TX 76504
>
> 979.997.2106 | Fax 254.742.7145
> djupiter at tamu.edu <mailto:djupiter at tamu.edu> | www.tamhsc.edu
> <http://www.tamhsc.edu>
More information about the Bioconductor
mailing list