py4cytoscape.tools.diffusion_basic
-
diffusion_basic
(base_url='http://127.0.0.1:1234/v1')[source] Diffusion Basic.
Diffusion will send the selected network view and its selected nodes to a web-based REST service to calculate network propagation. Results are returned and represented by columns in the node table.
Columns are created for each execution of Diffusion and their names are returned in the response. The nodes you would like to use as input should be selected. This will be used to generate the contents of the
diffusion_input
column, which represents the query vector and corresponds to h in the diffusion equation.- Parameters
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
{‘heatColumn’: ‘diffusion_output_heat’, ‘rankColumn’: ‘diffusion_output_rank’} where
heatColumn
is the name of the node table column containing each node’s calculated heat andrankColumn
is the name of the node table column containing the node’s (0-based) rank- Return type
dict
- Raises
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> diffusion_basic() {'heatColumn': 'diffusion_output_heat', 'rankColumn': 'diffusion_output_rank'}