pkgname <- "RCytoscape" source(file.path(R.home("share"), "R", "examples-header.R")) options(warn = 1) library('RCytoscape') assign(".oldSearch", search(), pos = 'CheckExEnv') cleanEx() nameEx("CytoscapeConnection") ### * CytoscapeConnection flush(stderr()); flush(stdout()) ### Name: CytoscapeConnection ### Title: CytoscapeConnection ### Aliases: CytoscapeConnection ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () deleteAllWindows (cy) getNodeShapes (cy) hidePanel (cy, 'Control') cleanEx() nameEx("CytoscapeConnectionClass-class") ### * CytoscapeConnectionClass-class flush(stderr()); flush(stdout()) ### Name: CytoscapeConnectionClass-class ### Title: Class "CytoscapeConnectionClass" ### Aliases: CytoscapeConnectionClass-class ### Keywords: graphs classes ### ** Examples # create a CytoscapeConnectionClass object by calling the constructor cy <- CytoscapeConnection (host='localhost', rpcPort=9000) cleanEx() nameEx("CytoscapeWindow") ### * CytoscapeWindow flush(stderr()); flush(stdout()) ### Name: CytoscapeWindow ### Title: CytoscapeWindow ### Aliases: CytoscapeWindow ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('cw demo', new ('graphNEL')) cleanEx() nameEx("CytoscapeWindowClass-class") ### * CytoscapeWindowClass-class flush(stderr()); flush(stdout()) ### Name: CytoscapeWindowClass-class ### Title: Class "CytoscapeWindowClass" ### Aliases: CytoscapeWindowClass-class ### Keywords: graphs classes ### ** Examples # create a CytoscapeWindowClass object by calling the constructor c2 <- CytoscapeWindow ('cwc demo', makeSimpleGraph ()) cleanEx() nameEx("addCyEdge") ### * addCyEdge flush(stderr()); flush(stdout()) ### Name: addCyEdge ### Title: addCyEdge ### Aliases: addCyEdge addCyEdge,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.name <- 'demo addCyEdge' cw <- new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) directed = TRUE addCyEdge (cw, 'A', 'B', 'synthetic rescue', directed) redraw (cw) layout (cw) cleanEx() nameEx("addCyNode") ### * addCyNode flush(stderr()); flush(stdout()) ### Name: addCyNode ### Title: addCyNode ### Aliases: addCyNode addCyNode,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.name <- 'demo addCyNode' cw <- new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) addCyNode (cw, 'A NEW NODE') redraw (cw) layout (cw) cleanEx() nameEx("addGraphToGraph") ### * addGraphToGraph flush(stderr()); flush(stdout()) ### Name: addGraphToGraph ### Title: addGraphToGraph ### Aliases: addGraphToGraph addGraphToGraph,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.name <- 'demo addGraphToGraph' cw3 <- new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw3) redraw (cw3) layout (cw3) # create a new graph, which adds two nodes, and edges between them # and an existing node, A g2 <- new("graphNEL", edgemode = "directed") g2 <- graph::addNode ('A', g2) g2 <- graph::addNode ('D', g2) g2 <- graph::addNode ('E', g2) g2 <- initNodeAttribute (g2, "label", "char", "default node label") g2 <- initEdgeAttribute (g2, "edgeType", "char", "unspecified") g2 <- initEdgeAttribute (g2, "probability", "numeric", 0.0) nodeData (g2, 'D', 'label') <- 'Gene D' nodeData (g2, 'E', 'label') <- 'Gene E' g2 <- graph::addEdge ('D', 'E', g2) g2 <- graph::addEdge ('A', 'E', g2) edgeData (g2, 'D', 'E', 'probability') <- 0.95 edgeData (g2, 'D', 'E', 'edgeType') <- 'literature' edgeData (g2, 'A', 'E', 'edgeType') <- 'inferred' addGraphToGraph (cw3, g2) redraw (cw3) layout (cw3) cleanEx() nameEx("clearMsg") ### * clearMsg flush(stderr()); flush(stdout()) ### Name: clearMsg ### Title: clearMsg ### Aliases: clearMsg clearMsg,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () clearMsg (cy) cleanEx() nameEx("clearSelection") ### * clearSelection flush(stderr()); flush(stdout()) ### Name: clearSelection ### Title: clearSelection ### Aliases: clearSelection clearSelection,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw<- CytoscapeWindow ('clearSelection.test', graph=makeSimpleGraph()) displayGraph (cw) selectNodes (cw, 'A') print (getSelectedNodeCount (cw)) # should be 1 clearSelection (cw) print (getSelectedNodeCount (cw)) # should be 0 cleanEx() nameEx("copyVisualStyle") ### * copyVisualStyle flush(stderr()); flush(stdout()) ### Name: copyVisualStyle ### Title: copyVisualStyle ### Aliases: copyVisualStyle ### copyVisualStyle,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples # create the usual demo graph and Cytoscape window, then # specify that all the edges should be 5 pixels wide. This affects the 'default' style only # in order to save this style for later use, copy it to a # new style named 'fatEdgeStyle' # the related method 'setVisualStyle' must be called in order for # the fatEdgestyle to be associated with this window (and saved # into the CytoscapeSession file from the Cytoscape application's # File menu) window.name = 'demo.copyVisualStyle' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) setDefaultEdgeLineWidth (cw, 5); displayGraph (cw) redraw (cw) layout (cw) # create a unique style name, using millisecond precision, so should be unique time.msec = proc.time()[['elapsed']] new.unique.style.name = paste ('fatEdgeStyle', time.msec, sep='.') copyVisualStyle (cw, 'default', new.unique.style.name) new.names = getVisualStyleNames (cw) setVisualStyle (cw, new.unique.style.name) # save the session form the Cytoscape application menu. the new # style name will be saved along with the network and its attributes cleanEx() nameEx("createWindowFromSelection") ### * createWindowFromSelection flush(stderr()); flush(stdout()) ### Name: createWindowFromSelection ### Title: createWindowFromSelection ### Aliases: createWindowFromSelection ### createWindowFromSelection,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () title <- 'createWindowFromSelection demo' cw <- new.CytoscapeWindow (title, makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) selectNodes (cw, c ('A', 'C')) new.window.title <- 'NEW WINDOW' if (new.window.title %in% as.character (getWindowList (cy))) deleteWindow (cy, new.window.title) c2 <- createWindowFromSelection (cw, new.window.title, TRUE) redraw (c2) layout (c2) clearSelection (c2) selectNodes (c2, 'C') print (getSelectedNodeCount (c2)) # should be 1 cleanEx() nameEx("cy2.edge.names") ### * cy2.edge.names flush(stderr()); flush(stdout()) ### Name: cy2.edge.names ### Title: cy2.edge.names ### Aliases: cy2.edge.names ### Keywords: graph ### ** Examples g <- makeSimpleGraph () cy2.edge.names (g) # A~B B~C C~A # "A (phosphorylates) B" "B (synthetic lethal) C" "C (undefined) A" cleanEx() nameEx("deleteAllWindows") ### * deleteAllWindows flush(stderr()); flush(stdout()) ### Name: deleteAllWindows ### Title: deleteAllWindows ### Aliases: deleteAllWindows ### deleteAllWindows,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () cw1 = new.CytoscapeWindow ('cw1') cw2 = new.CytoscapeWindow ('cw2') deleteAllWindows (cy) cleanEx() nameEx("deleteEdgeAttribute") ### * deleteEdgeAttribute flush(stderr()); flush(stdout()) ### Name: deleteEdgeAttribute ### Title: deleteEdgeAttribute ### Aliases: deleteEdgeAttribute ### deleteEdgeAttribute,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.name = 'demo.deleteEdgeAttribute' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) setDefaultEdgeLineWidth (cw, 5); displayGraph (cw) redraw (cw) layout (cw) print (paste ("before: ", getEdgeAttributeNames (cw))) deleteEdgeAttribute (cw, 'score') print (paste ("after: ", getEdgeAttributeNames (cw))) cleanEx() nameEx("deleteNodeAttribute") ### * deleteNodeAttribute flush(stderr()); flush(stdout()) ### Name: deleteNodeAttribute ### Title: deleteNodeAttribute ### Aliases: deleteNodeAttribute ### deleteNodeAttribute,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.name = 'demo.deleteNodeAttribute' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) print (paste ("before: ", getNodeAttributeNames (cw))) deleteNodeAttribute (cw, 'count') print (paste ("after: ", getNodeAttributeNames (cw))) cleanEx() nameEx("deleteSelectedEdges") ### * deleteSelectedEdges flush(stderr()); flush(stdout()) ### Name: deleteSelectedEdges ### Title: deleteSelectedEdges ### Aliases: deleteSelectedEdges ### deleteSelectedEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('deleteSelectedEdges.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (cy2.edge.names (cw@graph)) # find out Cytoscape's names for these edges selectEdges (cw, "B (synthetic lethal) C") deleteSelectedEdges (cw) redraw (cw) cleanEx() nameEx("deleteSelectedNodes") ### * deleteSelectedNodes flush(stderr()); flush(stdout()) ### Name: deleteSelectedNodes ### Title: deleteSelectedNodes ### Aliases: deleteSelectedNodes ### deleteSelectedNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('deleteSelectedNodes.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (nodes (cw@graph)) selectNodes (cw, "B") deleteSelectedNodes (cw) cleanEx() nameEx("deleteWindow") ### * deleteWindow flush(stderr()); flush(stdout()) ### Name: deleteWindow ### Title: deleteWindow ### Aliases: deleteWindow deleteWindow,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.title <- 'demo deleteWindow' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw) deleteWindow (cw) cw2 <- new.CytoscapeWindow ('demo 2') cy = CytoscapeConnection () deleteWindow (cy, 'demo 2') cleanEx() nameEx("displayGraph") ### * displayGraph flush(stderr()); flush(stdout()) ### Name: displayGraph ### Title: displayGraph ### Aliases: displayGraph displayGraph,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('displayGraph.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) cleanEx() nameEx("dockPanel") ### * dockPanel flush(stderr()); flush(stdout()) ### Name: dockPanel ### Title: dockPanel ### Aliases: dockPanel dockPanel,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () dockPanel (cy, 'Control Panel') # or dockPanel (cy, 'c') cleanEx() nameEx("eda") ### * eda flush(stderr()); flush(stdout()) ### Name: eda ### Title: eda ### Aliases: eda ### Keywords: graph ### ** Examples g <- makeSimpleGraph() eda (g, 'edgeType') ## The function is currently defined as function (graph, edge.attribute.name) { unlist (sapply (names (edgeData (graph)), function (n) edgeData (graph)[[n]][[edge.attribute.name]])) } # eda cleanEx() nameEx("eda.names") ### * eda.names flush(stderr()); flush(stdout()) ### Name: eda.names ### Title: eda.names ### Aliases: eda.names ### Keywords: graph ### ** Examples g <- makeSimpleGraph() eda.names (g) # "edgeType" "score" "misc" cleanEx() nameEx("existing.CytoscapeWindow") ### * existing.CytoscapeWindow flush(stderr()); flush(stdout()) ### Name: existing.CytoscapeWindow ### Title: existing.CytoscapeWindow ### Aliases: existing.CytoscapeWindow ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () cw <- new.CytoscapeWindow ('demo.existing', graph=makeSimpleGraph ()) displayGraph (cw) cw2 <- existing.CytoscapeWindow ('demo.existing', copy.graph.from.cytoscape.to.R=TRUE) cleanEx() nameEx("fitContent") ### * fitContent flush(stderr()); flush(stdout()) ### Name: fitContent ### Title: fitContent ### Aliases: fitContent fitContent,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('fitContent.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setZoom (cw, 0.1) fitContent (cw) setZoom (cw, 10.0) fitContent (cw) cleanEx() nameEx("fitSelectedContent") ### * fitSelectedContent flush(stderr()); flush(stdout()) ### Name: fitSelectedContent ### Title: fitSelectedContent ### Aliases: fitSelectedContent ### fitSelectedContent,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('fitSelectedContent.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setZoom (cw, 0.1) selectNodes (cw, 'A') fitSelectedContent (cw) setZoom (cw, 10.0) fitSelectedContent (cw) cleanEx() nameEx("floatPanel") ### * floatPanel flush(stderr()); flush(stdout()) ### Name: floatPanel ### Title: floatPanel ### Aliases: floatPanel floatPanel,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () floatPanel (cy, 'Control Panel') # or with less typing floatPanel (cy, 'c') cleanEx() nameEx("getAllEdgeAttributes") ### * getAllEdgeAttributes flush(stderr()); flush(stdout()) ### Name: getAllEdgeAttributes ### Title: getAllEdgeAttributes ### Aliases: getAllEdgeAttributes ### getAllEdgeAttributes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.name = 'demo.getAllEdgeAttributes' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) # get all attributes for all edges tbl.noa = getAllEdgeAttributes (cw, onlySelectedEdges=FALSE) cleanEx() nameEx("getAllEdges") ### * getAllEdges flush(stderr()); flush(stdout()) ### Name: getAllEdges ### Title: getAllEdges ### Aliases: getAllEdges getAllEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('getAllEdges.test', graph=makeSimpleGraph()) # [1] "C (undefined) A" "B (synthetic lethal) C" "A (phosphorylates) B" cleanEx() nameEx("getAllNodeAttributes") ### * getAllNodeAttributes flush(stderr()); flush(stdout()) ### Name: getAllNodeAttributes ### Title: getAllNodeAttributes ### Aliases: getAllNodeAttributes ### getAllNodeAttributes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.name = 'demo.getAllNodeAttributes' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) # get all attributes for all nodes tbl.noa = getAllNodeAttributes (cw, onlySelectedNodes=FALSE) cleanEx() nameEx("getAllNodes") ### * getAllNodes flush(stderr()); flush(stdout()) ### Name: getAllNodes ### Title: getAllNodes ### Aliases: getAllNodes getAllNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('getAllNodes.test', graph=makeSimpleGraph()) getAllNodes (cw) # [1] "C" "B" "A" cleanEx() nameEx("getArrowShapes") ### * getArrowShapes flush(stderr()); flush(stdout()) ### Name: getArrowShapes ### Title: getArrowShapes ### Aliases: getArrowShapes getArrowShapes,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getArrowShapes (cy) # [1] "No Arrow" "Diamond" "Delta" "Arrow" "T" "Circle" "Half Arrow Top" "Half Arrow Bottom" cleanEx() nameEx("getAttributeClassNames") ### * getAttributeClassNames flush(stderr()); flush(stdout()) ### Name: getAttributeClassNames ### Title: getAttributeClassNames ### Aliases: getAttributeClassNames ### getAttributeClassNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getAttributeClassNames (cy) # [1] "floating|numeric|double" "integer|int" "string|char|character" cleanEx() nameEx("getCenter") ### * getCenter flush(stderr()); flush(stdout()) ### Name: getCenter ### Title: getCenter ### Aliases: getCenter getCenter,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'getCenter demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (getCenter (cw)) cleanEx() nameEx("getDefaultBackgroundColor") ### * getDefaultBackgroundColor flush(stderr()); flush(stdout()) ### Name: getDefaultBackgroundColor ### Title: getDefaultBackgroundColor ### Aliases: getDefaultBackgroundColor ### getDefaultBackgroundColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (getDefaultBackgroundColor (cy)) # "java.awt.Color[r=204,g=204,b=255]" cleanEx() nameEx("getDefaultEdgeReverseSelectionColor") ### * getDefaultEdgeReverseSelectionColor flush(stderr()); flush(stdout()) ### Name: getDefaultEdgeReverseSelectionColor ### Title: getDefaultEdgeReverseSelectionColor ### Aliases: getDefaultEdgeReverseSelectionColor ### getDefaultEdgeReverseSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (getDefaultEdgeReverseSelectionColor (cy)) # "java.awt.Color[r=0,g=255,b=0]" cleanEx() nameEx("getDefaultEdgeSelectionColor") ### * getDefaultEdgeSelectionColor flush(stderr()); flush(stdout()) ### Name: getDefaultEdgeSelectionColor ### Title: getDefaultEdgeSelectionColor ### Aliases: getDefaultEdgeSelectionColor ### getDefaultEdgeSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (getDefaultEdgeSelectionColor (cy)) # "java.awt.Color[r=255,g=0,b=0]" cleanEx() nameEx("getDefaultNodeReverseSelectionColor") ### * getDefaultNodeReverseSelectionColor flush(stderr()); flush(stdout()) ### Name: getDefaultNodeReverseSelectionColor ### Title: getDefaultNodeReverseSelectionColor ### Aliases: getDefaultNodeReverseSelectionColor ### getDefaultNodeReverseSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (getDefaultNodeReverseSelectionColor (cy)) # "java.awt.Color[r=0,g=255,b=0]" cleanEx() nameEx("getDefaultNodeSelectionColor") ### * getDefaultNodeSelectionColor flush(stderr()); flush(stdout()) ### Name: getDefaultNodeSelectionColor ### Title: getDefaultNodeSelectionColor ### Aliases: getDefaultNodeSelectionColor ### getDefaultNodeSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (getDefaultNodeSelectionColor (cy)) # "java.awt.Color[r=0,g=255,b=0]" cleanEx() nameEx("getDirectlyModifiableVisualProperties") ### * getDirectlyModifiableVisualProperties flush(stderr()); flush(stdout()) ### Name: getDirectlyModifiableVisualProperties ### Title: getDirectlyModifiableVisualProperties ### Aliases: getDirectlyModifiableVisualProperties ### getDirectlyModifiableVisualProperties,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getDirectlyModifiableVisualProperties (cy) # [1] "Node Color" "Node Border Color" "Node Line Type" "Node Shape" # [5] "Node Size" "Node Width" "Node Height" "Node Label" # ... cleanEx() nameEx("getEdgeAttribute") ### * getEdgeAttribute flush(stderr()); flush(stdout()) ### Name: getEdgeAttribute ### Title: getEdgeAttribute ### Aliases: getEdgeAttribute ### getEdgeAttribute,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.name = 'demo.getEdgeAttribute' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) setDefaultEdgeLineWidth (cw, 5); displayGraph (cw) redraw (cw) layout (cw) score.bc = getEdgeAttribute (cw, "B (synthetic lethal) C", 'score') print (paste ("should be -12: ", score.bc)) cleanEx() nameEx("getEdgeAttributeNames") ### * getEdgeAttributeNames flush(stderr()); flush(stdout()) ### Name: getEdgeAttributeNames ### Title: getEdgeAttributeNames ### Aliases: getEdgeAttributeNames ### getEdgeAttributeNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy = CytoscapeConnection () print (getEdgeAttributeNames (cy)) cleanEx() nameEx("getEdgeCount") ### * getEdgeCount flush(stderr()); flush(stdout()) ### Name: getEdgeCount ### Title: getEdgeCount ### Aliases: getEdgeCount getEdgeCount,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getEdgeCount.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # in Cytoscape, interactively select two nodes, or getEdgeCount (cw) # [1] 3 cleanEx() nameEx("getFirstNeighbors") ### * getFirstNeighbors flush(stderr()); flush(stdout()) ### Name: getFirstNeighbors ### Title: getFirstNeighbors ### Aliases: getFirstNeighbors ### getFirstNeighbors,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getFirstNeighbors.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (getFirstNeighbors (cw, 'A')) selectNodes (cw, getFirstNeighbors (cw, 'A')) # note that A is not selected cleanEx() nameEx("getGraph") ### * getGraph flush(stderr()); flush(stdout()) ### Name: getGraph ### Title: getGraph ### Aliases: getGraph getGraph,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('getGraph.test', graph=makeSimpleGraph()) print (getGraph (cw)) cleanEx() nameEx("getGraphFromCyWindow") ### * getGraphFromCyWindow flush(stderr()); flush(stdout()) ### Name: getGraphFromCyWindow ### Title: getGraphFromCyWindow ### Aliases: getGraphFromCyWindow ### getGraphFromCyWindow,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cw <- CytoscapeWindow ('getGraphFromCyWindow.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw) redraw (cw) g.cy <- getGraphFromCyWindow (cw, 'getGraphFromCyWindow.test') print (g.cy) # 3 nodes, 3 edges cleanEx() nameEx("getLayoutNameMapping") ### * getLayoutNameMapping flush(stderr()); flush(stdout()) ### Name: getLayoutNameMapping ### Title: getLayoutNameMapping ### Aliases: getLayoutNameMapping ### getLayoutNameMapping,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () layout.name.map <- getLayoutNameMapping (cy) print (head (names (layout.name.map), n=3)) # [1] "Inverted Self-Organizing Map Layout" "Group Attributes Layout" "MOEN Layout" print (head (as.character (layout.name.map), n=3)) # [1] "isom" "attributes-layout" "jgraph-moen" cleanEx() nameEx("getLayoutNames") ### * getLayoutNames flush(stderr()); flush(stdout()) ### Name: getLayoutNames ### Title: getLayoutNames ### Aliases: getLayoutNames getLayoutNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getLayoutNames (cy) # [1] "jgraph-circle" "attribute-circle" "jgraph-annealing" ... cleanEx() nameEx("getLayoutPropertyNames") ### * getLayoutPropertyNames flush(stderr()); flush(stdout()) ### Name: getLayoutPropertyNames ### Title: getLayoutPropertyNames ### Aliases: getLayoutPropertyNames ### getLayoutPropertyNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () prop.names <- getLayoutPropertyNames (cy, 'isom') print (prop.names) # "maxEpoch" "sizeFactor" "radiusConstantTime" "radius" "minRadius" "initialAdaptation" "minAdaptation" "coolingFactor" cleanEx() nameEx("getLayoutPropertyType") ### * getLayoutPropertyType flush(stderr()); flush(stdout()) ### Name: getLayoutPropertyType ### Title: getLayoutPropertyType ### Aliases: getLayoutPropertyType ### getLayoutPropertyType,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () prop.names <- getLayoutPropertyNames (cy, 'isom') print (prop.names) # "maxEpoch" "sizeFactor" "radiusConstantTime" "radius" "minRadius" "initialAdaptation" "minAdaptation" "coolingFactor" sapply (prop.names, function (pn) getLayoutPropertyType (cy, 'isom', pn)) # maxEpoch sizeFactor radiusConstantTime radius minRadius initialAdaptation minAdaptation coolingFactor # "INTEGER" "INTEGER" "INTEGER" "INTEGER" "INTEGER" "DOUBLE" "DOUBLE" "DOUBLE" cleanEx() nameEx("getLayoutPropertyValue") ### * getLayoutPropertyValue flush(stderr()); flush(stdout()) ### Name: getLayoutPropertyValue ### Title: getLayoutPropertyValue ### Aliases: getLayoutPropertyValue ### getLayoutPropertyValue,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () prop.names <- getLayoutPropertyNames (cy, 'isom') print (prop.names) # "maxEpoch" "sizeFactor" "radiusConstantTime" "radius" "minRadius" "initialAdaptation" "minAdaptation" "coolingFactor" sapply (prop.names, function (pn) getLayoutPropertyValue (cy, 'isom', 'coolingFactor')) # maxEpoch sizeFactor radiusConstantTime radius minRadius initialAdaptation minAdaptation coolingFactor # 2 2 2 2 2 2 2 2 cleanEx() nameEx("getLineStyles") ### * getLineStyles flush(stderr()); flush(stdout()) ### Name: getLineStyles ### Title: getLineStyles ### Aliases: getLineStyles getLineStyles,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getLineStyles (cy) # [1] "SOLID" "LONG_DASH" "EQUAL_DASH" ... cleanEx() nameEx("getNodeAttribute") ### * getNodeAttribute flush(stderr()); flush(stdout()) ### Name: getNodeAttribute ### Title: getNodeAttribute ### Aliases: getNodeAttribute ### getNodeAttribute,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.name = 'demo.getNodeAttribute' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) count.B = getNodeAttribute (cw, "B", 'count') cleanEx() nameEx("getNodeAttributeNames") ### * getNodeAttributeNames flush(stderr()); flush(stdout()) ### Name: getNodeAttributeNames ### Title: getNodeAttributeNames ### Aliases: getNodeAttributeNames ### getNodeAttributeNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy = CytoscapeConnection () print (getNodeAttributeNames (cy)) cleanEx() nameEx("getNodeCount") ### * getNodeCount flush(stderr()); flush(stdout()) ### Name: getNodeCount ### Title: getNodeCount ### Aliases: getNodeCount getNodeCount,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getNodeCount.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # in Cytoscape, interactively select two nodes, or getNodeCount (cw) # [1] 3 cleanEx() nameEx("getNodeShapes") ### * getNodeShapes flush(stderr()); flush(stdout()) ### Name: getNodeShapes ### Title: getNodeShapes ### Aliases: getNodeShapes getNodeShapes,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getNodeShapes(cy) # "trapezoid" "round_rect" "ellipse" "triangle" "rect_3d" "diamond" "parallelogram" "octagon" "trapezoid_2" "rect" "hexagon" cleanEx() nameEx("getPosition") ### * getPosition flush(stderr()); flush(stdout()) ### Name: getPosition ### Title: getPosition ### Aliases: getPosition getPosition,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getPosition.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw) getPosition (cw, c ('A', 'B', 'C')) cleanEx() nameEx("getSelectedEdgeCount") ### * getSelectedEdgeCount flush(stderr()); flush(stdout()) ### Name: getSelectedEdgeCount ### Title: getSelectedEdgeCount ### Aliases: getSelectedEdgeCount ### getSelectedEdgeCount,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getSelectedEdgeCount.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) clearSelection (cw) getSelectedEdgeCount (cw) # should be 0 # in Cytoscape, interactively select an edge, or programmatically (doesn't work yet) # selectEdges (cwe, "A (phosphorylates) B") getSelectedEdgeCount (cw) # should be 1 cleanEx() nameEx("getSelectedEdges") ### * getSelectedEdges flush(stderr()); flush(stdout()) ### Name: getSelectedEdges ### Title: getSelectedEdges ### Aliases: getSelectedEdges getSelectedEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getSelectedEdges.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # in Cytoscape, interactively select two edges # doesn't work yet: selectEdges (cwe, "A (phosphorylates) B") getSelectedEdges (cw) cleanEx() nameEx("getSelectedNodeCount") ### * getSelectedNodeCount flush(stderr()); flush(stdout()) ### Name: getSelectedNodeCount ### Title: getSelectedNodeCount ### Aliases: getSelectedNodeCount ### getSelectedNodeCount,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getSelectedNodeCount.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # in Cytoscape, interactively select two nodes, or selectNodes (cw, c ('A','B')) getSelectedNodeCount (cw) # [1] 2 cleanEx() nameEx("getSelectedNodes") ### * getSelectedNodes flush(stderr()); flush(stdout()) ### Name: getSelectedNodes ### Title: getSelectedNodes ### Aliases: getSelectedNodes getSelectedNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('getSelectedNodes.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # in Cytoscape, interactively select two nodes, or selectNodes (cw, c ('A','B')) getSelectedNodes (cw) # [1] "A" "B" cleanEx() nameEx("getViewCoordinates") ### * getViewCoordinates flush(stderr()); flush(stdout()) ### Name: getViewCoordinates ### Title: getViewCoordinates ### Aliases: getViewCoordinates ### getViewCoordinates,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'getViewCoordinates demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (getViewCoordinates (cw)) cleanEx() nameEx("getVisualStyleNames") ### * getVisualStyleNames flush(stderr()); flush(stdout()) ### Name: getVisualStyleNames ### Title: getVisualStyleNames ### Aliases: getVisualStyleNames ### getVisualStyleNames,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy = CytoscapeConnection () print (getVisualStyleNames (cy)) cleanEx() nameEx("getWindowCount") ### * getWindowCount flush(stderr()); flush(stdout()) ### Name: getWindowCount ### Title: getWindowCount ### Aliases: getWindowCount getWindowCount,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () count.at.start = getWindowCount (cy) cw2 <- CytoscapeWindow ('getWindowCount.test1', graph=makeSimpleGraph()) cw3 <- CytoscapeWindow ('getWindowCount.test2', graph=makeSimpleGraph()) getWindowCount (cy) # should be two greater than 'count.at.start' cleanEx() nameEx("getWindowID") ### * getWindowID flush(stderr()); flush(stdout()) ### Name: getWindowID ### Title: getWindowID ### Aliases: getWindowID getWindowID,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () cw <- new.CytoscapeWindow ('getWindowID.test', graph=makeSimpleGraph()) displayGraph (cw) getWindowID (cy, 'getWindowID.test') cleanEx() nameEx("getWindowList") ### * getWindowList flush(stderr()); flush(stdout()) ### Name: getWindowList ### Title: getWindowList ### Aliases: getWindowList getWindowList,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () getWindowList (cy) cleanEx() nameEx("getZoom") ### * getZoom flush(stderr()); flush(stdout()) ### Name: getZoom ### Title: getZoom ### Aliases: getZoom getZoom,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'getZoom demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') print (getZoom (cw)) cleanEx() nameEx("hideAllPanels") ### * hideAllPanels flush(stderr()); flush(stdout()) ### Name: hideAllPanels ### Title: hideAllPanels ### Aliases: hideAllPanels hideAllPanels,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () hideAllPanels (cy) cleanEx() nameEx("hideNodes") ### * hideNodes flush(stderr()); flush(stdout()) ### Name: hideNodes ### Title: hideNodes ### Aliases: hideNodes hideNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('hideNodes.test', graph=makeSimpleGraph()) redraw (cw) layout (cw, 'jgraph-spring') hideNodes (cw, c ('A', 'B')) cleanEx() nameEx("hidePanel") ### * hidePanel flush(stderr()); flush(stdout()) ### Name: hidePanel ### Title: hidePanel ### Aliases: hidePanel hidePanel,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () hidePanel (cy, 'Control Panel') # or hidePanel (cy, 'c') cleanEx() nameEx("hideSelectedEdges") ### * hideSelectedEdges flush(stderr()); flush(stdout()) ### Name: hideSelectedEdges ### Title: hideSelectedEdges ### Aliases: hideSelectedEdges ### hideSelectedEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('hideSelectedEdges.test', graph=makeSimpleGraph()) # selectEdges (cw, 'B (synthetic lethal) C') hideSelectedEdges (cw) unhideAll (cw) # alas, Cytoscape requires that you render these edges, and redo the # layout, so that they are visible again redraw (cw) layout (cw, 'jgraph-spring') cleanEx() nameEx("hideSelectedNodes") ### * hideSelectedNodes flush(stderr()); flush(stdout()) ### Name: hideSelectedNodes ### Title: hideSelectedNodes ### Aliases: hideSelectedNodes ### hideSelectedNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('hideSelectedNodes.test', graph=makeSimpleGraph()) selectNodes (cw, c ('A', 'B')) hideSelectedNodes (cw) unhideAll (cw) # alas, Cytoscape requires that you render these nodes, and redo the # layout, so that they are visible again redraw (cw) layout (cw, 'jgraph-spring') cleanEx() nameEx("initEdgeAttribute") ### * initEdgeAttribute flush(stderr()); flush(stdout()) ### Name: initEdgeAttribute ### Title: initEdgeAttribute ### Aliases: initEdgeAttribute ### Keywords: graph ### ** Examples g = new ('graphNEL', edgemode='directed') g = initEdgeAttribute (g, 'edgeType', 'char', 'associates with') cleanEx() nameEx("initNodeAttribute") ### * initNodeAttribute flush(stderr()); flush(stdout()) ### Name: initNodeAttribute ### Title: initNodeAttribute ### Aliases: initNodeAttribute ### Keywords: graph ### ** Examples g = new ('graphNEL', edgemode='directed') g = initNodeAttribute (g, 'lfc', 'numeric', 1.0) cleanEx() nameEx("invertEdgeSelection") ### * invertEdgeSelection flush(stderr()); flush(stdout()) ### Name: invertEdgeSelection ### Title: invertEdgeSelection ### Aliases: invertEdgeSelection ### invertEdgeSelection,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('invertEdgeSelection demo', graph=makeSimpleGraph()) # all edges should be selected, since none were before invertEdgeSelection (cw) redraw (cw) # a richer test will be to programmatically select edges, but that # does not work yet (pshannon, 13 jan 2011) cleanEx() nameEx("invertNodeSelection") ### * invertNodeSelection flush(stderr()); flush(stdout()) ### Name: invertNodeSelection ### Title: invertNodeSelection ### Aliases: invertNodeSelection ### invertNodeSelection,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('invertNodeSelection demo', graph=makeSimpleGraph()) # all nodes should be selected, since none were before selectNodes (cw, 'A') invertNodeSelection (cw) redraw (cw) # a richer test will be to programmatically select nodes, but that # does not work yet (pshannon, 13 jan 2011) cleanEx() nameEx("layout") ### * layout flush(stderr()); flush(stdout()) ### Name: layout ### Title: layout ### Aliases: layout layout,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('layout.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) # applies default vizmap (rendering) rules, plus any you # have specified cleanEx() nameEx("lockNodeDimensions") ### * lockNodeDimensions flush(stderr()); flush(stdout()) ### Name: lockNodeDimensions ### Title: lockNodeDimensions ### Aliases: lockNodeDimensions ### lockNodeDimensions,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('lockNodeDimensions demo', graph=makeSimpleGraph()) displayGraph (cw) layout (cw) redraw (cw) lockNodeDimensions (cw, 'default', FALSE) setNodeWidthDirect (cw, 'A', 100) setNodeHeightDirect (cw, 'A', 50) cleanEx() nameEx("makeRandomGraph") ### * makeRandomGraph flush(stderr()); flush(stdout()) ### Name: makeRandomGraph ### Title: makeRandomGraph ### Aliases: makeRandomGraph ### Keywords: graph ### ** Examples g = makeRandomGraph (node.count=12, seed=123) ## The function is currently defined as function (node.count = 12, seed = 123) { set.seed(seed) node.names = as.character(1:node.count) g = randomGraph(node.names, M <- 1:2, p = 0.6) attr(edgeDataDefaults(g, attr = "weight"), "class") = "DOUBLE" edgeDataDefaults(g, "pmid") = "9988778899" attr(edgeDataDefaults(g, attr = "pmid"), "class") = "STRING" return(g) } cleanEx() nameEx("makeSimpleGraph") ### * makeSimpleGraph flush(stderr()); flush(stdout()) ### Name: makeSimpleGraph ### Title: makeSimpleGraph ### Aliases: makeSimpleGraph ### Keywords: graph ### ** Examples g = makeSimpleGraph () ## The function is currently defined as function () { g = new("graphNEL", edgemode = "directed") nodeDataDefaults(g, attr = "type") = "undefined" attr(nodeDataDefaults(g, attr = "type"), "class") = "STRING" nodeDataDefaults(g, attr = "lfc") = 1 attr(nodeDataDefaults(g, attr = "lfc"), "class") = "DOUBLE" nodeDataDefaults(g, attr = "label") = "default node label" attr(nodeDataDefaults(g, attr = "label"), "class") = "STRING" nodeDataDefaults(g, attr = "count") = "0" attr(nodeDataDefaults(g, attr = "count"), "class") = "INTEGER" edgeDataDefaults(g, attr = "edgeType") = "undefined" attr(edgeDataDefaults(g, attr = "edgeType"), "class") = "STRING" edgeDataDefaults(g, attr = "score") = 0 attr(edgeDataDefaults(g, attr = "score"), "class") = "DOUBLE" edgeDataDefaults(g, attr = "misc") = "" attr(edgeDataDefaults(g, attr = "misc"), "class") = "STRING" g = graph::addNode("A", g) g = graph::addNode("B", g) g = graph::addNode("C", g) nodeData(g, "A", "type") = "kinase" nodeData(g, "B", "type") = "transcription factor" nodeData(g, "C", "type") = "glycoprotein" nodeData(g, "A", "lfc") = "-3.0" nodeData(g, "B", "lfc") = "0.0" nodeData(g, "C", "lfc") = "3.0" nodeData(g, "A", "count") = "2" nodeData(g, "B", "count") = "30" nodeData(g, "C", "count") = "100" nodeData(g, "A", "label") = "Gene A" nodeData(g, "B", "label") = "Gene B" nodeData(g, "C", "label") = "Gene C" g = graph::addEdge("A", "B", g) g = graph::addEdge("B", "C", g) g = graph::addEdge("C", "A", g) edgeData(g, "A", "B", "edgeType") = "phosphorylates" edgeData(g, "B", "C", "edgeType") = "synthetic lethal" edgeData(g, "A", "B", "score") = 35 edgeData(g, "B", "C", "score") = -12 return(g) } cleanEx() nameEx("msg") ### * msg flush(stderr()); flush(stdout()) ### Name: msg ### Title: msg ### Aliases: msg msg,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () msg (cy, 'this message will appear in the Cytoscape Desktop status bar, which is found at the lower corner of the Desktop') cleanEx() nameEx("new.CytoscapeWindow") ### * new.CytoscapeWindow flush(stderr()); flush(stdout()) ### Name: new.CytoscapeWindow ### Title: new.CytoscapeWindow ### Aliases: new.CytoscapeWindow ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('new.demo', new ('graphNEL')) cleanEx() nameEx("noa") ### * noa flush(stderr()); flush(stdout()) ### Name: noa ### Title: noa ### Aliases: noa ### Keywords: graph ### ** Examples g <- makeSimpleGraph () noa (g, 'type') # A.A B.B C.C # "kinase" "transcription factor" "glycoprotein" cleanEx() nameEx("noa.names") ### * noa.names flush(stderr()); flush(stdout()) ### Name: noa.names ### Title: noa.names ### Aliases: noa.names ### Keywords: graph ### ** Examples g <- makeSimpleGraph() noa.names (g) # [1] "type" "lfc" "label" "count" cleanEx() nameEx("ping") ### * ping flush(stderr()); flush(stdout()) ### Name: ping ### Title: ping ### Aliases: ping ping,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () ping (cy) # "It works!" cleanEx() nameEx("raiseWindow") ### * raiseWindow flush(stderr()); flush(stdout()) ### Name: raiseWindow ### Title: raiseWindow ### Aliases: raiseWindow raiseWindow,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('raiseWindow.test', graph=makeSimpleGraph()) raiseWindow (cw) cleanEx() nameEx("redraw") ### * redraw flush(stderr()); flush(stdout()) ### Name: redraw ### Title: redraw ### Aliases: redraw redraw,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('redraw.test', graph=makeSimpleGraph()) redraw (cw) cleanEx() nameEx("saveImage") ### * saveImage flush(stderr()); flush(stdout()) ### Name: saveImage ### Title: saveImage ### Aliases: saveImage saveImage,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('saveImage.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) filename = tempfile () # paste (getwd (), 'saveImageTest.jpg', sep='/') # saveImage (cw, filename, 'jpeg', 2.0) # doesn't yet work reliably at bioc cleanEx() nameEx("selectEdges") ### * selectEdges flush(stderr()); flush(stdout()) ### Name: selectEdges ### Title: selectEdges ### Aliases: selectEdges selectEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('selectEdges.test', graph=makeSimpleGraph()) displayGraph (cw); layout (cw); redraw (cw) clearSelection (cw) selectEdges (cw, c ("A (phosphorylates) B", "B (synthetic lethal) C")) getSelectedEdges (cw) cleanEx() nameEx("selectFirstNeighborsOfSelectedNodes") ### * selectFirstNeighborsOfSelectedNodes flush(stderr()); flush(stdout()) ### Name: selectFirstNeighborsOfSelectedNodes ### Title: selectFirstNeighborsOfSelectedNodes ### Aliases: selectFirstNeighborsOfSelectedNodes ### selectFirstNeighborsOfSelectedNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('selectFirstNeighborsOfSelecteNodes.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw) clearSelection (cw) selectNodes (cw, 'A') selectFirstNeighborsOfSelectedNodes (cw) print (sort (getSelectedNodes (cw))) # [1] "A" "B" "C" cleanEx() nameEx("selectNodes") ### * selectNodes flush(stderr()); flush(stdout()) ### Name: selectNodes ### Title: selectNodes ### Aliases: selectNodes selectNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('selectNodes.test', graph=makeSimpleGraph()) clearSelection (cw) selectNodes (cw, c ('A', 'B')) getSelectedNodes (cw) # [1] "A" "B" cleanEx() nameEx("sendEdgeAttributes") ### * sendEdgeAttributes flush(stderr()); flush(stdout()) ### Name: sendEdgeAttributes ### Title: sendEdgeAttributes ### Aliases: sendEdgeAttributes ### sendEdgeAttributes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendEdgeAttributes.test', graph=makeSimpleGraph()) attribute.names = eda.names (cw@graph) for (attribute.name in attribute.names) result = sendEdgeAttributes (cw, attribute.name) cleanEx() nameEx("sendEdgeAttributesDirect") ### * sendEdgeAttributesDirect flush(stderr()); flush(stdout()) ### Name: sendEdgeAttributesDirect ### Title: sendEdgeAttributesDirect ### Aliases: sendEdgeAttributesDirect ### sendEdgeAttributesDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendEdgeAttributesDirect.test', graph=makeSimpleGraph()) edge.names = as.character (cy2.edge.names (cw@graph)) stopifnot (length (edge.names) == 3) edge.values = c ('alligator', 'hedgehog', 'anteater') result = sendEdgeAttributesDirect (cw, 'misc', 'string', edge.names, edge.values) cleanEx() nameEx("sendEdges") ### * sendEdges flush(stderr()); flush(stdout()) ### Name: sendEdges ### Title: sendEdges ### Aliases: sendEdges sendEdges,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendEdges.test', graph=makeSimpleGraph()) sendEdges (cw) cleanEx() nameEx("sendNodeAttributes") ### * sendNodeAttributes flush(stderr()); flush(stdout()) ### Name: sendNodeAttributes ### Title: sendNodeAttributes ### Aliases: sendNodeAttributes ### sendNodeAttributes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendNodeAttributes.test', graph=makeSimpleGraph()) attribute.names = noa.names (cw@graph) for (attribute.name in attribute.names) result = sendNodeAttributes (cw, attribute.name) cleanEx() nameEx("sendNodeAttributesDirect") ### * sendNodeAttributesDirect flush(stderr()); flush(stdout()) ### Name: sendNodeAttributesDirect ### Title: sendNodeAttributesDirect ### Aliases: sendNodeAttributesDirect ### sendNodeAttributesDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendNodeAttributesDirect.test', graph=makeSimpleGraph()) stopifnot ('count' %in% noa.names (cw@graph)) result = sendNodeAttributesDirect (cw, 'count', 'int', c ('A', 'B', 'C'), c (4, 8, 12)) cleanEx() nameEx("sendNodes") ### * sendNodes flush(stderr()); flush(stdout()) ### Name: sendNodes ### Title: sendNodes ### Aliases: sendNodes sendNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendNodes.test', graph=makeSimpleGraph()) sendNodes (cw) cleanEx() nameEx("setCenter") ### * setCenter flush(stderr()); flush(stdout()) ### Name: setCenter ### Title: setCenter ### Aliases: setCenter setCenter,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'setCenter demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') original.center <- getCenter (cw) # named list, "x" and "y". initial values might be 140 and 90 # now pan the display to the left, by setting the the visual center # to increasing values of x, without changing the location of the # simple graph setCenter (cw, 200, 90) system ('sleep 1') setCenter (cw, 300, 90) system ('sleep 1') setCenter (cw, 400, 90) system ('sleep 1') # and now pan back to the original position setCenter (cw, 300, 90) system ('sleep 1') setCenter (cw, 200, 90) system ('sleep 1') setCenter (cw, original.center$x, original.center$y) cleanEx() nameEx("setDefaultBackgroundColor") ### * setDefaultBackgroundColor flush(stderr()); flush(stdout()) ### Name: setDefaultBackgroundColor ### Title: setDefaultBackgroundColor ### Aliases: setDefaultBackgroundColor ### setDefaultBackgroundColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () setDefaultBackgroundColor (cy, '#CCCC00') cleanEx() nameEx("setDefaultEdgeColor") ### * setDefaultEdgeColor flush(stderr()); flush(stdout()) ### Name: setDefaultEdgeColor ### Title: setDefaultEdgeColor ### Aliases: setDefaultEdgeColor ### setDefaultEdgeColor,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('sendDefaultEdgeColor.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultEdgeColor (cw, '#FFFFFF') # white edges redraw (cw) cleanEx() nameEx("setDefaultEdgeLineWidth") ### * setDefaultEdgeLineWidth flush(stderr()); flush(stdout()) ### Name: setDefaultEdgeLineWidth ### Title: setDefaultEdgeLineWidth ### Aliases: setDefaultEdgeLineWidth ### setDefaultEdgeLineWidth,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultEdgeLineWidth.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultEdgeLineWidth (cw, 5) redraw (cw) cleanEx() nameEx("setDefaultEdgeReverseSelectionColor") ### * setDefaultEdgeReverseSelectionColor flush(stderr()); flush(stdout()) ### Name: setDefaultEdgeReverseSelectionColor ### Title: setDefaultEdgeReverseSelectionColor ### Aliases: setDefaultEdgeReverseSelectionColor ### setDefaultEdgeReverseSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (setDefaultEdgeReverseSelectionColor (cy, '#FF0000')) cleanEx() nameEx("setDefaultEdgeSelectionColor") ### * setDefaultEdgeSelectionColor flush(stderr()); flush(stdout()) ### Name: setDefaultEdgeSelectionColor ### Title: setDefaultEdgeSelectionColor ### Aliases: setDefaultEdgeSelectionColor ### setDefaultEdgeSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (setDefaultEdgeSelectionColor (cy, '#FF0000')) cleanEx() nameEx("setDefaultNodeBorderColor") ### * setDefaultNodeBorderColor flush(stderr()); flush(stdout()) ### Name: setDefaultNodeBorderColor ### Title: setDefaultNodeBorderColor ### Aliases: setDefaultNodeBorderColor ### setDefaultNodeBorderColor,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeBorderColor.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeBorderColor (cw, '#FFFFFF') # white borders redraw (cw) cleanEx() nameEx("setDefaultNodeBorderWidth") ### * setDefaultNodeBorderWidth flush(stderr()); flush(stdout()) ### Name: setDefaultNodeBorderWidth ### Title: setDefaultNodeBorderWidth ### Aliases: setDefaultNodeBorderWidth ### setDefaultNodeBorderWidth,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeBorderWidth.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeBorderWidth (cw, 5) redraw (cw) cleanEx() nameEx("setDefaultNodeColor") ### * setDefaultNodeColor flush(stderr()); flush(stdout()) ### Name: setDefaultNodeColor ### Title: setDefaultNodeColor ### Aliases: setDefaultNodeColor ### setDefaultNodeColor,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeColor.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeColor (cw, '#8888FF') # light blue redraw (cw) cleanEx() nameEx("setDefaultNodeFontSize") ### * setDefaultNodeFontSize flush(stderr()); flush(stdout()) ### Name: setDefaultNodeFontSize ### Title: setDefaultNodeFontSize ### Aliases: setDefaultNodeFontSize ### setDefaultNodeFontSize,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeFontSize.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeFontSize (cw, 32) redraw (cw) cleanEx() nameEx("setDefaultNodeLabelColor") ### * setDefaultNodeLabelColor flush(stderr()); flush(stdout()) ### Name: setDefaultNodeLabelColor ### Title: setDefaultNodeLabelColor ### Aliases: setDefaultNodeLabelColor ### setDefaultNodeLabelColor,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeLabelColor.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeLabelColor (cw, '#FFFFFF') # white node labels redraw (cw) cleanEx() nameEx("setDefaultNodeReverseSelectionColor") ### * setDefaultNodeReverseSelectionColor flush(stderr()); flush(stdout()) ### Name: setDefaultNodeReverseSelectionColor ### Title: setDefaultNodeReverseSelectionColor ### Aliases: setDefaultNodeReverseSelectionColor ### setDefaultNodeReverseSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (setDefaultNodeReverseSelectionColor (cy, '#FF0000')) cleanEx() nameEx("setDefaultNodeSelectionColor") ### * setDefaultNodeSelectionColor flush(stderr()); flush(stdout()) ### Name: setDefaultNodeSelectionColor ### Title: setDefaultNodeSelectionColor ### Aliases: setDefaultNodeSelectionColor ### setDefaultNodeSelectionColor,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (setDefaultNodeSelectionColor (cy, '#FF0000')) cleanEx() nameEx("setDefaultNodeShape") ### * setDefaultNodeShape flush(stderr()); flush(stdout()) ### Name: setDefaultNodeShape ### Title: setDefaultNodeShape ### Aliases: setDefaultNodeShape ### setDefaultNodeShape,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeShape.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') legal.shapes <- getNodeShapes (cw) # stopifnot ('diamond' %in% legal.shapes) setDefaultNodeShape (cw, 'diamond') redraw (cw) cleanEx() nameEx("setDefaultNodeSize") ### * setDefaultNodeSize flush(stderr()); flush(stdout()) ### Name: setDefaultNodeSize ### Title: setDefaultNodeSize ### Aliases: setDefaultNodeSize ### setDefaultNodeSize,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setDefaultNodeSize.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setDefaultNodeSize (cw, 60) # an intermediate value redraw (cw) cleanEx() nameEx("setEdgeColorRule") ### * setEdgeColorRule flush(stderr()); flush(stdout()) ### Name: setEdgeColorRule ### Title: setEdgeColorRule ### Aliases: setEdgeColorRule setEdgeColorRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeColorRule.test', graph=makeSimpleGraph()) edgeType.values = c ('phosphorylates', 'synthetic lethal', 'undefined') colors = c ('#FF0000', '#FFFF00', '#00FF00') setEdgeColorRule (cw, 'edgeType', edgeType.values, colors, mode='lookup') score.values = c (-15, 0, 40); colors = c ('#00FF00', '#FFFFFF', '#FF0000') setEdgeColorRule (cw, 'score', score.values, colors, mode='interpolate') # now swap the colors around # now swap the colors colors = c ('#FF0000', '#FFFFFF', '#00FF00') setEdgeColorRule (cw, 'score', score.values, colors, mode='interpolate') redraw (cw) cleanEx() nameEx("setEdgeLabelRule") ### * setEdgeLabelRule flush(stderr()); flush(stdout()) ### Name: setEdgeLabelRule ### Title: setEdgeLabelRule ### Aliases: setEdgeLabelRule setEdgeLabelRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeLabelRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) setEdgeLabelRule (cw, 'edgeType') cleanEx() nameEx("setEdgeLineStyleRule") ### * setEdgeLineStyleRule flush(stderr()); flush(stdout()) ### Name: setEdgeLineStyleRule ### Title: specify the line styles to be used in drawing edges ### Aliases: setEdgeLineStyleRule ### setEdgeLineStyleRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeLineStyleRule.test', graph=makeSimpleGraph()) line.styles <- c ('SINEWAVE', 'DOT', 'PARALLEL_LINES') edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined') setEdgeLineStyleRule (cw, 'edgeType', edgeType.values, line.styles) redraw (cw) cleanEx() nameEx("setEdgeLineWidthRule") ### * setEdgeLineWidthRule flush(stderr()); flush(stdout()) ### Name: setEdgeLineWidthRule ### Title: setEdgeLineWidthRule ### Aliases: setEdgeLineWidthRule ### setEdgeLineWidthRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeLineWidthRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) edge.attribute.values = c ('phosphorylates', 'synthetic lethal', 'undefined') line.widths = c (0, 8, 16) setEdgeLineWidthRule (cw, 'edgeType', edge.attribute.values, line.widths) cleanEx() nameEx("setEdgeSourceArrowColorRule") ### * setEdgeSourceArrowColorRule flush(stderr()); flush(stdout()) ### Name: setEdgeSourceArrowColorRule ### Title: Specify Rule for the Source Arrow Color ### Aliases: setEdgeSourceArrowColorRule ### setEdgeSourceArrowColorRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeSourceArrowColorRule.test', graph=makeSimpleGraph()) colors <- c ("#AA00AA", "#AAAA00", "#AA0000") edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined') setEdgeSourceArrowColorRule (cw, 'edgeType', edgeType.values, colors) cleanEx() nameEx("setEdgeSourceArrowRule") ### * setEdgeSourceArrowRule flush(stderr()); flush(stdout()) ### Name: setEdgeSourceArrowRule ### Title: specify the arrow types to be used at the end of an edge, at the ### 'source' node ### Aliases: setEdgeSourceArrowRule ### setEdgeSourceArrowRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeSourceArrowRule.test', graph=makeSimpleGraph()) arrows <- c ('Arrow', 'Diamond', 'Circle') edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined') setEdgeSourceArrowRule (cw, 'edgeType', edgeType.values, arrows) redraw (cw) cleanEx() nameEx("setEdgeTargetArrowColorRule") ### * setEdgeTargetArrowColorRule flush(stderr()); flush(stdout()) ### Name: setEdgeTargetArrowColorRule ### Title: Specify Rule for the Target Arrow Color ### Aliases: setEdgeTargetArrowColorRule ### setEdgeTargetArrowColorRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeTargetArrowColorRule.test', graph=makeSimpleGraph()) colors <- c ("#AA00AA", "#AAAA00", "#AA0000") edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined') setEdgeTargetArrowColorRule (cw, 'edgeType', edgeType.values, colors) cleanEx() nameEx("setEdgeTargetArrowRule") ### * setEdgeTargetArrowRule flush(stderr()); flush(stdout()) ### Name: setEdgeTargetArrowRule ### Title: specify the arrow types to be used at the end of an edge, at the ### 'target' node ### Aliases: setEdgeTargetArrowRule ### setEdgeTargetArrowRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeTargetArrowRule.test', graph=makeSimpleGraph()) arrows <- c ('Arrow', 'Diamond', 'Circle') edgeType.values <- c ('phosphorylates', 'synthetic lethal', 'undefined') setEdgeTargetArrowRule (cw, 'edgeType', edgeType.values, arrows) redraw (cw) cleanEx() nameEx("setEdgeTooltipRule") ### * setEdgeTooltipRule flush(stderr()); flush(stdout()) ### Name: setEdgeTooltipRule ### Title: setEdgeTooltipRule ### Aliases: setEdgeTooltipRule ### setEdgeTooltipRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setEdgeTooltipRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) setEdgeTooltipRule (cw, 'edgeType') cleanEx() nameEx("setGraph") ### * setGraph flush(stderr()); flush(stdout()) ### Name: setGraph ### Title: setGraph ### Aliases: setGraph setGraph,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setGraph.test') # an empty graph is created by default graph <- makeSimpleGraph () setGraph (cw, graph) print (length (nodes (getGraph (cw)))) cleanEx() nameEx("setLayoutProperties") ### * setLayoutProperties flush(stderr()); flush(stdout()) ### Name: setLayoutProperties ### Title: setLayoutProperties ### Aliases: setLayoutProperties ### setLayoutProperties,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () prop.names <- getLayoutPropertyNames (cy, 'isom') print (prop.names) # "maxEpoch" "sizeFactor" "radiusConstantTime" "radius" "minRadius" "initialAdaptation" "minAdaptation" "coolingFactor" print (getLayoutPropertyValue (cy, 'isom', 'radiusConstantTime')) # modify just two of the eight properties; the others are unchanged setLayoutProperties (cy, 'isom', list (radiusConstantTime=4, radius=20)) cleanEx() nameEx("setNodeBorderColorRule") ### * setNodeBorderColorRule flush(stderr()); flush(stdout()) ### Name: setNodeBorderColorRule ### Title: setNodeBorderColorRule ### Aliases: setNodeBorderColorRule ### setNodeBorderColorRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeBorderColorRule.test', graph=makeSimpleGraph()) control.points <- c (-3.0, 0.0, 3.0) # typical range of log-fold-change ratio values # paint negative values shades of green, positive values shades of # red, out-of-range low values are dark green; out-of-range high # values are dark red colors <- c ("#00AA00", "#00FF00", "#FFFFFF", "#FF0000", "#AA0000") setNodeBorderColorRule (cw, node.attribute.name='lfc', control.points, colors, mode='interpolate') redraw (cw) data.values <- c ("kinase", "transcription factor", "glycoprotein") colors <- c ("#0000AA", "#FFFF00", "#0000AA") setNodeBorderColorRule (cw, node.attribute.name='type', data.values, colors, mode='lookup', default.color='#AA0000') cleanEx() nameEx("setNodeBorderOpacityDirect") ### * setNodeBorderOpacityDirect flush(stderr()); flush(stdout()) ### Name: setNodeBorderOpacityDirect ### Title: setNodeBorderOpacityDirect ### Aliases: setNodeBorderOpacityDirect ### setNodeBorderOpacityDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeBorderOpacityDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeBorderOpacityDirect (cw, 'A', 220) redraw (cw) cleanEx() nameEx("setNodeBorderWidthRule") ### * setNodeBorderWidthRule flush(stderr()); flush(stdout()) ### Name: setNodeBorderWidthRule ### Title: setNodeBorderWidthRule ### Aliases: setNodeBorderWidthRule ### setNodeBorderWidthRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeBorderWidthRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) node.attribute.values = c ('kinase', 'transcription factor', 'glycoprotein') line.widths = c (0, 8, 16) setNodeBorderWidthRule (cw, 'type', node.attribute.values, line.widths) cleanEx() nameEx("setNodeColorDirect") ### * setNodeColorDirect flush(stderr()); flush(stdout()) ### Name: setNodeColorDirect ### Title: setNodeColorDirect ### Aliases: setNodeColorDirect ### setNodeColorDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeColorDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeColorDirect (cw, 'A', '#880000') redraw (cw) cleanEx() nameEx("setNodeColorRule") ### * setNodeColorRule flush(stderr()); flush(stdout()) ### Name: setNodeColorRule ### Title: setNodeColorRule ### Aliases: setNodeColorRule setNodeColorRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeColorRule.test', graph=makeSimpleGraph()) control.points <- c (-3.0, 0.0, 3.0) # typical range of log-fold-change ratio values # paint negative values shades of green, positive values shades of # red, out-of-range low values are dark green; out-of-range high # values are dark red node.colors <- c ("#00AA00", "#00FF00", "#FFFFFF", "#FF0000", "#AA0000") setNodeColorRule (cw, node.attribute.name='lfc', control.points, node.colors, mode='interpolate') redraw (cw) data.values <- c ("kinase", "transcription factor", "glycoprotein") node.colors <- c ("#0000AA", "#FFFF00", "#0000AA") setNodeColorRule (cw, node.attribute.name='type', data.values, node.colors, mode='lookup', default.color='#AA0000') cleanEx() nameEx("setNodeFillOpacityDirect") ### * setNodeFillOpacityDirect flush(stderr()); flush(stdout()) ### Name: setNodeFillOpacityDirect ### Title: setNodeFillOpacityDirect ### Aliases: setNodeFillOpacityDirect ### setNodeFillOpacityDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeFillOpacityDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeFillOpacityDirect (cw, 'A', 220) redraw (cw) cleanEx() nameEx("setNodeHeightDirect") ### * setNodeHeightDirect flush(stderr()); flush(stdout()) ### Name: setNodeHeightDirect ### Title: setNodeHeightDirect ### Aliases: setNodeHeightDirect ### setNodeHeightDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeHeightDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') lockNodeDimensions (cw, 'default', FALSE) setNodeHeightDirect (cw, 'A', 32) redraw (cw) cleanEx() nameEx("setNodeLabelOpacityDirect") ### * setNodeLabelOpacityDirect flush(stderr()); flush(stdout()) ### Name: setNodeLabelOpacityDirect ### Title: setNodeLabelOpacityDirect ### Aliases: setNodeLabelOpacityDirect ### setNodeLabelOpacityDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeLabelOpacityDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeLabelOpacityDirect (cw, 'A', 220) redraw (cw) cleanEx() nameEx("setNodeLabelRule") ### * setNodeLabelRule flush(stderr()); flush(stdout()) ### Name: setNodeLabelRule ### Title: setNodeLabelRule ### Aliases: setNodeLabelRule setNodeLabelRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeLabelRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') setNodeLabelRule (cw, 'label') redraw (cw) setNodeLabelRule (cw, 'type') redraw (cw) setNodeLabelRule (cw, 'lfc') redraw (cw) setNodeLabelRule (cw, 'count') redraw (cw) setNodeLabelRule (cw, 'label') redraw (cw) cleanEx() nameEx("setNodeOpacityDirect") ### * setNodeOpacityDirect flush(stderr()); flush(stdout()) ### Name: setNodeOpacityDirect ### Title: setNodeOpacityDirect ### Aliases: setNodeOpacityDirect ### setNodeOpacityDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeOpacityDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeOpacityDirect (cw, 'A', 220) redraw (cw) cleanEx() nameEx("setNodeShapeDirect") ### * setNodeShapeDirect flush(stderr()); flush(stdout()) ### Name: setNodeShapeDirect ### Title: setNodeShapeDirect ### Aliases: setNodeShapeDirect ### setNodeShapeDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeShapeDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeShapeDirect (cw, 'A', 'triangle') redraw (cw) cleanEx() nameEx("setNodeShapeRule") ### * setNodeShapeRule flush(stderr()); flush(stdout()) ### Name: setNodeShapeRule ### Title: setNodeShapeRule ### Aliases: setNodeShapeRule setNodeShapeRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeShapeRule.test', graph=makeSimpleGraph()) shapes <- c ("trapezoid", "round_rect", "ellipse") molecule.types <- c ("kinase", "transcription factor", "glycoprotein") setNodeShapeRule (cw, node.attribute.name='type', molecule.types, shapes) redraw (cw) cleanEx() nameEx("setNodeSizeDirect") ### * setNodeSizeDirect flush(stderr()); flush(stdout()) ### Name: setNodeSizeDirect ### Title: setNodeSizeDirect ### Aliases: setNodeSizeDirect ### setNodeSizeDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeSizeDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setNodeSizeDirect (cw, 'A', 32) redraw (cw) cleanEx() nameEx("setNodeSizeRule") ### * setNodeSizeRule flush(stderr()); flush(stdout()) ### Name: setNodeSizeRule ### Title: setNodeSizeRule ### Aliases: setNodeSizeRule setNodeSizeRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeSizeRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) control.points <- c (10, 30, 80) node.sizes <- c (20, 50, 80) node.attribute.name <- 'count' # previously defined, has values which range between 2 and 100 # remind yourself of the values of count on each of the three nodes print (noa (getGraph (cw), 'count')) # A.A B.B C.C # "2" "30" "100" setNodeSizeRule (cw, node.attribute.name, control.points, node.sizes, mode='interpolate') # a warning is issued; below and above sizes must be inferred # now make a new rule. explicitly specify below and above sizes node.sizes <- c (1, 20, 50, 80, 200) # anything below 20 will have size of 1; anothing above 80 will be 200. this should be easy to see and check setNodeSizeRule (cw, node.attribute.name, control.points, node.sizes, mode='interpolate') # a warning is issued; below and above sizes must be inferred cleanEx() nameEx("setNodeTooltipRule") ### * setNodeTooltipRule flush(stderr()); flush(stdout()) ### Name: setNodeTooltipRule ### Title: setNodeTooltipRule ### Aliases: setNodeTooltipRule ### setNodeTooltipRule,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeTooltipRule.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) setNodeTooltipRule (cw, 'type') setNodeTooltipRule (cw, 'lfc') setNodeTooltipRule (cw, 'count') cleanEx() nameEx("setNodeWidthDirect") ### * setNodeWidthDirect flush(stderr()); flush(stdout()) ### Name: setNodeWidthDirect ### Title: setNodeWidthDirect ### Aliases: setNodeWidthDirect ### setNodeWidthDirect,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setNodeWidthDirect.test', graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') lockNodeDimensions (cw, 'default', FALSE) setNodeWidthDirect (cw, 'A', 32) redraw (cw) cleanEx() nameEx("setPosition") ### * setPosition flush(stderr()); flush(stdout()) ### Name: setPosition ### Title: setPosition ### Aliases: setPosition setPosition,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('setPosition.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw) setPosition (cw, c ('A', 'B', 'C'), c (10.0, 20.0, 500), c (0.0, 100.0, 3)) cleanEx() nameEx("setVisualStyle") ### * setVisualStyle flush(stderr()); flush(stdout()) ### Name: setVisualStyle ### Title: setVisualStyle ### Aliases: setVisualStyle setVisualStyle,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples window.name = 'demo.setVisualStyle' cw = new.CytoscapeWindow (window.name, graph=makeSimpleGraph ()) displayGraph (cw) redraw (cw) layout (cw) styles = getVisualStyleNames (cw) # now cycle through the currently defined styles for (style in styles) { print (paste ("about to set new style:", style)) setVisualStyle (cw, style) } cleanEx() nameEx("setWindowSize") ### * setWindowSize flush(stderr()); flush(stdout()) ### Name: setWindowSize ### Title: setWindowSize ### Aliases: setWindowSize setWindowSize,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'setWindowSize demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setWindowSize (cw, 1200, 800) fitContent (cw) system ('sleep 1') setWindowSize (cw, 120, 80) fitContent (cw) system ('sleep 1') setWindowSize (cw, 600, 400) fitContent (cw) cleanEx() nameEx("setZoom") ### * setZoom flush(stderr()); flush(stdout()) ### Name: setZoom ### Title: setZoom ### Aliases: setZoom setZoom,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples window.title = 'setZoom demo' cw <- new.CytoscapeWindow (window.title, graph=makeSimpleGraph()) displayGraph (cw) redraw (cw) layout (cw, 'jgraph-spring') setZoom (cw, 0.3) system ('sleep 1') setZoom (cw, 3.0) system ('sleep 1') setZoom (cw, 1.0) cleanEx() nameEx("unhideAll") ### * unhideAll flush(stderr()); flush(stdout()) ### Name: unhideAll ### Title: unhideAll ### Aliases: unhideAll unhideAll,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('unhideAll.test', graph=makeSimpleGraph()) displayGraph (cw) layout (cw, 'jgraph-spring') redraw (cw) clearSelection (cw) selectNodes (cw, 'A') hideSelectedNodes (cw) cleanEx() nameEx("unhideNodes") ### * unhideNodes flush(stderr()); flush(stdout()) ### Name: unhideNodes ### Title: unhideNodes ### Aliases: unhideNodes unhideNodes,CytoscapeWindowClass-method ### Keywords: graph ### ** Examples cw <- new.CytoscapeWindow ('unhideNodes.test', graph=makeSimpleGraph()) layout (cw, 'jgraph-spring') redraw (cw) hideNodes (cw, c ('A', 'B')) system ('sleep 1') unhideNodes (cw, c ('A', 'B')) cleanEx() nameEx("version") ### * version flush(stderr()); flush(stdout()) ### Name: version ### Title: version ### Aliases: version version,CytoscapeConnectionClass-method ### Keywords: graph ### ** Examples cy <- CytoscapeConnection () print (version (cy)) # e.g., "1.3.2" ### *