Rcytoscape Rstudio Error in xml.rpc(obj@uri, "Cytoscape.version") : Problems
11
1
Entering edit mode
@alessandro-brozzi-5276
Last seen 9.9 years ago
European Union

Dears,

I use Cytoscape 2.8 and Rcytoscape on my Ubuntu 64bit machine.

If I start an R session from the terminal and I run the following code:

library(RCytoscape)
g = new("graphNEL", edgemode="directed")
g = graph::addNode("U",g)
cw = new.CytoscapeWindow("vignette"

, graph=g, overwriteWindow=TRUE)
displayGraph(cw)

it works properly. Fine!

But the same code from Rstudio returns the following error:

> cw = new.CytoscapeWindow("vignette", graph=g, overwriteWindow=TRUE)
Error in xml.rpc(obj@uri, "Cytoscape.version") : Problems


Have you ever encountered this problem?

Thanks a lot for any hint!
Alessandro

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=it_IT.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=it_IT.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=it_IT.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
base

other attached packages:
 [1] RCurl_1.95-4.3       bitops_1.0-6         RCytoscape_1.12.0
 [4] XMLRPC_0.3-0         graph_1.40.1         igraph_0.7.1
 [7] plyr_1.8.1           org.Hs.eg.db_2.10.1  RSQLite_0.11.4
[10] DBI_0.3.1            AnnotationDbi_1.24.0 Biobase_2.22.0
[13] BiocGenerics_0.8.0   BiocInstaller_1.12.1 intervals_0.15.0

loaded via a namespace (and not attached):
[1] IRanges_1.20.7 Rcpp_0.11.3    stats4_3.0.2   tools_3.0.2
XML_3.98-1.1

software error rcytoscape xml • 3.6k views
ADD COMMENT
0
Entering edit mode
Andrzej Oleś ▴ 750
@andrzej-oles-5540
Last seen 4.0 years ago
Heidelberg, Germany

Hi Alessandro,

can you please make sure that you're using the same versions of R and RCytoscape in both cases, i.e. the version numbers returned by sessionInfo() are the same in R run from terminal and in RStudio?

Best, Andrzej

ADD COMMENT
0
Entering edit mode
@alessandro-brozzi-5276
Last seen 9.9 years ago
European Union

hi Andrzej,

yes the session info are exactley the same.

In th epast days did a lot of debugging. What I guess is something wrong here:

> xml.rpc(cy.tmp,"Cytoscape.version")
Error in .postForm(curl, .opts, .params, style) :
  Unhandled case for the value of curl_easy_setopt (R type = 25, option 10002)

my two cents,

Alex

 

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=it_IT.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=it_IT.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=it_IT.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] RCytoscape_1.12.0 XMLRPC_0.3-0      graph_1.40.1     

loaded via a namespace (and not attached):
[1] BiocGenerics_0.8.0 parallel_3.0.2     RCurl_1.95-4.3    
[4] stats4_3.0.2       tools_3.0.2        XML_3.98-1.1  

ADD COMMENT
0
Entering edit mode
Andrzej Oleś ▴ 750
@andrzej-oles-5540
Last seen 4.0 years ago
Heidelberg, Germany

Hi Alex,

I don't know whether this is useful for you, but I tried to reproduce your issue by installing Cytoscape 2.8.1 along with the CytoscapeRPC plugin from http://apps.cytoscape.org .

Interestingly, when trying to run your example I get the following error (both from console and RStudio):

> library(RCytoscape)
> g = new("graphNEL", edgemode="directed")
> g = graph::addNode("U",g)
> cw = new.CytoscapeWindow("vignette", graph=g, overwriteWindow=TRUE)
nodes have no label attribute -- adding default labels
> displayGraph(cw)
estimated displayGraph time:      0.0 seconds
adding 1 nodes...
sending 1 nodes
Error: faultCode:  0  faultString:  No method matching arguments: java.lang.String, java.lang.String

The example from the RCytoscape vignette

> library(RCytoscape)
> g <- new ('graphNEL', edgemode='directed')
> g <- graph::addNode ('A', g)
> g <- graph::addNode ('B', g)
> g <- graph::addNode ('C', g)
> cw <- new.CytoscapeWindow ('vignette', graph=g)
> displayGraph (cw)

works just fine for me, both from terminal and RStudio.

What I've noticed is that you're using an outdated version of R (3.0.2 vs. 3.1.1). Also, what version of Cytoscape are you using exactly?

Best,

Andrzej

ADD COMMENT
0
Entering edit mode
pshannon ▴ 100
@pshannon-6931
Last seen 9.1 years ago
United States

The "no method matching arguments: java.lang.String, java.lang.String" for a 1-node graph gives us the clue we need -- and points to my programming bug.

In R, even a scalar is a list, but when translated to XML and then java, a scalar is a scalar.

It appears therefore that I never tested a 1-node graph, and you walked right into my omission.

Thanks to Andrzej for pointing out the 3-node example, and offering the suggestion to upgrade your R to 3.1.1.

RCytoscape works only with versions 2.x of Cytoscape, with 2.8.3 strongly recommended.  We have a volunteer working on porting RCytoscape to versions >-= 3.2,  and I am (slowly) doing the port to cytoscape.js.

I will fix the current release and devel versions of RCy to handle 1-node graphs.

 - Paul

ADD COMMENT
0
Entering edit mode
@alessandro-brozzi-5276
Last seen 9.9 years ago
European Union

hi!

Thank you very much for the suggestions.

I made the R upgrade but the error is still there :( I don't really understand why from the console it perfectly works.

May be due to some "proxy" configurations?

BTW: Cytoscape rel: 2.8.3, plugin: 1.8

bests!

Alex

ADD COMMENT
0
Entering edit mode
pshannon ▴ 100
@pshannon-6931
Last seen 9.1 years ago
United States

Hi Alex,

Sorry you are still having trouble with RStudio/RCy.   In your original posting -- forgive me if you provided more information and I missed it --you say:

> cw = new.CytoscapeWindow("vignette", graph=g, overwriteWindow=TRUE)
Error in xml.rpc(obj@uri, "Cytoscape.version") : Problems

Can you provide the full traceback (via the "traceback()" command)?

For what it's worth, I just installed the latest RStudio, started up Cytoscape 2.8.3:

library(RCytoscape)
demoSimpleGraph()

and everything worked fine.    

With more details, we should be able to figure out your problem.

- Paul

ADD COMMENT
0
Entering edit mode
@alessandro-brozzi-5276
Last seen 9.9 years ago
European Union

hi Paul,

fisrt of all thank you sincerely for the help you are providing.

Here we go:

> cw = new.CytoscapeWindow('vignette', graph=g, overwriteWindow=TRUE)
Error in xml.rpc(obj@uri, "Cytoscape.version") : Problems
> traceback()
6: stop("Problems")
5: xml.rpc(obj@uri, "Cytoscape.version")
4: pluginVersion(cyCon)
3: pluginVersion(cyCon)
2: check.cytoscape.plugin.version(cy.tmp)
1: new.CytoscapeWindow("vignette", graph = g, overwriteWindow = TRUE)

(RStudio Version: 0.98.1049)

demoSimpleGraph() works fine from the console but again not from RStudio.

HTH,

Alex

ADD COMMENT
0
Entering edit mode
pshannon ▴ 100
@pshannon-6931
Last seen 9.1 years ago
United States

Hi Alex,

Try this:

library(RCytoscape)
cw = new.CytoscapeWindow ("test", graph=RCytoscape::makeSimpleGraph ())
xml.rpc(cw@uri, "Cytoscape.test")  #  should display   [1] "It works!"

- Paul

ADD COMMENT
0
Entering edit mode
@alessandro-brozzi-5276
Last seen 9.9 years ago
European Union

hi paul,

> library(RCytoscape)
Loading required package: graph
Loading required package: XMLRPC
> cw = new.CytoscapeWindow ("test", graph=RCytoscape::makeSimpleGraph ())
Error in xml.rpc(obj@uri, "Cytoscape.version") : Problems
> xml.rpc(cw@uri, "Cytoscape.test")
Error in merge(list(...), .opts) : object 'cw' not found

don't worry I'll find another solution. In any computer I had it was working. It might simply be a problem with this machine.

alex

ADD COMMENT
0
Entering edit mode
pshannon ▴ 100
@pshannon-6931
Last seen 9.1 years ago
United States

HI Alex,

I suspect you are right:  some port blocked, perhaps.

Here is a simple no-Cytoscape test which may be useful:

 

url <- "http://xmlrpc-c.sourceforge.net/api/sample.php"
xml.rpc (url, 'sample.add', 1L, 1L)  # [1] 2

- Paul

 

ADD COMMENT
0
Entering edit mode
drsuuzzz • 0
@drsuuzzz-7067
Last seen 10.0 years ago
United States

Hi,

I'm having the same problem with R 3.1.2 and Cytoscape 2.8.3 on Windows 7.  I see the problem on the command line and within R studio.However, I get a different error when attempting demoSimpleGraph().  Is there any news on a work around?

Thanks!

Suzy

> library(RCytoscape)
Loading required package: graph
Loading required package: XMLRPC
> demoSimpleGraph()
Error in xml.rpc(obj@uri, "Cytoscape.getNetworkCount") : Problems
> traceback()
9: stop("Problems")
8: xml.rpc(obj@uri, "Cytoscape.getNetworkCount")
7: getWindowCount(obj)
6: getWindowCount(obj)
5: getWindowList(cy)
4: getWindowList(cy)
3: match(x, table, nomatch = 0L)
2: window.title %in% as.character(getWindowList(cy))
1: demoSimpleGraph()

> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RCytoscape_1.16.0 XMLRPC_0.3-0      graph_1.44.0

loaded via a namespace (and not attached):
[1] BiocGenerics_0.12.1 parallel_3.1.2      RCurl_1.95-4.3
[4] stats4_3.1.2        tools_3.1.2         XML_3.98-1.1

ADD COMMENT
0
Entering edit mode

hi,

I solved it setting no http proxy:

Sys.setenv(http_proxy="")

HTH

alex

 

 

ADD REPLY

Login before adding your answer.

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