py4cytoscape.tools.diffusion_advanced

diffusion_advanced(heat_column_name=None, time=None, base_url='http://127.0.0.1:1234/v1')[source]

Diffusion Advanced.

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. Advanced operation supports parameters.

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
  • heat_column_name (str) – A node column name intended to override the default table column diffusion_input. This represents the query vector and corresponds to h in the diffusion equation.

  • time (str) – The extent of spread over the network. This corresponds to t in the diffusion equation.

  • 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 and rankColumn is the name of the node table column containing the node’s (0-based) rank

Return type

dict

Raises
  • CyError – if an invalid parameter is passed

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

Examples

>>> diffusion_advanced(heat_column_name='diffusion_output_heat', time=0.1)
{'heatColumn': 'diffusion_output_1_heat', 'rankColumn': 'diffusion_output_1_rank'}