[BioC] two-line labels in GO graphs
Marc Carlson
mcarlson at fhcrc.org
Thu Mar 13 17:00:58 CET 2008
Robert Castelo wrote:
> dear list,
>
> i would like to produce a GO graph where the labels of the nodes are
> formed by the GO identifier and the GO term and these two pieces of
> information appear in two different lines within the node, in order to
> draw nodes somewhat narrower than if i have these two pieces in one
> single line.
>
> the following code does the job putting GO ID and GO term in the same
> line separated by one space character:
>
> library(GOstats)
> library(Rgraphviz)
>
> goterms <- eapply(GOTERM,Term)
> g <- GOGraph("GO:0016265",GOBPPARENTS)
> g <- removeNode("all",g)
> mt <- match(nodes(g),names(goterms))
> nodattr <- makeNodeAttrs(g,label=paste(nodes(g),goterms[mt],sep=" "),
> shape="ellipse",fillcolor="#f2f2f2",
> fixedsize=FALSE)
> plot(g,nodeAttrs=nodattr)
>
>
> if i replace the space character " " by "\n" in the 'sep' parameter of
> the 'makeNodeAttrs' function, i do not get the desired behavior, it just
> shows the GO ID.
>
> anyone has tried this or has an idea how it could be done ?
>
>
>
> my sessionInfo():
>
> R version 2.6.0 (2007-10-03)
> x86_64-unknown-linux-gnu
>
> locale:
> C
>
> attached base packages:
> [1] splines tools stats graphics grDevices utils
> datasets
> [8] methods base
>
> other attached packages:
> [1] Rgraphviz_1.16.0 GOstats_2.4.0 Category_2.4.0
> [4] genefilter_1.16.0 survival_2.32 RBGL_1.14.0
> [7] annotate_1.16.1 xtable_1.5-2 GO.db_2.0.2
> [10] AnnotationDbi_1.0.6 RSQLite_0.6-4 DBI_0.2-4
> [13] Biobase_1.16.1 graph_1.16.1
>
> loaded via a namespace (and not attached):
> [1] cluster_1.11.9 rcompgen_0.1-15
>
>
> thanks!!
> robert.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
First of all thanks for pointing this out. I have looked into why this
was happening and have found the cause to be the source files that come
from ftp.geneontology.org . As you observed, the error appears to only
affect the direct term to term association mapping for this one term. I
have notified them of the error and I anticipate that it will probably
be cleaned up very soon.
Marc
More information about the Bioconductor
mailing list