Connection Refused on port 9000 - RCytoscape
1
1
Entering edit mode
alptaciroglu ▴ 50
@alptaciroglu-8859
Last seen 16 months ago
Turkey

Dear All,

 

I am trying to use RCytoscape on an adjacency matrix. I converted adjacency matrix into a graphBAM object (dont really know if RCytoscape runs on that type of object but from what I read it should). 

 

g
A graphBAM graph with directed edges
Number of Nodes = 130 
Number of Edges = 147 

 

cw <- new.CytoscapeWindow('ADJ', graph=g, host="localhost", rpcPort = 9000)

Error in function (type, msg, asError = TRUE)  : 

  Failed to connect to localhost port 9000: Connection refused

 

I tried using port 9001 result is the same. I tried connecting to a different WIFI but result again did not change. 

I also wanted to use downloaded version of the Cytoscape 3.3.0 but I couldnt convert my adjacency matrix into a viable input.

I would appreciate any help and thank you

rcytoscape r network graphBAM object • 3.2k views
ADD COMMENT
2
Entering edit mode
Dan Tenenbaum ★ 8.2k
@dan-tenenbaum-4256
Last seen 7 months ago
United States

RCytoscape only works with Cytoscape 2.8.1. For Cytoscape 3.x you need to use the RCy3 package. You also need to install the CyRest app. See the vignette for more information.

 

 

ADD COMMENT
0
Entering edit mode

Thanks I will try

ADD REPLY
0
Entering edit mode

sorry I used Cytoscape 2.8.1 with RCytoscape  but i received this error

Error in function (type, msg, asError = TRUE)  : 
  Failed to connect to localhost port 9000: Connection refused

what is your suggestion please?

 

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

thank you I am installing that but may you tell me please why I can't install Rcy3 package??

Warning message:
package ‘RCy3’ is not available (for R version 3.2.2) 

thank you

ADD REPLY
0
Entering edit mode

Please show the command you are using to try and install RCy3 as well as the output of sessionInfo() .

 

ADD REPLY
0
Entering edit mode

thank you

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

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] Hmisc_3.17-3         ggplot2_2.1.0        Formula_1.2-1       
 [4] survival_2.39-2      lattice_0.20-33      Rgraphviz_2.12.0    
 [7] graph_1.46.0         minet_3.26.0         igraph_1.0.1        
[10] RCurl_1.95-4.8       bitops_1.0-6         BiocInstaller_1.18.5
[13] httr_1.1.0          

loaded via a namespace (and not attached):
Error in x[["Version"]] : subscript out of bounds
In addition: Warning messages:
1: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'cluster' is missing or broken
2: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'nnet' is missing or broken
3: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'Matrix' is missing or broken
4: In FUN(X[[i]], ...) :
  DESCRIPTION file of package 'foreign' is missing or broken

Warning message: package ‘RCy3’ is not available (for R version 3.2.2)

 

ADD REPLY
0
Entering edit mode

Your BiocInstaller is too old. Start R like this:

R --vanilla

Then do this until R tells you there is no such package:

remove.packages("BiocInstaller")

Then do:

source("https://bioconductor.org/biocLite.R")
biocLite("RCy3")

 

ADD REPLY
0
Entering edit mode

sorry I did like so

> R --vanilla
Error: object 'R' not found
> --vanilla
Error: object 'vanilla' not found
> vanilla
Error: object 'vanilla' not found
> remove.packages("BiocInstaller")
Removing package from ‘C:/Users/Lenovo/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
> library(BiocInstaller)
> remove.packages("BiocInstaller")
Removing package from ‘C:/Users/Lenovo/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘BiocInstaller’
> source("https://bioconductor.org/biocLite.R")
 Show Traceback
 
 Rerun with Debug
 Error in utils::packageVersion("BiocInstaller") : 
  package ‘BiocInstaller’ not found > biocLite("RCy3")
Error in library(BiocInstaller) : 
  there is no package called ‘BiocInstaller’
> R --vanilla
Error: object 'R' not found

ADD REPLY
1
Entering edit mode

You need to run 

R --vanilla

at a command prompt (press the Start button and type "cmd").

ADD REPLY
0
Entering edit mode

thank you with your helpful tips I installed that

ADD REPLY
0
Entering edit mode

sorry I have an expression data like below

> head(data[,1:4])
         ID Col.0.24h.primed.CEL.CEL Col.0.48h.primed.CEL.CEL Col.0.4h.primed.CEL.CEL
1 244906_at                 7.694273                 6.390339               11.420760
2 244950_at                 7.972370                 6.144543               10.554545

I am going to visualize correlation network by Rcy3 then I did like below

library(Hmisc)

COR <- rcorr(t(data), type = "pearson")

cor_mat <- COR$r

adj_p <- p.adjust(COR$P,method="fdr")

adj_pval_cor <-
matrix(adj_p,nrow(cor_mat),ncol(cor_mat),byrow=F,dimnames=list(rownames(cor_mat),colnames(cor_mat)))

diag(adj_pval_cor) <- 1

cor_mat[which(adj_pval_cor>0.05)] <- 0

diag(cor_mat) <- 0

library(igraph)

g <- graph.adjacency(cor_mat,mode="directed",weighted=T)

library(Rgraphviz)
 library(RCy3)
 g.cyto <- igraph.to.graphNEL(g)

g.cyto <- initNodeAttribute(g.cyto, attribute.name='weight', attribute.type='numeric',
default.value=0.0)

cw = CytoscapeWindow ("met_cluster_net", graph=g.cyto)

but I recieved this error 

Cytoscape window named 'met_cluster_net' does not exist yet
Error!  "weight" edge attribute not initialized.
        You should call:
        initEdgeAttribute (graph, attribute.name, attribute.type, default.value)
        where attribute type is one of "char", "integer", or "numeric".
        example:  g <- initEdgeAttribute (g, "edgeType", "char", "molecule")
             or:  g <- initEdgeAttribute (g, "pValue", "numeric", 1.0)
1 uninitialized edge attribute/s

may you help me please

thank you

ADD REPLY
1
Entering edit mode

Rather than initializing the node attribute, you would want to initialize the edge attribute: 

g.cyto <- initEdgeAttribute(g.cyto, attribute.name='weight', attribute.type='numeric',
default.value=0.0)

This ensures that the values from your matrix end up in the weight column in your edge table in Cytoscape.

Btw. I also advice you to update RCy3 to the latest version after the new Bioconductor release in early May which as crucial updates.

ADD REPLY
0
Entering edit mode

thank you. I did like so

ADD REPLY

Login before adding your answer.

Traffic: 204 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