py4cytoscape.style_mappings.set_node_label_mapping

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

Pass the values from a table column to display as node labels.

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

  • 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

‘’ if successful or None if error

Return type

str or None

Raises
  • CyError – if table column doesn’t exist, table column values doesn’t match values list, or invalid style name, network or mapping type

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

Examples

>>> set_node_label_mapping('name', style_name='galFiltered Style')
''
>>> set_node_label_mapping('name')
''