py4cytoscape.networks.create_network_from_networkx¶
- create_network_from_networkx(netx, title='From networkx', collection='My NetworkX Network Collection', base_url='http://127.0.0.1:1234/v1')[source]¶
Create a Cytoscape network from a NetworkX graph.
- Parameters
netx (MultiDiGraph) – networkx MultiDiGraph object
title (str) – network name
collection (str) – network collection name
base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://127.0.0.1:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.
- Returns
{‘networkSUID’: 31766}
- Return type
Dict
- Raises
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> n = create_network_from_networkx(netx) {'networkSUID': 31766} >>> n = create_network_from_networkx(netx, 'Cool Networkx', 'Collection of Cool Networks') {'networkSUID': 31766}
See also