Copies a subset of nodes and edges into a newly created subnetwork.

createSubnetwork(
  nodes = NULL,
  nodes.by.col = "SUID",
  edges = NULL,
  edges.by.col = "SUID",
  exclude.edges = FALSE,
  subnetwork.name = NULL,
  network = NULL,
  base.url = .defaultBaseUrl
)

Arguments

nodes

list of nodes by SUID, by specified nodes.by.col value (e.g., name) or by keyword: selected, unselected or all. Default is currently selected nodes.

nodes.by.col

name of node table column corresponding to provided nodes list; default is 'SUID'

edges

list of edges by SUID, by specified nodes.by.col value (e.g., name) or by keyword: selected, unselected or all. Default is currently selected edges.

edges.by.col

name of edge table column corresponding to provided edges list; default is 'SUID'

exclude.edges

(boolean) whether to exclude connecting edges; default is FALSE

subnetwork.name

name of new subnetwork to be created; default is to add a numbered suffix to source network name

network

(optional) Name or SUID of the network. Default is the "current" network active in Cytoscape.

base.url

(optional) Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of RCy3.

Value

SUID of new subnetwork

Details

If you specify both nodes and edges, the resulting subset will be the union of those sets. Typical usage only requires specifying either nodes or edges. Note that selected nodes will bring along their connecting edges by default (see exclude.edges arg) and selected edges will always bring along their source and target nodes.

Examples

# \donttest{
createSubnetwork()
createSubnetwork("all")
createSubnetwork(subnetwork.name="mySubnetwork")
createSubnetwork(c("node 1","node 2","node 3"),"name")
createSubnetwork(c("AKT1","TP53","PIK3CA"),"display name")
createSubnetwork(edges="all") #subnetwork of all connected nodes
# }