py4cytoscape.style_values.get_edge_property¶
- get_edge_property(edge_names=None, visual_property=None, network=None, base_url='http://127.0.0.1:1234/v1')[source]¶
Get values for any edge property of the specified edges.
This method retrieves the actual property of the node, given the current visual style, factoring together any default, mapping and bypass setting.
- Parameters
edge_names (list) – List of edge names or node SUIDs. Default is None for all edges.
visual_property (str) – Name of a visual property. See
get_visual_property_names
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: prop_value} for each edge in edge_names parameter
- Return type
dict
- Raises
CyError – if network name, edge name or property name doesn’t exist
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> get_edge_property(visual_property='EDGE_LABEL') {'YJR022W (pp) YNL050C': 'pp', 'YKR026C (pp) YGL122C': 'pp', ...} >>> get_edge_property(visual_property='EDGE_LABEL', edge_names=['YCL067C (pd) YIL015W', 'YCR084C (pp) YCL067C']) {'YCL067C (pd) YIL015W': 'pd', 'YCR084C (pp) YCL067C': 'pp'} >>> get_edge_property(visual_property='EDGE_LABEL', edge_names=[393222, 393223]) {393222: 'pd', 393223: 'pp'} >>> get_edge_property(visual_property='EDGE_LABEL', edge_names='YDR277C (pp) YJR022W', network='galFiltered.sif') {'YDR277C (pp) YJR022W': 'pp'}