py4cytoscape.style_mappings.set_edge_label_opacity_mapping

set_edge_label_opacity_mapping(table_column, table_column_values=None, opacities=None, mapping_type='c', default_opacity=None, style_name=None, network=None, base_url='http://127.0.0.1:1234/v1')[source]

Sets opacity for edge label only.

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

  • table_column_values (list) – List of values from Cytoscape table to be used in mapping

  • opacities (list) – int values between 0 and 255; 0 is invisible

  • mapping_type (str) – continuous, discrete or passthrough (c,d,p); default is continuous

  • default_opacity (int) – Opacity value to set as default for all unmapped values

  • 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://localhost:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.

Returns

’’

Return type

str

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

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

Examples

>>> set_edge_label_opacity_mapping('EdgeBetweenness', [2.0, 20000.0], opacities=[50, 100], style_name='galFiltered Style')
''
>>> set_edge_label_opacity_mapping('interaction', ['pp', 'pd'], opacities=[50, 100], mapping_type='d', style_name='galFiltered Style')
''
>>> set_edge_label_opacity_mapping(**gen_edge_opacity_map('interaction', mapping_type='d'))
''
>>> set_edge_label_opacity_mapping(**gen_edge_opacity_map('EdgeBetweenness', scheme_c_number_continuous(100, 200), style_name='galFiltered Style'))
''
>>> set_edge_label_opacity_mapping('PassthruCol', mapping_type='p', default_opacity=225, style_name='galFiltered Style')
''

See also

gen_edge_opacity_map()

See also

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