ndex_network_get_aspect: Get a Network Aspect As CX

View source: R/ndex_networks_aspects_and_metadata.r

ndex_network_get_aspectR Documentation

Get a Network Aspect As CX

Description

This function retrieves the provided aspect as CX. The result is the same as accessing an aspect of a RCX object.

Usage

ndex_network_get_aspect(ndexcon, networkId, aspect, size)

Arguments

ndexcon

object of class NDExConnection linkndex_connect

networkId

character; unique ID of the network

aspect

character; name of the aspect

size

integer; specifies the number of elements returned

Details

Note: In future 'ndexr' uses the RCX-object from the corresponding package to handle the networks!

Value

data.frame of the aspect data (the same as rcx[[aspectName]])

REST query

GET: ndex_config$api$network$aspect$getMetaDataByName

Note

Compatible to NDEx server version 1.3 and 2.0, but doesn't work for version 1.3

Examples

## Establish a server connection
ndexcon = ndex_connect()
## Find a network and get its UUID
networks = ndex_find_networks(ndexcon,"p53", "nci-pid")
networkId = networks[1,"externalId"]
## Get the aspect of a network
aspect = ndex_network_get_aspect(ndexcon, networkId, 'nodeAttributes')
# limit the returned elements of the aspect to the first 10 elements
aspect = ndex_network_get_aspect(ndexcon, networkId, 'nodeAttributes', 10)

frankkramer-lab/ndexr documentation built on April 4, 2023, 7:19 p.m.