py4cytoscape.style_values.get_edge_target_arrow_shape

get_edge_target_arrow_shape(edge_names=None, network=None, base_url='http://127.0.0.1:1234/v1')[source]

Retrieve the actual target arrow shape of specified edges.

Parameters
  • edge_names (str or list or int or None) – List of edges or None. If edge list: list of edge names or SUIDs, comma-separated string of edge names or SUIDs, or scalar node edge or SUID. Edge names should be found in the name column of the edge table. If list is None, default is all edges.

  • network (SUID or str or None) – Name or SUID of a network. 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

as a collection of {edge-name: arrow-shape} for each edge in edge_names parameter

Return type

dict

Raises
  • CyError – if network name or edge doesn’t exist

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

Examples

>>> get_edge_target_arrow_shape()
{'YMR117C (pp) YCL032W': 'NONE', 'YMR255W (pp) YGL122C': 'NONE', 'YNL214W (pp) YGL153W': 'NONE', ...}
>>> get_edge_target_arrow_shape(['YHR084W (pd) YFL026W', 'YHR084W (pd) YDR461W', 'YMR255W (pp) YGL122C'])
{'YHR084W (pd) YFL026W': 'NONE', 'YHR084W (pd) YDR461W': 'NONE', 'YMR255W (pp) YGL122C': 'NONE'}
>>> get_edge_target_arrow_shape('YHR084W (pd) YFL026W, YHR084W (pd) YDR461W, YMR255W (pp) YGL122C')
{'YHR084W (pd) YFL026W': 'NONE', 'YHR084W (pd) YDR461W': 'NONE', 'YMR255W (pp) YGL122C': 'NONE'}
>>> get_edge_target_arrow_shape([421382, 421383, 421380])
{421382: 'NONE', 421383: 'NONE', 421380: 'NONE'}
>>> get_edge_target_arrow_shape('421382, 421383, 421380')
{421382: 'NONE', 421383: 'NONE', 421380: 'NONE'}
>>> get_edge_target_arrow_shape(421382)
{421382: 'NONE'}
>>> get_edge_target_arrow_shape(edge_names='YOR355W (pp) YNL091W', network='galFiltered.sif')
{'YOR355W (pp) YNL091W': 'NONE'}

Note

To identify a node whose name contains a comma, use ‘\’ to escape the comma. For example, ‘node1 (pd) node\,2’ identifies ‘node1 (pd) node,2’.