[BioC] Rgraphviz in windows 7 - problem with GUI?

Fraser Sim fjsim at buffalo.edu
Mon Dec 27 15:17:28 CET 2010


Hi Grace,

It looks like you're using an old version of R. You should upgrade to
2.12.1.

What version of graphviz do you have installed? What happens when you run
"library(Rgraphviz)"?

Cheers,
Fraser

-----Original Message-----
From: bioconductor-bounces at r-project.org
[mailto:bioconductor-bounces at r-project.org] On Behalf Of zhiqun tang
Sent: Monday, December 27, 2010 2:02 AM
To: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] Rgraphviz in windows 7 - problem with GUI?

Hi, I got the similar problem when I run the KEGGgraph package. Below is the
detailed information. please note that I use 64-bit windows 7

I run the following codes:

mapkKGML <- system.file("extdata/hsa04010.xml",
package="KEGGgraph")





###################################################

### chunk number 4: parsemapk

###################################################

mapkG <- parseKGML2Graph(mapkKGML,expandGenes=TRUE)

mapkG





###################################################

### chunk number 5: parsemapk2

###################################################

mapkpathway <- parseKGML(mapkKGML)

mapkpathway

mapkG2 <- KEGGpathway2Graph(mapkpathway, expandGenes=TRUE)

mapkG2





###################################################

### chunk number 6: nodeandedge

###################################################

mapkNodes <- nodes(mapkG)

nodes(mapkG)[1:3]

mapkEdges <- edges(mapkG)

edges(mapkG)[1]





###################################################

### chunk number 7: keggnodedata

###################################################

mapkGnodedata <- getKEGGnodeData(mapkG)

mapkGnodedata[[2]]





###################################################

### chunk number 8: keggnodedataalt eval=FALSE

###################################################

## getKEGGnodeData(mapkG, 'hsa:5924')





###################################################

### chunk number 9: keggedgedata

###################################################

mapkGedgedata <- getKEGGedgeData(mapkG)

mapkGedgedata[[4]]





###################################################

### chunk number 10: keggedgedataalt eval=FALSE

###################################################

## getKEGGedgeData(mapkG,'hsa:627~hsa:4915')





###################################################

### chunk number 11: inout

###################################################

mapkGoutdegrees <- sapply(edges(mapkG), length)

mapkGindegrees <- sapply(inEdges(mapkG), length)

topouts <- sort(mapkGoutdegrees, decreasing=T)

topins <- sort(mapkGindegrees, decreasing=T)

topouts[1:3]

topins[1:3]





###################################################

### chunk number 12: subsetprepare

###################################################

library(Rgraphviz)

set.seed(123)

randomNodes <- sample(nodes(mapkG), 25)

mapkGsub <- subGraph(randomNodes, mapkG)

mapkGsub





###################################################

### chunk number 13: makeattr

###################################################

makeAttr <- function(graph, default, valNodeList) {

  tmp <- nodes(graph)

  x <- rep(default, length(tmp)); names(x) <- tmp



  if(!missing(valNodeList)) {

    stopifnot(is.list(valNodeList))

    allnodes <- unlist(valNodeList)

    stopifnot(all(allnodes %in% tmp))

    for(i in seq(valNodeList)) {

      x[valNodeList[[i]]] <- names(valNodeList)[i]

    }

  }

  return(x)

}





###################################################

### chunk number 14: subsetplot

###################################################

outs <- sapply(edges(mapkGsub), length) > 0

ins <- sapply(inEdges(mapkGsub), length) > 0

ios <- outs | ins



## translate the KEGG IDs into Gene Symbol

if(require(org.Hs.eg.db)) {

  ioGeneID <- translateKEGGID2GeneID(names(ios))

  nodesNames <- sapply(mget(ioGeneID, org.Hs.egSYMBOL, ifnotfound=NA),
"[[",1)

} else {

  nodesNames <- names(ios)

}

names(nodesNames) <- names(ios)



nAttrs <- list();

nAttrs$fillcolor <- makeAttr(mapkGsub, "lightgrey",
list(orange=names(ios)[ios]))

nAttrs$label <- nodesNames


Everything is fine so far, and the sessionInfo() is following:



R version 2.10.1 (2009-12-14)

i386-pc-mingw32



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C


[5] LC_TIME=English_United States.1252



attached base packages:

[1] grid      stats     graphics  grDevices utils     datasets  methods
base



other attached packages:

[1] org.Hs.eg.db_2.3.6  RSQLite_0.8-4       DBI_0.2-5
AnnotationDbi_1.8.2
Biobase_2.6.1

[6] KEGGgraph_1.2.2     Rgraphviz_1.24.0    graph_1.26.0
XML_2.6-0




loaded via a namespace (and not attached):

[1] tools_2.10.1



However when I run

plot(mapkGsub, "neato", nodeAttrs=nAttrs,

     attrs=list(node=list(fillcolor="lightgreen",

                  width="0.75", shape="ellipse"),

       edge=list(arrowsize="0.7")))




The R GUI stopped, and shows that:

R for windows GUI front-end has stopped working

A problem caused the program to stop working correctly. Windows will close
the program and notify you if a solution is available



Anybody can tell me why this happens and how to solve it?

Thanks,

Grace

On Sat, Dec 25, 2010 at 12:03 AM, Alessandro Magrini <
alessandro.magrini at hotmail.it> wrote:

> mmh no...I have 32-bit Windows 7.
>
> graphviz works correctly, I have installed the version suggested 
> (2.20.3.1)...
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor at r-project.org
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list