py4cytoscape.style_auto_mappings.gen_edge_line_style_map

gen_edge_line_style_map(table_column, default_line_style='SOLID', style_name=None, network=None, base_url='http://127.0.0.1:1234/v1')[source]

Generate line style map parameters for discrete values in an edge table

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

  • default_line_style (str) – line style name to set as default for all unmapped values (default is SOLID)

  • 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 a line style 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 line styles

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

Examples

>>> gen_edge_line_style_map('interaction', style_name='galFiltered Style')
{'table_column': 'interaction', 'table_column_values': ['pp', 'pd'], 'line_styles': ['PARALLEL_LINES', 'SINEWAVE'], 'default_line_style': 'SOLID', 'style_name': 'galFiltered Style', 'network': None, 'base_url': 'http://127.0.0.1:1234/v1'}

See also

set_edge_line_style_mapping()

See also

Value Generators in the Concepts section in the py4cytoscape User Manual.