[BioC] problem getting setNodeColorRule from RCytoscape to work
Burak Kutlu
bkutlu at systemsbiology.org
Sat Mar 17 18:13:39 CET 2012
Hello,
Trying to replicate the example provided in the help page for setNodeColorRule, unfortunately it does not work for me.
Any suggestions?
thanks
-burak
# example from the help page for setNodeColorRule
> 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')
> 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')
Error in convertToR(xmlParse(node, asText = TRUE)) :
faultCode: 1001 faultString: Attribute lfc could not be found.
> 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')
Error in convertToR(xmlParse(node, asText = TRUE)) :
faultCode: 1001 faultString: Attribute type could not be found.
>
## session info
> sessionInfo()
R version 2.14.2 (2012-02-29)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RCytoscape_1.5.2 XMLRPC_0.2-4 graph_1.32.0
[4] BiocInstaller_1.2.1
loaded via a namespace (and not attached):
[1] RCurl_1.91-1 tools_2.14.2 XML_3.9-4
>
More information about the Bioconductor
mailing list