Description Usage Arguments Value Author(s) See Also Examples
Specify how data attributes – for the specified named attribute – is mapped to edge color.
1 2 | setEdgeColorRule(obj, edge.attribute.name, control.points, colors, mode,
default.color='#FFFFFF', vizmap.style.name = 'default')
|
obj |
a |
edge.attribute.name |
the edge attribute whose values will, when thiS rule is applied, determine the color of each edge. |
control.points |
a list of values, either numeric (for interpolate mode) or character strings (for 'lookup' mode). |
colors |
a list of colors, expressed as hexadecimal RGB, like this: '#FF0000' or '#FA8800' |
mode |
either 'interpolate' or 'lookup'. |
default.color |
a |
vizmap.style.name |
visual style name, defaults to the style 'default'. |
None.
Tanja Muetze, Georgi Kolishovski, Paul Shannon
setNodeShapeRule (detailed example) setEdgeLineStyleRule
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('setEdgeColorRule.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
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
colors = c ('#FF0000', '#FFFFFF', '#00FF00')
setEdgeColorRule (cw, 'score', score.values, colors, mode='interpolate')
# redraw (cw) --> not required anymore
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.