# first, delete existing windows to save memory:
deleteAllWindows(CytoscapeConnection())
cw <- CytoscapeWindow ('setEdgeLineWidthRule.test', graph=makeSimpleGraph())
displayGraph (cw)
layoutNetwork (cw, 'force-directed')
edge.attribute.values <- c('phosphorylates', 'synthetic lethal', 'undefined')
line.widths <- c(0, 8, 16)
setEdgeLineWidthRule (cw, 'edgeType', edge.attribute.values, line.widths)
Run the code above in your browser using DataLab