accessing the added edge

3 views
Skip to first unread message

Burak Kutlu

unread,
May 2, 2012, 5:54:23 PM5/2/12
to rcyto...@googlegroups.com
Hello

I am trying to add an edge and set the attributes directly
I am trying to do the following that does not work:..
Many thanks
-burak

> addCyEdge (cwB, '71950', '13392', 'inhibition', directed = TRUE)
> redraw (cwB)
> listEdges(cwB@graph)['71950:13392']
$<NA>
NULL

> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] limma_3.12.0         RCytoscape_1.6.3     XMLRPC_0.2-4        
 [4] org.Mm.eg.db_2.7.1   RSQLite_0.11.1       DBI_0.2-5           
 [7] AnnotationDbi_1.18.0 Biobase_2.16.0       BiocGenerics_0.2.0  
[10] graph_1.34.0         BiocInstaller_1.4.4 

loaded via a namespace (and not attached):
[1] IRanges_1.14.2 RCurl_1.91-1   stats4_2.15.0  tools_2.15.0   XML_3.9-4     

Paul Shannon

unread,
May 2, 2012, 6:34:53 PM5/2/12
to rcyto...@googlegroups.com, rcyto...@googlegroups.com
Hi Burak,

The edge you added is in the cytoscape network, but not yet in the R graph. There is, as yet, no automatic syncing of the two.

Maybe 'addCyEdge' should add to both data structures? Maybe be renamed simply 'addEdge'?

- Paul

Burak Kutlu

unread,
May 2, 2012, 7:16:44 PM5/2/12
to rcyto...@googlegroups.com
Hi Paul
I see..

You must have had a good reason to create a separate addCyEdge function. I would be curious to know, which may actually useful for me.
Thanks!
-burak

Paul Shannon

unread,
May 3, 2012, 3:02:31 PM5/3/12
to rcyto...@googlegroups.com, Paul Shannon, Burak Kutlu
Hi Burak,

Sorry, I cannot remember why I added this. It is a method Jan exposes in the RPC interface; maybe I was trying to be complete.

Your recent questions have got me to thinking: perhaps RCy needs a 'sync' method which makes sure that the Cytoscape network, and the R graph object, are in sync with each other. I imagine this would have two forms:

1) syncFromCytoscapeToR: treat the Cytoscape network as the true one
2) syncFromRToCytoscape: treat the R graph as the the true one

What do you think?

- Paul

Burak Kutlu

unread,
May 4, 2012, 12:46:25 AM5/4/12
to rcyto...@googlegroups.com, Paul Shannon, Burak Kutlu
I would welcome this added feature!
Thanks
-burak
Reply all
Reply to author
Forward
0 new messages