Description Usage Arguments Value Author(s) See Also Examples
Node and edge attributes are usually added to a Cytoscape network by defining them on the graph used to construct a CytoscapeWindow. The small family of methods described here, however, provide another avenue for adding an edge attribute, for learning which are currently defined, and for deleting an edge attribute.
Note that edge (and node) attibutes are defined, not just for a specific, single CytoscapeWindow, but for an entire Cytoscape application session.Thus if you have two nodes (or edges) with the same ID in two different windows, adding a node attribute results in both nodes having that attribute.
1 | getEdgeAttribute(obj, edge.name, attribute.name)
|
obj |
a |
edge.name |
a |
attribute.name |
a |
The attribute in question, which may be of any scalar type.
Tanja Muetze, Georgi Kolishovski, Paul Shannon
getEdgeAttributeNames deleteEdgeAttribute
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
window.name = 'demo.getEdgeAttribute'
cw = CytoscapeWindow (window.name, graph=makeSimpleGraph ())
setDefaultEdgeLineWidth (cw, 5);
displayGraph (cw)
redraw (cw)
layoutNetwork(cw)
score.bc = getEdgeAttribute (cw, "B (synthetic lethal) C", 'score')
print (paste ("should be -12: ", score.bc))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.