ngraph_toRCX {ndexr} | R Documentation |
This function creates an RCX object from a valid ngraph object.
ngraph_toRCX(ngraph, verbose = FALSE)
ngraph |
ngraph object |
verbose |
logical; whether to print out extended feedback |
The following rules apply to convert from ngraph
to RCX
:
all graph attributes are stored as named data.frames within the RCX object
nodes receive their name value as "@id" attribute. All other node attributes are saved in the RCX object as nodeAttributes, access via rcx[["nodeAttributes"]]. Data goes from wide format (columns for each unique n with cells contianing v) to long format (column n containing attribute name and column v containing attribute value).
edges are connected via their "s"art and "t"arget fields. The "@id" and "i"nteraction attribute are stored as is and all edgeAttributes are saved as node attributes, access via rcx[["edgeAttributes"]]. Data goes from wide format (columns for each unique n with cells contianing v) to long format (column n containing attribute name and column v containing attribute value).
returns object of class RCX if successfull, NULL otherwise
ngraph
ngraph_fromRCX
rcx_fromJSON
rcx_toJSON
## 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) ## Convert it back to rcx rcx = ngraph_toRCX(ngraph)