py4cytoscape.cy_ndex.get_network_ndex_id
-
get_network_ndex_id
(network=None, base_url='http://127.0.0.1:1234/v1')[source] Get Network NDEx Id.
Retrieve the NDEx externalId for a Cytoscape network, presuming it has already been exported to NDEx.
If the Cytoscape network is not associated with an NDEx network, the return value will be None.
- Parameters
network (SUID or str or None) – Name or SUID of a network. Default is the “current” network active in Cytoscape.
metadata (dict) – A list of structured information describing the network
base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.
- Returns
NDEx identifier
externalId
or NULL- Return type
str
- Raises
CyError – if network is invalid
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> get_network_ndex_id() '7bc2548c-9c93-11ea-aaef-0ac135e8bacf' >>> get_network_ndex_id(network='galFiltered.sif') '7bc2548c-9c93-11ea-aaef-0ac135e8bacf'