ngraph_fromRCX {ndexr}R Documentation

Create ngraph object from RCX object

Description

This function creates an ngraph object from a supplied RCX object. RCX objects store the CX data as a named list of data.frames containing metaData and all aspects of the network. The ngraph class inherits from igraph and contains the complete (R)CX information as graph, node and edge attributes. All igraph functionality is available, e.g. access nodes and edges of igraph g via V(g) and E(g) and their attributes via V(g)$attribute

Usage

ngraph_fromRCX(rcx, verbose = FALSE)

Arguments

rcx

RCX object

verbose

logical; whether to print out extended feedback

Details

The following rules apply to convert from RCX to ngraph:

An ngraph object could look like this:

> str(ngraph)
 IGRAPH DN-- 5 11 -- PLK3 signaling events
 + attr: name (g/c), description (g/c), version (g/c), ndex:sourceFormat (g/c), name (v/c), @id (v/n), n
 | (v/c), test (v/c), relatedTo (v/x), @id (e/n), i (e/c)
 + edges (vertex names):
  [1] 60714376->60714377 60714381->60714377 60714384->60714377 60714377->60714376 60714377->60714381 60714377->60714381
  [7] 60714377->60714384 60714377->60714384 60714377->60714395 60714377->60714395 60714377->60714395
> V(ngraph)
 + 5/5 vertices, named:
  [1] 60714376 60714377 60714381 60714384 60714395
> V(ngraph)$n
 [1] "CCNE1" "PLK3"  "MPIP3" "CHK2"  "P53"
> E(ngraph)
 + 11/11 edges (vertex names):
  [1] 60714376->60714377 60714381->60714377 60714384->60714377 60714377->60714376 60714377->60714381 60714377->60714381
  [7] 60714377->60714384 60714377->60714384 60714377->60714395 60714377->60714395 60714377->60714395
> E(ngraph)$i
 [1] "neighbor-of"                 "neighbor-of"                 "neighbor-of"                
 [4] "controls-expression-of"      "controls-phosphorylation-of" "controls-state-change-of"   
 [7] "controls-phosphorylation-of" "controls-state-change-of"    "controls-phosphorylation-of"
 [10] "controls-state-change-of"    "neighbor-of"                

Value

returns object of class ngraph if successfull, NULL otherwise

See Also

ngraph_toRCX rcx_fromJSON rcx_toJSON RCX igraph

Examples

## Establish a server connection
ndexcon = ndex_connect()
## Find one of your networks and get its UUID
networks = ndex_find_networks(ndexcon)
networkId = networks[1,"externalId"]
## Get the network data 
rcx = ndex_get_network(ndexcon, networkId) 
## Convert to nGraph
ngraph = ngraph_fromRCX(rcx) 

[Package ndexr version 1.0.4 Index]