py4cytoscape.py4cytoscape_utils.table_column_exists
-
table_column_exists
(table_column, table, network=None, base_url='http://127.0.0.1:1234/v1')[source] Checks to see if a particular column name exists in the specific table.
- Parameters
table_column (str) – name of column within table
table (str) – name of table to check (e.g., ‘node’, ‘edge’, ‘network’)
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
True if column exists, False if not
- Return type
bool
- Raises
CyError – if table or network name or SUID doesn’t exist
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> table_column_exists('YDL194W', 'node') True >>> table_column_exists('bogus', 'edge', network='myNetwork') False