py4cytoscape.cy_ndex.export_network_to_ndex

export_network_to_ndex(username, password, is_public, network=None, metadata=None, ndex_url='http://ndexbio.org', ndex_version='v2', base_url='http://127.0.0.1:1234/v1')[source]

Send a copy of a Cytoscape network to NDEx as a new submission.

Parameters
  • username (str) – NDEx account username; required for private content

  • password (str) – NDEx account password; required for private content

  • is_public (bool) – Whether to make the network publicly accessible at NDEx.

  • 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

  • ndex_url (str) – NDEX website url; Default is http://ndexbio.org

  • ndex_version (str) – NDEX version number; Default is v2

  • 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 for new submission

Return type

str

Raises
  • CyError – if credentials or network are invalid

  • requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error

Examples

>>> export_network_to_ndex('userid', 'password', False)
'7bc2548c-9c93-11ea-aaef-0ac135e8bacf'
>>> export_network_to_ndex('userid', 'password', False, network='galFiltered.sif')
'7bc2548c-9c93-11ea-aaef-0ac135e8bacf'

Note

Storing a network on NDEx and then immediately retrieving it may result in an error if NDEx has not finished indexing the network. Lags can range from a few seconds to a few minutes.