Description Usage Arguments Value Author(s) Examples
Given a node attribute data frame (node.df) with the node names in column 1, and an edge attribute data.frame (edge.df) with node names in the first two columns, cyPlot creates a graphNEL object with nodes, edges, and their attributes that can be loaded into Cytoscape with CytoscapeWindow.
1 | cyPlot(node.df, edge.df)
|
node.df |
a |
edge.df |
a |
a graphNEL object with nodes, edges, and their attributes
Mark Grimes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
# Create node and edge data frames
node.tbl <- data.frame(Gene.Name=c("FOX", "CENT", "RTK"), Numeric.Data=as.numeric(c(10, 12, 7)), nodeType=c("ts factor", "nuclear porin", "receptor"))
edge.tbl <- data.frame(Gene.1=c("FOX", "FOX", "CENT", "CENT"), Gene.2=c("CENT", "RTK", "FOX", "RTK"), Weight=as.numeric(c(0.1, 1, 2, 0.02)), edgeType="interaction")
window.name <- 'demo cyPlot'
# Create graph and send to Cytoscape
cg <- cyPlot(node.tbl, edge.tbl)
cw <- CytoscapeWindow (window.name, graph=cg)
displayGraph (cw)
redraw (cw)
layoutNetwork(cw)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.