py4cytoscape.style_auto_mappings.gen_edge_arrow_map

gen_edge_arrow_map(table_column, default_shape='ARROW', style_name=None, network=None, base_url='http://127.0.0.1:1234/v1')[source]

Generate arrow shape map parameters for discrete values in an edge table

Parameters
  • table_column (str) – Name of Cytoscape edge table column to map values from

  • default_shape (str) – arrow shape name to set as default for all unmapped values (default is ARROW)

  • style_name (str) – name for style

  • network (SUID or str or None) – Name or SUID of a network or view. Default is the “current” network active in Cytoscape.

  • 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

Collection of parameter values suitable for passing to an arrow style_mappings setter function

Return type

dict

Raises
  • CyError – if network doesn’t exist or if the number of discrete values exceed the number of available arrow styles

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

Examples

>>> gen_edge_arrow_map('interaction', style_name='galFiltered Style')
{'table_column': 'interaction', 'table_column_values': ['pp', 'pd'], 'shapes': ['ARROW', 'T'], 'default_shape': 'ARROW', 'style_name': 'galFiltered Style', 'network': None, 'base_url': 'http://127.0.0.1:1234/v1'}

See also

set_edge_source_arrow_shape_mapping(), set_edge_target_arrow_shape_mapping()