py4cytoscape.tables.get_table_value
-
get_table_value
(table, row_name, column, namespace='default', network=None, base_url='http://127.0.0.1:1234/v1')[source] Retrieve the value from a specific row and column from node, edge or network tables.
- Parameters
table (str) – Name of table, e.g., node (default), edge, network
row_name (str) – Node, edge or network name, i.e., the value in the “name” column
column (str) – Name of column to retrieve values from
namespace (str) – Namespace of table. Default is “default”.
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
the value of the table cell, cast to float, int, bool or str depending on column type
- Return type
obj
- Raises
HTTPError – if table or namespace doesn’t exist in network or if cell contains a numeric type but no number
CyError – if network name or SUID doesn’t exist
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> get_table_value('node', 'YDL194W', 'COMMON') 'SNF3' >>> get_table_value('edge', 'YLR197W (pp) YOR310C', 'EdgeBetweenness', network='My Network') 2.0 >>> get_table_value('node', 'YDL194W', 'IsSingleNode') False