createSubnetwork: Create subnetwork from existing network

Description Usage Arguments Details Value Examples

View source: R/Networks.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 node names or 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 edge names or 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.

Details

If you spe@param 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.cify 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.

Value

SUID of new subnetwork

Examples

1
2
3
4
5
6
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

RCy3 documentation built on Nov. 21, 2020, 2 a.m.