py4cytoscape.groups.remove_from_group¶
-
remove_from_group
(group_name, nodes=None, nodes_by_col='SUID', edges=None, edges_by_col='SUID', network=None, base_url='http://127.0.0.1:1234/v1')[source]¶ Remove the specified nodes and edges from the specified group.
- Parameters
group_name (str) – Specifies the name used to identify the group
nodes (list or str or int or None) – List of nodes or keyword: selected, unselected or all. If node list:
list
of node names or SUIDs, comma-separated string of node names or SUIDs, or scalar node name or SUID). Node names should be found in theSUID
column of thenode table
unless specified innodes_by_col
. If list is None, default is currently selected nodes.nodes_by_col (str) – name of node table column corresponding to provided nodes list. Default is ‘SUID’.
edges (str or list or int or None) – List of edges or keyword: selected, unselected or all. If edge list:
list
of edge names or SUIDs, comma-separated string of edge names or SUIDs, or scalar edge name or SUID). Edge names should be found in theSUID
column of theedge table
unless specified inedges_by_col
. If list is None, default is currently selected edges.edges_by_col (str) – name of edge table column corresponding to provided edges list. Default is ‘SUID’.
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
{}
- Return type
dict
- Raises
CyError – if network name or SUID doesn’t exist
requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error
Examples
>>> remove_from_group('Group 1', ['GDS1', 'SIP4', 'PDC1'], nodes_by_col='COMMON') # remove nodes by common name & all their edges {} >>> remove_from_group('Group 1', 'GDS1, SIP4, PDC1', nodes_by_col='COMMON') # remove nodes by common name & all their edges {} >>> remove_from_group('Group 1', [76545, 75499, 80299]) # remove nodes by SUID & all their edges {} >>> remove_from_group('Group 1', 80299) # remove node by SUID & all its edges {} >>> remove_from_group('Group 1') # remove all selected nodes and edges {} >>> remove_from_group('Group 1', nodes=[], edges=[78565, 79565]) # remove edges but not any nodes {} >>> remove_from_group('Group 1', nodes='unselected', edges='unselected') # remove all unselected nodes and edges {}