I ran the below code and I am not sure what I am doing wrong. I am just trying to select two nodes but the selectNode function just returns all the node names (twice) and doesn't select the nodes specified. (I attached the session file that I used.)
cw <- existing.CytoscapeWindow(title = "test_network" ,copy.graph.from.cytoscape.to.R = FALSE)
em_graph <- getGraphFromCyWindow(cy, "test_network")
em_graph
A graphNEL graph with directed edges
Number of Nodes = 5
Number of Edges = 5
selectNodes(cw, c('RESPONSE TO CYTOKINE%GOBP%GO:0034097','CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221'))
[1] "RESPONSE TO CYTOKINE%GOBP%GO:0034097"
[2] "RESPONSE TO INTERFERON-GAMMA%GOBP%GO:0034341"
[3] "INTERFERON SIGNALING%REACTOME DATABASE ID RELEASE 56%913531"
[4] "CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221"
[5] "INTERFERON GAMMA SIGNALING%REACTOME DATABASE ID RELEASE 56%877300"
[1] "RESPONSE TO CYTOKINE%GOBP%GO:0034097"
[2] "RESPONSE TO INTERFERON-GAMMA%GOBP%GO:0034341"
[3] "INTERFERON SIGNALING%REACTOME DATABASE ID RELEASE 56%913531"
[4] "CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221"
[5] "INTERFERON GAMMA SIGNALING%REACTOME DATABASE ID RELEASE 56%877300"
I ran the below code and I am not sure what I am doing wrong. I am just trying to select two nodes but the selectNode function just returns all the node names (twice) and doesn't select the nodes specified. (I attached the session file that I used.)
library("RCy3")
get connection to cytoscape window
cy <- CytoscapeConnection ()
get all the names of the cytoscape windows
em_name <- getWindowList(cy) em_name 'test_network'
cw <- existing.CytoscapeWindow(title = "test_network" ,copy.graph.from.cytoscape.to.R = FALSE) em_graph <- getGraphFromCyWindow(cy, "test_network") em_graph A graphNEL graph with directed edges Number of Nodes = 5 Number of Edges = 5
selectNodes(cw, c('RESPONSE TO CYTOKINE%GOBP%GO:0034097','CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221')) [1] "RESPONSE TO CYTOKINE%GOBP%GO:0034097"
[2] "RESPONSE TO INTERFERON-GAMMA%GOBP%GO:0034341"
[3] "INTERFERON SIGNALING%REACTOME DATABASE ID RELEASE 56%913531"
[4] "CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221"
[5] "INTERFERON GAMMA SIGNALING%REACTOME DATABASE ID RELEASE 56%877300" [1] "RESPONSE TO CYTOKINE%GOBP%GO:0034097"
[2] "RESPONSE TO INTERFERON-GAMMA%GOBP%GO:0034341"
[3] "INTERFERON SIGNALING%REACTOME DATABASE ID RELEASE 56%913531"
[4] "CYTOKINE-MEDIATED SIGNALING PATHWAY%GOBP%GO:0019221"
[5] "INTERFERON GAMMA SIGNALING%REACTOME DATABASE ID RELEASE 56%877300"