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
Thanks I will try
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?
Do you have the CytoscapeRPC plugin installed? See https://www.bioconductor.org/packages/release/bioc/vignettes/RCytoscape/inst/doc/RCytoscape.pdf .
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
Please show the command you are using to try and install RCy3 as well as the output of sessionInfo() .
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)
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")
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
>
You need to run
R --vanilla
at a command prompt (press the Start button and type "cmd").
thank you with your helpful tips I installed that
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
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.
thank you. I did like so