tmuetze / Bioconductor_RCy3_the_new_RCytoscape

Update RCytoscape to work for Cytoscape 3.0 and higher using CyREST
16 stars 10 forks source link

existing.Cytoscape.Window help file works but not function #17

Closed m-grimes closed 8 years ago

m-grimes commented 9 years ago

?existing.CytoscapeWindow

RCy3 help window is working

cool4.filt.w <- existing.CytoscapeWindow('10.9.10_15 filtered', copy=T) Error: could not find function "existing.CytoscapeWindow" cool4.filt.w <- existing.CytoscapeWindow('10.9.10_15 filtered', copy.graph.from.cytoscape.to.R=TRUE) Error: could not find function "existing.CytoscapeWindow" sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.4 (Yosemite)

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] parallel stats4 grid stats graphics grDevices utils
[8] datasets methods base

other attached packages: [1] RCy3_0.99.10 RJSONIO_1.3-0 rgl_0.95.1247
[4] RefNet_1.4.0 shiny_0.12.0 RCurl_1.95-4.6
[7] bitops_1.0-6 AnnotationHub_2.0.1 PSICQUIC_1.6.0
[10] httr_0.6.1 biomaRt_2.24.0 Biostrings_2.36.1
[13] XVector_0.8.0 GOstats_2.34.0 graph_1.46.0
[16] Category_2.34.2 GO.db_3.1.2 org.Hs.eg.db_3.1.2
[19] RSQLite_1.0.0 DBI_0.3.1 AnnotationDbi_1.30.1 [22] GenomeInfoDb_1.4.0 IRanges_2.2.1 S4Vectors_0.6.0
[25] Biobase_2.28.0 BiocGenerics_0.14.0 PMA_1.0.9
[28] plyr_1.8.2 impute_1.42.0 genlasso_1.3
[31] Matrix_1.2-0 MASS_7.3-40 igraph_0.7.1
[34] devtools_1.8.0 gplots_2.17.0 Rtsne_0.10
[37] tsne_0.1-2 vegan_2.3-0 permute_0.8-4
[40] RUnit_0.4.28 adegenet_1.4-2 ade4_1.7-2
[43] cluster_2.0.1 Hmisc_3.16-0 ggplot2_1.0.1
[46] Formula_1.2-1 survival_2.38-1 lattice_0.20-31
[49] stringr_1.0.0 sos_1.3-8 brew_1.0-6
[52] fdrtool_1.2.14 qgraph_1.3.1

loaded via a namespace (and not attached): [1] colorspace_1.2-6 rjson_0.2.15
[3] corpcor_1.6.7 lavaan_0.5-18
[5] interactiveDisplayBase_1.6.0 splines_3.2.0
[7] mnormt_1.5-3 glasso_1.8
[9] annotate_1.46.0 png_0.1-7
[11] acepack_1.3-3.3 htmltools_0.2.6
[13] tools_3.2.0 gtable_0.1.2
[15] reshape2_1.4.1 Rcpp_0.11.6
[17] gdata_2.16.1 ape_3.2
[19] nlme_3.1-120 psych_1.5.4
[21] proto_0.3-10 ggm_2.3
[23] mime_0.3 gtools_3.4.2
[25] XML_3.98-1.1 zlibbioc_1.14.0
[27] scales_0.2.4 BiocInstaller_1.18.2
[29] rversions_1.0.0 RBGL_1.44.0
[31] huge_1.2.6 RColorBrewer_1.1-2
[33] memoise_0.2.1 gridExtra_0.9.1
[35] rpart_4.1-9 latticeExtra_0.6-26
[37] stringi_0.4-1 genefilter_1.50.0
[39] sem_3.1-5 caTools_1.17.1
[41] d3Network_0.5.2.1 GSEABase_1.30.1
[43] AnnotationForge_1.10.1 magrittr_1.5
[45] R6_2.0.1 sna_2.3-2
[47] whisker_0.3-2 foreign_0.8-63
[49] mgcv_1.8-6 nnet_7.3-9
[51] KernSmooth_2.23-14 ellipse_0.3-8
[53] jpeg_0.1-8 pbivnorm_0.6.0
[55] git2r_0.10.1 matrixcalc_1.0-3
[57] digest_0.6.8 xtable_1.7-4
[59] httpuv_1.3.2 munsell_0.4.2
[61] quadprog_1.5-5

m-grimes commented 9 years ago

Note: this function still doesn't work (not implemented). -- mark

tmuetze commented 8 years ago

Applies to an old version. Is implemented in RCy3 0.99.25 and higher

risserlin commented 8 years ago

I am getting the same error with RCy3 version 1.01

Error in eval(expr, envir, enclos): could not find function "existing.CytoscapeWindow"

Warning message: In ls(package:RCy3): ‘package:RCy3’ converted to character string Out[98]: 'addCyEdge' 'addCyNode' 'addGraphToGraph' 'clearSelection' 'copyVisualStyle' 'createWindow' 'createWindowFromSelection' 'cy2.edge.names' 'cyPlot' 'CytoscapeConnection' 'CytoscapeWindow' 'deleteAllWindows' 'deleteEdgeAttribute' 'deleteNodeAttribute' 'deleteSelectedEdges' 'deleteSelectedNodes' 'deleteWindow' 'demoSimpleGraph' 'displayGraph' 'dockPanel' 'eda' 'eda.names' 'fitContent' 'fitSelectedContent' 'floatPanel' 'getAdjacentEdgeNames' 'getAllEdgeAttributes' 'getAllEdges' 'getAllNodeAttributes' 'getAllNodes' 'getArrowShapes' 'getAttributeClassNames' 'getCenter' 'getDefaultBackgroundColor' 'getDefaultEdgeReverseSelectionColor' 'getDefaultEdgeSelectionColor' 'getDefaultNodeReverseSelectionColor' 'getDefaultNodeSelectionColor' 'getDirectlyModifiableVisualProperties' 'getEdgeAttribute' 'getEdgeAttributeNames' 'getEdgeCount' 'getFirstNeighbors' 'getGraph' 'getGraphFromCyWindow' 'getLayoutNameMapping' 'getLayoutNames' 'getLayoutPropertyNames' 'getLayoutPropertyType' 'getLayoutPropertyValue' 'getLineStyles' 'getNodeAttribute' 'getNodeAttributeNames' 'getNodeCount' 'getNodePosition' 'getNodeShapes' 'getNodeSize' 'getSelectedEdgeCount' 'getSelectedEdges' 'getSelectedNodeCount' 'getSelectedNodes' 'getViewCoordinates' 'getVisualStyleNames' 'getWindowCount' 'getWindowID' 'getWindowList' 'getZoom' 'hideAllPanels' 'hideNodes' 'hidePanel' 'hideSelectedEdges' 'hideSelectedNodes' 'initEdgeAttribute' 'initNodeAttribute' 'invertEdgeSelection' 'invertNodeSelection' 'layoutNetwork' 'lockNodeDimensions' 'makeRandomGraph' 'makeSimpleGraph' 'noa' 'noa.names' 'ping' 'pluginVersion' 'predictTimeToDisplayGraph' 'raiseWindow' 'redraw' 'restoreLayout' 'saveImage' 'saveLayout' 'saveNetwork' 'selectEdges' 'selectFirstNeighborsOfSelectedNodes' 'selectNodes' 'sendEdges' 'sendNodes' 'setCenter' 'setDefaultBackgroundColor' 'setDefaultEdgeColor' 'setDefaultEdgeFontSize' 'setDefaultEdgeLineWidth' 'setDefaultEdgeReverseSelectionColor' 'setDefaultEdgeSelectionColor' 'setDefaultEdgeSourceArrowColor' 'setDefaultEdgeTargetArrowColor' 'setDefaultNodeBorderColor' 'setDefaultNodeBorderWidth' 'setDefaultNodeColor' 'setDefaultNodeFontSize' 'setDefaultNodeLabelColor' 'setDefaultNodeReverseSelectionColor' 'setDefaultNodeSelectionColor' 'setDefaultNodeShape' 'setDefaultNodeSize' 'setEdgeAttributes' 'setEdgeAttributesDirect' 'setEdgeColorDirect' 'setEdgeColorRule' 'setEdgeFontSizeDirect' 'setEdgeLabelColorDirect' 'setEdgeLabelDirect' 'setEdgeLabelOpacityDirect' 'setEdgeLabelRule' 'setEdgeLineStyleDirect' 'setEdgeLineStyleRule' 'setEdgeLineWidthDirect' 'setEdgeLineWidthRule' 'setEdgeOpacityDirect' 'setEdgeOpacityRule' 'setEdgeSourceArrowColorDirect' 'setEdgeSourceArrowColorRule' 'setEdgeSourceArrowOpacityDirect' 'setEdgeSourceArrowRule' 'setEdgeSourceArrowShapeDirect' 'setEdgeTargetArrowColorDirect' 'setEdgeTargetArrowColorRule' 'setEdgeTargetArrowOpacityDirect' 'setEdgeTargetArrowRule' 'setEdgeTargetArrowShapeDirect' 'setEdgeTooltipDirect' 'setEdgeTooltipRule' 'setGraph' 'setLayoutProperties' 'setNodeAttributes' 'setNodeAttributesDirect' 'setNodeBorderColorDirect' 'setNodeBorderColorRule' 'setNodeBorderOpacityDirect' 'setNodeBorderWidthDirect' 'setNodeBorderWidthRule' 'setNodeColorDirect' 'setNodeColorRule' 'setNodeFillOpacityDirect' 'setNodeFontSizeDirect' 'setNodeHeightDirect' 'setNodeImageDirect' 'setNodeLabelColorDirect' 'setNodeLabelDirect' 'setNodeLabelOpacityDirect' 'setNodeLabelRule' 'setNodeOpacityDirect' 'setNodeOpacityRule' 'setNodePosition' 'setNodeShapeDirect' 'setNodeShapeRule' 'setNodeSizeDirect' 'setNodeSizeRule' 'setNodeTooltipRule' 'setNodeWidthDirect' 'setTooltipDismissDelay' 'setTooltipInitialDelay' 'setVisualStyle' 'setWindowSize' 'setZoom' 'sfn' 'showGraphicsDetails' 'unhideAll' Out[98]: R version 3.2.2 (2015-08-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie)

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] RCy3_1.0.1 RCurl_1.95-4.7 bitops_1.0-6 graph_1.48.0
[5] RColorBrewer_1.1-2 pheatmap_1.0.8 httr_1.2.1 RJSONIO_1.3-0
[9] limma_3.26.9 GSA_1.03 ggplot2_2.1.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.2 BiocGenerics_0.16.1 munsell_0.4.2
[4] uuid_0.1-2 colorspace_1.2-6 R6_2.1.1
[7] stringr_0.6.2 plyr_1.8.3 tools_3.2.2
[10] parallel_3.2.2 grid_3.2.2 gtable_0.1.2
[13] digest_0.6.8 IRdisplay_0.3 repr_0.3
[16] base64enc_0.1-3 IRkernel_0.5 curl_0.9.4
[19] evaluate_0.8 labeling_0.3 rzmq_0.7.7
[22] scales_0.3.0 stats4_3.2.2 jsonlite_0.9.17

tmuetze commented 8 years ago

Odd. Works for me on RCy3 1.2.0. Could you please upgrade to 1.2.0 and check again? There were also a few crucial updates.

ls(package:RCy3) [1] "addCyEdge" "addCyNode"
[3] "addGraphToGraph" "clearSelection"
[5] "copyVisualStyle" "createWindow"
[7] "createWindowFromSelection" "cy2.edge.names"
[9] "cyPlot" "CytoscapeConnection"
[11] "CytoscapeWindow" "deleteAllWindows"
[13] "deleteEdgeAttribute" "deleteNodeAttribute"
[15] "deleteSelectedEdges" "deleteSelectedNodes"
[17] "deleteWindow" "demoSimpleGraph"
[19] "displayGraph" "dockPanel"
[21] "eda" "eda.names"
[23] "existing.CytoscapeWindow" "fitContent"
[25] "fitSelectedContent" "floatPanel"
[27] "getAdjacentEdgeNames" "getAllEdgeAttributes"
[29] "getAllEdges" "getAllNodeAttributes"
[31] "getAllNodes" "getArrowShapes"
[33] "getAttributeClassNames" "getCenter"
[35] "getDefaultBackgroundColor" "getDefaultEdgeReverseSelectionColor"
[37] "getDefaultEdgeSelectionColor" "getDefaultNodeReverseSelectionColor"
[39] "getDefaultNodeSelectionColor" "getDirectlyModifiableVisualProperties" [41] "getEdgeAttribute" "getEdgeAttributeNames"
[43] "getEdgeCount" "getFirstNeighbors"
[45] "getGraph" "getGraphFromCyWindow"
[47] "getLayoutNameMapping" "getLayoutNames"
[49] "getLayoutPropertyNames" "getLayoutPropertyType"
[51] "getLayoutPropertyValue" "getLineStyles"
[53] "getNodeAttribute" "getNodeAttributeNames"
[55] "getNodeCount" "getNodePosition"
[57] "getNodeShapes" "getNodeSize"
[59] "getSelectedEdgeCount" "getSelectedEdges"
[61] "getSelectedNodeCount" "getSelectedNodes"
[63] "getViewCoordinates" "getVisualStyleNames"
[65] "getWindowCount" "getWindowID"
[67] "getWindowList" "getZoom"
[69] "hideAllPanels" "hideNodes"
[71] "hidePanel" "hideSelectedEdges"
[73] "hideSelectedNodes" "initEdgeAttribute"
[75] "initNodeAttribute" "invertEdgeSelection"
[77] "invertNodeSelection" "layoutNetwork"
[79] "lockNodeDimensions" "makeRandomGraph"
[81] "makeSimpleGraph" "noa"
[83] "noa.names" "ping"
[85] "pluginVersion" "predictTimeToDisplayGraph"
[87] "raiseWindow" "redraw"
[89] "restoreLayout" "saveImage"
[91] "saveLayout" "saveNetwork"
[93] "selectEdges" "selectFirstNeighborsOfSelectedNodes"
[95] "selectNodes" "sendEdges"
[97] "sendNodes" "setCenter"
[99] "setDefaultBackgroundColor" "setDefaultEdgeColor"
[101] "setDefaultEdgeFontSize" "setDefaultEdgeLineWidth"
[103] "setDefaultEdgeReverseSelectionColor" "setDefaultEdgeSelectionColor"
[105] "setDefaultEdgeSourceArrowColor" "setDefaultEdgeTargetArrowColor"
[107] "setDefaultNodeBorderColor" "setDefaultNodeBorderWidth"
[109] "setDefaultNodeColor" "setDefaultNodeFontSize"
[111] "setDefaultNodeLabelColor" "setDefaultNodeReverseSelectionColor"
[113] "setDefaultNodeSelectionColor" "setDefaultNodeShape"
[115] "setDefaultNodeSize" "setEdgeAttributes"
[117] "setEdgeAttributesDirect" "setEdgeColorDirect"
[119] "setEdgeColorRule" "setEdgeFontSizeDirect"
[121] "setEdgeLabelColorDirect" "setEdgeLabelDirect"
[123] "setEdgeLabelOpacityDirect" "setEdgeLabelRule"
[125] "setEdgeLineStyleDirect" "setEdgeLineStyleRule"
[127] "setEdgeLineWidthDirect" "setEdgeLineWidthRule"
[129] "setEdgeOpacityDirect" "setEdgeOpacityRule"
[131] "setEdgeSourceArrowColorDirect" "setEdgeSourceArrowColorRule"
[133] "setEdgeSourceArrowOpacityDirect" "setEdgeSourceArrowRule"
[135] "setEdgeSourceArrowShapeDirect" "setEdgeTargetArrowColorDirect"
[137] "setEdgeTargetArrowColorRule" "setEdgeTargetArrowOpacityDirect"
[139] "setEdgeTargetArrowRule" "setEdgeTargetArrowShapeDirect"
[141] "setEdgeTooltipDirect" "setEdgeTooltipRule"
[143] "setGraph" "setLayoutProperties"
[145] "setNodeAttributes" "setNodeAttributesDirect"
[147] "setNodeBorderColorDirect" "setNodeBorderColorRule"
[149] "setNodeBorderOpacityDirect" "setNodeBorderWidthDirect"
[151] "setNodeBorderWidthRule" "setNodeColorDirect"
[153] "setNodeColorRule" "setNodeFillOpacityDirect"
[155] "setNodeFontSizeDirect" "setNodeHeightDirect"
[157] "setNodeImageDirect" "setNodeLabelColorDirect"
[159] "setNodeLabelDirect" "setNodeLabelOpacityDirect"
[161] "setNodeLabelRule" "setNodeOpacityDirect"
[163] "setNodeOpacityRule" "setNodePosition"
[165] "setNodeShapeDirect" "setNodeShapeRule"
[167] "setNodeSizeDirect" "setNodeSizeRule"
[169] "setNodeTooltipRule" "setNodeWidthDirect"
[171] "setTooltipDismissDelay" "setTooltipInitialDelay"
[173] "setVisualStyle" "setWindowSize"
[175] "setZoom" "sfn"
[177] "showGraphicsDetails" "unhideAll"

risserlin commented 8 years ago

For some reason biocLite(“RCy3”) keeps installing version 1.0.1 but when I downloaded the package source and installed from the source it worked. Thanks.

m-grimes commented 8 years ago

Tanja

Is RCy3 1.2 now on bioconductor or should I download from GitHub?

Thanks,

Mark


Mark Grimes Division of Biological Sciences University of Montana Missoula, Montana 59812-4824 Grimes lab website Office Telephone: (406) 243-4977 Fax Number: (406) 243-4184 E-mail: Mark.Grimes@mso.umt.edu

On 27 Jul 2016, at 16:58, Tanja wrote:

Odd. Works for me on RCy3 1.2.0. Could you please upgrade to 1.2.0 and check again? There were also a few crucial updates.

ls(package:RCy3) [1] "addCyEdge" "addCyNode" [3] "addGraphToGraph" "clearSelection" [5] "copyVisualStyle" "createWindow" [7] "createWindowFromSelection" "cy2.edge.names" [9] "cyPlot" "CytoscapeConnection" [11] "CytoscapeWindow" "deleteAllWindows" [13] "deleteEdgeAttribute" "deleteNodeAttribute" [15] "deleteSelectedEdges" "deleteSelectedNodes" [17] "deleteWindow" "demoSimpleGraph" [19] "displayGraph" "dockPanel" [21] "eda" "eda.names" [23] "existing.CytoscapeWindow" "fitContent" [25] "fitSelectedContent" "floatPanel" [27] "getAdjacentEdgeNames" "getAllEdgeAttributes" [29] "getAllEdges" "getAllNodeAttributes" [31] "getAllNodes" "getArrowShapes" [33] "getAttributeClassNames" "getCenter" [35] "getDefaultBackgroundColor"
"getDefaultEdgeReverseSelectionColor" [37] "getDefaultEdgeSelectionColor"
"getDefaultNodeReverseSelectionColor" [39] "getDefaultNodeSelectionColor"
"getDirectlyModifiableVisualProperties" [41] "getEdgeAttribute" "getEdgeAttributeNames" [43] "getEdgeCount" "getFirstNeighbors" [45] "getGraph" "getGraphFromCyWindow" [47] "getLayoutNameMapping" "getLayoutNames" [49] "getLayoutPropertyNames" "getLayoutPropertyType" [51] "getLayoutPropertyValue" "getLineStyles" [53] "getNodeAttribute" "getNodeAttributeNames" [55] "getNodeCount" "getNodePosition" [57] "getNodeShapes" "getNodeSize" [59] "getSelectedEdgeCount" "getSelectedEdges" [61] "getSelectedNodeCount" "getSelectedNodes" [63] "getViewCoordinates" "getVisualStyleNames" [65] "getWindowCount" "getWindowID" [67] "getWindowList" "getZoom" [69] "hideAllPanels" "hideNodes" [71] "hidePanel" "hideSelectedEdges" [73] "hideSelectedNodes" "initEdgeAttribute" [75] "initNodeAttribute" "invertEdgeSelection" [77] "invertNodeSelection" "layoutNetwork" [79] "lockNodeDimensions" "makeRandomGraph" [81] "makeSimpleGraph" "noa" [83] "noa.names" "ping" [85] "pluginVersion"
"predictTimeToDisplayGraph" [87] "raiseWindow" "redraw" [89] "restoreLayout" "saveImage" [91] "saveLayout" "saveNetwork" [93] "selectEdges"
"selectFirstNeighborsOfSelectedNodes" [95] "selectNodes" "sendEdges" [97] "sendNodes" "setCenter" [99] "setDefaultBackgroundColor" "setDefaultEdgeColor" [101] "setDefaultEdgeFontSize"
"setDefaultEdgeLineWidth" [103] "setDefaultEdgeReverseSelectionColor"
"setDefaultEdgeSelectionColor" [105] "setDefaultEdgeSourceArrowColor"
"setDefaultEdgeTargetArrowColor" [107] "setDefaultNodeBorderColor"
"setDefaultNodeBorderWidth" [109] "setDefaultNodeColor" "setDefaultNodeFontSize" [111] "setDefaultNodeLabelColor"
"setDefaultNodeReverseSelectionColor" [113] "setDefaultNodeSelectionColor" "setDefaultNodeShape" [115] "setDefaultNodeSize" "setEdgeAttributes" [117] "setEdgeAttributesDirect" "setEdgeColorDirect" [119] "setEdgeColorRule" "setEdgeFontSizeDirect" [121] "setEdgeLabelColorDirect" "setEdgeLabelDirect" [123] "setEdgeLabelOpacityDirect" "setEdgeLabelRule" [125] "setEdgeLineStyleDirect" "setEdgeLineStyleRule" [127] "setEdgeLineWidthDirect" "setEdgeLineWidthRule" [129] "setEdgeOpacityDirect" "setEdgeOpacityRule" [131] "setEdgeSourceArrowColorDirect"
"setEdgeSourceArrowColorRule" [133] "setEdgeSourceArrowOpacityDirect" "setEdgeSourceArrowRule" [135] "setEdgeSourceArrowShapeDirect"
"setEdgeTargetArrowColorDirect" [137] "setEdgeTargetArrowColorRule"
"setEdgeTargetArrowOpacityDirect" [139] "setEdgeTargetArrowRule"
"setEdgeTargetArrowShapeDirect" [141] "setEdgeTooltipDirect" "setEdgeTooltipRule" [143] "setGraph" "setLayoutProperties" [145] "setNodeAttributes"
"setNodeAttributesDirect" [147] "setNodeBorderColorDirect" "setNodeBorderColorRule" [149] "setNodeBorderOpacityDirect"
"setNodeBorderWidthDirect" [151] "setNodeBorderWidthRule" "setNodeColorDirect" [153] "setNodeColorRule"
"setNodeFillOpacityDirect" [155] "setNodeFontSizeDirect" "setNodeHeightDirect" [157] "setNodeImageDirect"
"setNodeLabelColorDirect" [159] "setNodeLabelDirect"
"setNodeLabelOpacityDirect" [161] "setNodeLabelRule" "setNodeOpacityDirect" [163] "setNodeOpacityRule" "setNodePosition" [165] "setNodeShapeDirect" "setNodeShapeRule" [167] "setNodeSizeDirect" "setNodeSizeRule" [169] "setNodeTooltipRule" "setNodeWidthDirect" [171] "setTooltipDismissDelay" "setTooltipInitialDelay" [173] "setVisualStyle" "setWindowSize" [175] "setZoom" "sfn" [177] "showGraphicsDetails" "unhideAll"


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tmuetze/Bioconductor_RCy3_the_new_RCytoscape/issues/17#issuecomment-235747203

m-grimes commented 8 years ago

Tanja

Still some problems with RCy3 1.2 downloaded from bioconductor, documented in the attached nodekey.R. The revision in cyPlot.2.R fixes a problem with cyPlot. We seem to have lost altogether the ability to set edge color properties. Is this the correct version to test?

Thanks,

Mark


Mark Grimes Division of Biological Sciences University of Montana Missoula, Montana 59812-4824 Grimes lab website Office Telephone: (406) 243-4977 Fax Number: (406) 243-4184 E-mail: Mark.Grimes@mso.umt.edu

On 27 Jul 2016, at 16:58, Tanja wrote:

Odd. Works for me on RCy3 1.2.0. Could you please upgrade to 1.2.0 and check again? There were also a few crucial updates.

ls(package:RCy3) [1] "addCyEdge" "addCyNode" [3] "addGraphToGraph" "clearSelection" [5] "copyVisualStyle" "createWindow" [7] "createWindowFromSelection" "cy2.edge.names" [9] "cyPlot" "CytoscapeConnection" [11] "CytoscapeWindow" "deleteAllWindows" [13] "deleteEdgeAttribute" "deleteNodeAttribute" [15] "deleteSelectedEdges" "deleteSelectedNodes" [17] "deleteWindow" "demoSimpleGraph" [19] "displayGraph" "dockPanel" [21] "eda" "eda.names" [23] "existing.CytoscapeWindow" "fitContent" [25] "fitSelectedContent" "floatPanel" [27] "getAdjacentEdgeNames" "getAllEdgeAttributes" [29] "getAllEdges" "getAllNodeAttributes" [31] "getAllNodes" "getArrowShapes" [33] "getAttributeClassNames" "getCenter" [35] "getDefaultBackgroundColor"
"getDefaultEdgeReverseSelectionColor" [37] "getDefaultEdgeSelectionColor"
"getDefaultNodeReverseSelectionColor" [39] "getDefaultNodeSelectionColor"
"getDirectlyModifiableVisualProperties" [41] "getEdgeAttribute" "getEdgeAttributeNames" [43] "getEdgeCount" "getFirstNeighbors" [45] "getGraph" "getGraphFromCyWindow" [47] "getLayoutNameMapping" "getLayoutNames" [49] "getLayoutPropertyNames" "getLayoutPropertyType" [51] "getLayoutPropertyValue" "getLineStyles" [53] "getNodeAttribute" "getNodeAttributeNames" [55] "getNodeCount" "getNodePosition" [57] "getNodeShapes" "getNodeSize" [59] "getSelectedEdgeCount" "getSelectedEdges" [61] "getSelectedNodeCount" "getSelectedNodes" [63] "getViewCoordinates" "getVisualStyleNames" [65] "getWindowCount" "getWindowID" [67] "getWindowList" "getZoom" [69] "hideAllPanels" "hideNodes" [71] "hidePanel" "hideSelectedEdges" [73] "hideSelectedNodes" "initEdgeAttribute" [75] "initNodeAttribute" "invertEdgeSelection" [77] "invertNodeSelection" "layoutNetwork" [79] "lockNodeDimensions" "makeRandomGraph" [81] "makeSimpleGraph" "noa" [83] "noa.names" "ping" [85] "pluginVersion"
"predictTimeToDisplayGraph" [87] "raiseWindow" "redraw" [89] "restoreLayout" "saveImage" [91] "saveLayout" "saveNetwork" [93] "selectEdges"
"selectFirstNeighborsOfSelectedNodes" [95] "selectNodes" "sendEdges" [97] "sendNodes" "setCenter" [99] "setDefaultBackgroundColor" "setDefaultEdgeColor" [101] "setDefaultEdgeFontSize"
"setDefaultEdgeLineWidth" [103] "setDefaultEdgeReverseSelectionColor"
"setDefaultEdgeSelectionColor" [105] "setDefaultEdgeSourceArrowColor"
"setDefaultEdgeTargetArrowColor" [107] "setDefaultNodeBorderColor"
"setDefaultNodeBorderWidth" [109] "setDefaultNodeColor" "setDefaultNodeFontSize" [111] "setDefaultNodeLabelColor"
"setDefaultNodeReverseSelectionColor" [113] "setDefaultNodeSelectionColor" "setDefaultNodeShape" [115] "setDefaultNodeSize" "setEdgeAttributes" [117] "setEdgeAttributesDirect" "setEdgeColorDirect" [119] "setEdgeColorRule" "setEdgeFontSizeDirect" [121] "setEdgeLabelColorDirect" "setEdgeLabelDirect" [123] "setEdgeLabelOpacityDirect" "setEdgeLabelRule" [125] "setEdgeLineStyleDirect" "setEdgeLineStyleRule" [127] "setEdgeLineWidthDirect" "setEdgeLineWidthRule" [129] "setEdgeOpacityDirect" "setEdgeOpacityRule" [131] "setEdgeSourceArrowColorDirect"
"setEdgeSourceArrowColorRule" [133] "setEdgeSourceArrowOpacityDirect" "setEdgeSourceArrowRule" [135] "setEdgeSourceArrowShapeDirect"
"setEdgeTargetArrowColorDirect" [137] "setEdgeTargetArrowColorRule"
"setEdgeTargetArrowOpacityDirect" [139] "setEdgeTargetArrowRule"
"setEdgeTargetArrowShapeDirect" [141] "setEdgeTooltipDirect" "setEdgeTooltipRule" [143] "setGraph" "setLayoutProperties" [145] "setNodeAttributes"
"setNodeAttributesDirect" [147] "setNodeBorderColorDirect" "setNodeBorderColorRule" [149] "setNodeBorderOpacityDirect"
"setNodeBorderWidthDirect" [151] "setNodeBorderWidthRule" "setNodeColorDirect" [153] "setNodeColorRule"
"setNodeFillOpacityDirect" [155] "setNodeFontSizeDirect" "setNodeHeightDirect" [157] "setNodeImageDirect"
"setNodeLabelColorDirect" [159] "setNodeLabelDirect"
"setNodeLabelOpacityDirect" [161] "setNodeLabelRule" "setNodeOpacityDirect" [163] "setNodeOpacityRule" "setNodePosition" [165] "setNodeShapeDirect" "setNodeShapeRule" [167] "setNodeSizeDirect" "setNodeSizeRule" [169] "setNodeTooltipRule" "setNodeWidthDirect" [171] "setTooltipDismissDelay" "setTooltipInitialDelay" [173] "setVisualStyle" "setWindowSize" [175] "setZoom" "sfn" [177] "showGraphicsDetails" "unhideAll"


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tmuetze/Bioconductor_RCy3_the_new_RCytoscape/issues/17#issuecomment-235747203

Node and edge visual properties test

Mark Grimes

July 7, 2016

# library(gplots) library(RCy3)

Define node default property setting function

nodeDprops.new <- function (windowobj, cf, merged=FALSE) { setDefaultBackgroundColor (windowobj, "#949494") # grey 58 if (merged) setDefaultBackgroundColor (windowobj, "#FFFFFF") # white setDefaultNodeShape(windowobj, "ELLIPSE") setDefaultNodeColor (windowobj, '#F0FFFF') # azure1 setDefaultNodeSize (windowobj, 100) # for grey non-data nodes setDefaultNodeFontSize(windowobj, 22) setDefaultNodeLabelColor(windowobj, '#000000') # black setDefaultNodeBorderWidth (windowobj, 1.8) setDefaultNodeBorderColor (windowobj, '#888888') # gray setDefaultNodeSelectionColor(windowobj, "#FF3388") molclasses <- c("unknown", "receptor tyrosine kinase", "SH2 protein", "SH2-SH3 protein", "SH3 protein", "tyrosine kinase", "SRC-family kinase", "kinase", "phosphatase", "transcription factor", "RNA binding protein")

NOTE getNodeShapes(cy) returns node shapes in random order! Define manually

 #  *12 for RCy2; 9 for RCy3
 # there are now 24 nodeType classes
nodeshapes <- c("ELLIPSE","ROUND_RECTANGLE", "VEE", "VEE", "TRIANGLE", "HEXAGON", "DIAMOND", "OCTAGON", "OCTAGON", "PARALLELOGRAM", "RECTANGLE")
if(length(sessionInfo()$otherPkgs$RCy3)==0) {
    nodeshapes <- c("ellipse", "round_rect", "vee", "triangle", "hexagon", "diamond", "octagon", "octagon", "parallelogram", "rect")}
setDefaultNodeSelectionColor (windowobj,  "#CC00FF") 
setNodeShapeRule (windowobj, node.attribute.name="nodeType", attribute.values=molclasses, node.shapes=nodeshapes, default.shape="ELLIPSE")
setNodeBorderWidthRule(windowobj, node.attribute.name="nodeType", attribute.values=c("deacetylase","acetyltransferase","demethylase","methyltransferase","membrane protein", "receptor tyrosine kinase", "G protein-coupled receptor", "SRC-family kinase", "tyrosine kinase", "kinase", "phosphatase"), line.widths=c(4,12,4,12,8,16,16,12,12,12,14), default.width=4)
if (length(cf[grep("SH2", cf$Domains), 1])>0 & !all(grep("SH2", cf$Domains) %in% which(cf$nodeType %in% molclasses))) {
setNodeShapeDirect(windowobj, cf[grep("SH2", cf$Domains) %w/o% which(cf$nodeType %in% molclasses), 1], nodeshapes[3])} 
if (length(cf[grep("RNA", cf$nodeType), 1])>0) {
setNodeShapeDirect(windowobj, cf[grep("RNA", cf$nodeType), 1], nodeshapes[11])}
if (length(cf[grep("transcription", cf$nodeType), 1])>0) {
setNodeShapeDirect(windowobj, cf[grep("transcription", cf$nodeType), 1], nodeshapes[10])}
if (length(cf[grep("acetyl", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("acetyl", cf$nodeType), 1], "#FF8C00")} # darkorange
if (length(cf[grep("methyl", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("methyl", cf$nodeType), 1], "#005CE6")} # blue
if (length(cf[grep("membrane", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("membrane", cf$nodeType), 1], "#6600CC") # purple
setNodeShapeDirect(windowobj, cf[grep("membrane", cf$nodeType), 1], nodeshapes[2])} 
if (length(cf[grep("kinase", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("kinase", cf$nodeType), 1], "#EE0000")} # red2
if (length(cf[grep("phosphatase", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("phosphatase", cf$nodeType), 1], "#FFEC8B")} # lightgoldenrod1
if (length(cf[grep("receptor", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("receptor", cf$nodeType), 1], "#BF3EFF") # darkorchid1
setNodeShapeDirect(windowobj, cf[grep("receptor", cf$nodeType), 1], nodeshapes[2])} 
if (length(cf[grep("TM", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("TM", cf$Domains), 1], "#6600CC") # purple
setNodeShapeDirect(windowobj, cf[grep("TM", cf$Domains), 1], nodeshapes[2])} 
# setNodeLabelRule(windowobj, node.attribute.name)
# redraw(windowobj)

} # end # remove.autophos.cy <- function(windowobj) { win.edges <- getAllEdges(windowobj) gene1 <- sapply(win.edges, function(x) unlist(strsplit(x, " "))[1]) gene2 <- sapply(win.edges, function(x) rev(unlist(strsplit(x, " ")))[1]) auto <- which(mapply(identical, gene1, gene2)) if (length(auto) > 0) { selectEdges(windowobj, win.edges[auto]) deleteSelectedEdges(windowobj) } }

end

Set up graph

molclasses <- c("unknown", "receptor tyrosine kinase",  "SH2 protein", "SH3 protein", "tyrosine kinase",  "SRC-family kinase",   "kinase", "phosphatase", "transcription factor", "RNA binding protein")
nodeTypes <- c(molclasses,"deacetylase","acetyltransferase","demethylase","methyltransferase","membrane protein", "receptor tyrosine kinase", "G protein-coupled receptor")
nulledges <- data.frame(Gene.1="unknown", Gene.2="unknown", edgeType="unknown", Weight=0)
nodetype.cf <- data.frame(Gene.Name=nodeTypes, nodeType=nodeTypes, size=130)
nodetype.cf$Domains <- c("undefined", "TM", "SH2", "SH3", "tyrosine kinase", "tyrosine kinase", "kinase", "phosphatase", "zinc finger", "RNA binding", "undefined", "undefined","undefined","undefined", "TM", "TM", "TM")
node.g <- cyPlot(nodetype.cf, nulledges)
node.w <- CytoscapeWindow("Node Key", node.g)
displayGraph(node.w)
    #
layoutNetwork(node.w, "grid")
 remove.autophos.cy(node.w)
 nodeDprops.new(node.w, nodetype.cf)

Edge key

edgeTypes <- c("pp", "controls-phosphorylation-of", "controls-expression-of", "controls-transport-of", "controls-state-change-of", "Physical interactions", "BioPlex", "in-complex-with", 'experiments', 'database', "Pathway", "Predicted", "Genetic interactions", "correlation", "negative correlation", "positive correlation", 'combined_score', "merged" , "intersect", "peptide", 'homology', "Shared protein domains")

edgecolors <- col2hex(c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2"))

myarrows <- c ('Arrow', 'Arrow', 'Arrow', 'Arrow', "Arrow", 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow')

edge_key.tbl <- data.frame(edgeTypes, colors=c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2"), myarrows, Weight=seq(-100, 110, 10))

hist(edge_key.tbl$Weight, breaks=100, col="magenta", ylim=c(0, 50)) legend(5, 50, edgeTypes, cex=0.8, col= edgecolors, lty=rep(1,24), lwd=4, bty="n");

Bigger version (after expanding plot window):

legend(5, 50, edgeTypes, cex=1.6, col= edgecolors, lty=rep(1,24), lwd=8, bty="n");

RCy3 and Cy test

Define edge default property setting function

edgeDprops <- function(windowname) { setDefaultEdgeLineWidth (windowname, 3) setDefaultEdgeColor (windowname, "#CD9B9B") # rosybrown3 setDefaultEdgeSelectionColor(windowname, "#FF69B4") # hotpink edgecolors <- col2hex(c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2")) edgecolorsplus <- col2hex(c("deeppink", "red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2", "orangered2"))

red; turquois; green; magenta; blue; violet; green; bluegreen; black; gray; turquoiseblue; orange

edgeTypes <- c("pp", "controls-phosphorylation-of", "controls-expression-of", "controls-transport-of",  "controls-state-change-of", "Physical interactions", "BioPlex", "in-complex-with",  'experiments',  'database',   "Pathway", "Predicted", "Genetic interactions", "correlation", "negative correlation", "positive correlation",  'combined_score', "merged" , "intersect", "peptide", 'homology', "Shared protein domains") 
# 22 edgeTypes  
myarrows <- c ('Arrow', 'Arrow', 'Arrow', 'Arrow', "Arrow", 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow')
setEdgeTargetArrowRule(windowname, 'edgeType', edgeTypes, myarrows, default='No Arrow')  
setEdgeTargetArrowColorRule(windowname, "edgeType",  edgeTypes, edgecolors, mode="lookup", default.color="#E6E6FA")  
setEdgeSourceArrowColorRule(windowname, "edgeType",  edgeTypes, edgecolors, mode="lookup", default.color="#E6E6FA")  
setEdgeColorRule(windowname, 'edgeType', edgeTypes, edgecolors, mode='lookup', default.color="#CD9B9B")
}

edgefile <- data.frame(Gene.1=LETTERS[1:23], Gene.2=paste(LETTERS[1:23], 1, sep=""), edgeType=c("unknown", edgeTypes), Weight=c(exp(seq(-20, 5, 2)), 1:6, 10:13)) edgefile[edgefile$edgeType=="negative correlation", "Weight"] <- -1.0 negs <- edgefile[edgefile $Weight<0,'Weight'] frnegs <- exp (negs*20)

plot (negs,frnegs)

edgefile $Alt.Weight <- edgefile $Weight
edgefile[edgefile $Weight<0,'Alt.Weight'] <- frnegs 

nodefile <- data.frame(Gene.Name=c(edgefile$Gene.1, edgefile$Gene.2), nodeType="unknown")

edgetest.g <- cyPlot(nodefile, edgefile)

Error in attr(nodeDataDefaults(graph, attr = attribute.name), "class") = attribute.type :

attempt to set an attribute on NULL edgetest.g <- cyPlot.2(nodefile, edgefile)

works

edge.w <- CytoscapeWindow("Edge Key", edgetest.g)
displayGraph(edge.w)
    #
layoutNetwork(edge.w, "hierarchical")
 edgeDprops(edge.w)
 # Now fails: says successuflly set rule but nothing changes
 setDefaultBackgroundColor (edge.w, "#949494") # grey 58
 # Note: fixed returned error message.
#
 setEdgeLabelRule (edge.w, 'edgeType')
 # FAILS - says success but no labels are shwon
 # Edge colors NO LONGER appropriately assigned.
 # Now for what is still not working:
    line.widths <- 4.5*abs(as.numeric(edgefile$Weight))
    # The following not only doesn't work, despite returning "Successfully set rule."
    #   It removes all the colors of the edges: 
    setEdgeLineWidthRule(edge.w, "Weight", attribute.values=as.character(edgefile$Weight), line.widths, default.width=1.2)
    # this doesn't work either:
    setEdgeLineWidthRule(edge.w, "Weight", attribute.values=as.numeric(edgefile$Weight), line.widths, default.width=1.2)
    # And:
    edgeDprops(edge.w)
    # now has no effect!
    # Worse, if the network is destroyed and replotted, edgeDprops doesn't work!
# Try a different function (after restarting Cytoscape and reloading graph)
setEdgeLineWidthDirect(edge.w, getAllEdges(edge.w), line.widths)  
# Works!
# Note
    redraw(edge.w)
    # Undoes the edge widths
data.frame(getAllEdges(edge.w), line.widths)

Note that any function that sets global properties removes the specifically set colors and shapes in the last part of the function. This includes setting e.g., background in Cytoscape itself. Or even changing the style name. Or redraw(windowobj)

If the above is run in the same Cy session, the node colors are removed in the first window after the edge properties are set in the second window.

Function to get cy edge names from edgefile (to ensure the Weights match up)

getCyEdgeNames <- function(edgefile) { cyedges <- mapply(paste, edgefile $Gene.1, " (", edgefile $edgeType, ") ", edgefile $Gene.2, sep="") return(cyedges) }

Functions to set edge widths using setEdgeLineWidthDirect

setEdgeWidths <- function (windowobj, factor=1) { alledges <- getAllEdges(windowobj) edgeweights <- sapply(alledges, function(x) getEdgeAttribute(windowobj, x, "Weight")) line.widths <- factor*abs(as.numeric(edgeweights)) setEdgeLineWidthDirect(windowobj, alledges, line.widths)
}

setEdgeWidths.log <- function (windowobj, factor=1) { alledges <- getAllEdges(windowobj) edgeweights <- sapply(alledges, function(x) getEdgeAttribute(windowobj, x, "Weight")) line.widths <- as.numeric(log(abs(edgeweights)) + factor - min(log(abs(edgeweights)))) setEdgeLineWidthDirect(windowobj, alledges, unname(line.widths))
}

setEdgeWidths(edge.w, factor=3)
setEdgeWidths.log(edge.w, factor=2)

Note: both work directly. But visual properties are lost if style is saved under another name.

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

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] parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] RCy3_1.2.0 rgl_0.95.1441 rcytoscapejs_0.0.7 DT_0.1 htmlwidgets_0.6
[6] STRINGdb_1.12.0 preprocessCore_1.34.0 RefNet_1.8.0 shiny_0.13.2 RCurl_1.95-4.8
[11] bitops_1.0-6 AnnotationHub_2.4.2 PSICQUIC_1.10.0 httr_1.2.1 biomaRt_2.28.0
[16] Biostrings_2.40.2 XVector_0.12.1 GOstats_2.38.1 graph_1.50.0 Category_2.38.0
[21] GO.db_3.3.0 org.Hs.eg.db_3.3.0 AnnotationDbi_1.34.4 IRanges_2.6.1 S4Vectors_0.10.2
[26] Biobase_2.32.0 BiocGenerics_0.18.0 PMA_1.0.9 plyr_1.8.4 impute_1.46.0
[31] genlasso_1.3 igraph_1.0.1 Matrix_1.2-6 MASS_7.3-45 devtools_1.12.0
[36] gplots_3.0.1 Rtsne_0.11 tsne_0.1-3 vegan_2.4-0 permute_0.9-0
[41] RUnit_0.4.31 cluster_2.0.4 Hmisc_3.17-4 ggplot2_2.1.0 Formula_1.2-1
[46] survival_2.39-5 lattice_0.20-33 stringr_1.0.0 BiocInstaller_1.22.3

loaded via a namespace (and not attached): [1] nlme_3.1-128 RColorBrewer_1.1-2 tools_3.3.1
[4] R6_2.1.2 rpart_4.1-10 KernSmooth_2.23-15
[7] DBI_0.4-1 mgcv_1.8-13 colorspace_1.2-6
[10] nnet_7.3-12 withr_1.0.2 gridExtra_2.2.1
[13] curl_1.1 chron_2.3-47 caTools_1.17.1
[16] scales_0.4.0 genefilter_1.54.2 RBGL_1.48.1
[19] digest_0.6.9 foreign_0.8-66 AnnotationForge_1.14.2
[22] htmltools_0.3.5 plotrix_3.6-3 RSQLite_1.0.0
[25] gtools_3.5.0 acepack_1.3-3.3 magrittr_1.5
[28] Rcpp_0.12.6 munsell_0.4.3 proto_0.3-10
[31] sqldf_0.4-10 stringi_1.1.1 RJSONIO_1.3-0
[34] zlibbioc_1.18.0 grid_3.3.1 gdata_2.17.0
[37] splines_3.3.1 hash_2.2.6 annotate_1.50.0
[40] XML_3.98-1.4 latticeExtra_0.6-28 data.table_1.9.6
[43] png_0.1-7 httpuv_1.3.3 gtable_0.2.0
[46] gsubfn_0.6-6 mime_0.5 xtable_1.8-2
[49] memoise_1.0.0 interactiveDisplayBase_1.10.3 GSEABase_1.34.0

node.df=yk.criz.cf edge.df=yk.edgefile

cyPlot.2 <- function (node.df, edge.df) { edge.nodes <- unique(c(as.character(edge.df[, 1]), as.character(edge.df[, 2]))) mydata <- new("graphNEL", edgemode = "directed", nodes = unique(c(as.character(node.df[, 1]), edge.nodes))) node.df[, 1] <- as.character(node.df[, 1]) edge.df[, 1:2] <- sapply(edge.df[, 1:2], as.character) node.class <- sapply(node.df, class) if (any(grep("factor", node.class))) { node.df[, grep("factor", node.class)] <- sapply(node.df[, grep("factor", node.class)], as.character) } if (any(grep("integer", node.class))) { node.df[, grep("integer", node.class)] <- sapply(node.df[, grep("integer", node.class)], as.numeric) } node.class <- sapply(node.df, class) edge.class <- sapply(edge.df, class) if (any(grep("factor", edge.class))) { edge.df[, grep("factor", edge.class)] <- sapply(edge.df[, grep("factor", edge.class)], as.character) } edge.class <- sapply(edge.df, class) if (dim(node.df)[2] > 2) { for (i in 2:length(grep("character", node.class))) { mydata <- initNodeAttribute(graph = mydata, attribute.name = names(node.class[grep("character", node.class)])[i], attribute.type = "char", default.value = "undefined") nodeData(mydata, n = as.character(node.df[, 1]), attr = names(node.class[grep("character", node.class)])[i]) <- as.character(node.df[, grep("character", node.class)[i]]) } for (i in 1:length(grep("numeric", node.class))) { mydata <- initNodeAttribute(graph = mydata, attribute.name = names(node.class[grep("numeric", node.class)])[i], attribute.type = "numeric", default.value = 0) nodeData(mydata, n = as.character(node.df[, 1]), attr = names(node.class[grep("numeric", node.class)])[i]) <- as.numeric(node.df[, grep("numeric", node.class)[i]]) }} mydata = addEdge(as.vector(edge.df[, 1], mode = "character"), as.vector(edge.df[, 2], mode = "character"), mydata) if (dim(edge.df)[2] > 2) { for (i in 3:length(grep("character", edge.class))) { mydata <- initEdgeAttribute(graph = mydata, attribute.name = names(edge.df[, grep("character", edge.class)])[i], attribute.type = "char", default.value = "undefined") edgeData(mydata, as.vector(edge.df[, 1], mode = "character"), as.vector(edge.df[, 2], mode = "character"), attr = names(edge.df[, grep("character", edge.class)])[i]) <- as.character(edge.df[, grep("character", edge.class)[i]]) } for (i in 1:length(grep("numeric", edge.class))) { mydata <- initEdgeAttribute(mydata, attribute.name = names(edge.class[grep("numeric", edge.class)])[i], attribute.type = "numeric", default.value = 0) edgeData(mydata, as.vector(edge.df[, 1], mode = "character"), as.vector(edge.df[, 2], mode = "character"), attr = names(edge.class[grep("numeric", edge.class)])[i]) <- as.numeric(edge.df[, grep("numeric", edge.class)[i]]) } } return(mydata) }

m-grimes commented 8 years ago

Retested with RCy3 1.1.16 downloaded just now from GitHub. Still problems with the rule based functions but the edge colors can be assigned with this version according to a rule. Updated test file attached.

mark


Mark Grimes Division of Biological Sciences University of Montana Missoula, Montana 59812-4824 Grimes lab website Office Telephone: (406) 243-4977 Fax Number: (406) 243-4184 E-mail: Mark.Grimes@mso.umt.edu

On 28 Jul 2016, at 12:18, Mark Grimes wrote:

Tanja

Still some problems with RCy3 1.2 downloaded from bioconductor, documented in the attached nodekey.R. The revision in cyPlot.2.R fixes a problem with cyPlot. We seem to have lost altogether the ability to set edge color properties. Is this the correct version to test?

Thanks,

Mark


Mark Grimes Division of Biological Sciences University of Montana Missoula, Montana 59812-4824 Grimes lab website Office Telephone: (406) 243-4977 Fax Number: (406) 243-4184 E-mail: Mark.Grimes@mso.umt.edu

On 27 Jul 2016, at 16:58, Tanja wrote:

Odd. Works for me on RCy3 1.2.0. Could you please upgrade to 1.2.0 and check again? There were also a few crucial updates.

ls(package:RCy3) [1] "addCyEdge" "addCyNode" [3] "addGraphToGraph" "clearSelection" [5] "copyVisualStyle" "createWindow" [7] "createWindowFromSelection" "cy2.edge.names" [9] "cyPlot" "CytoscapeConnection" [11] "CytoscapeWindow" "deleteAllWindows" [13] "deleteEdgeAttribute" "deleteNodeAttribute" [15] "deleteSelectedEdges" "deleteSelectedNodes" [17] "deleteWindow" "demoSimpleGraph" [19] "displayGraph" "dockPanel" [21] "eda" "eda.names" [23] "existing.CytoscapeWindow" "fitContent" [25] "fitSelectedContent" "floatPanel" [27] "getAdjacentEdgeNames" "getAllEdgeAttributes" [29] "getAllEdges" "getAllNodeAttributes" [31] "getAllNodes" "getArrowShapes" [33] "getAttributeClassNames" "getCenter" [35] "getDefaultBackgroundColor"
"getDefaultEdgeReverseSelectionColor" [37] "getDefaultEdgeSelectionColor"
"getDefaultNodeReverseSelectionColor" [39] "getDefaultNodeSelectionColor"
"getDirectlyModifiableVisualProperties" [41] "getEdgeAttribute" "getEdgeAttributeNames" [43] "getEdgeCount" "getFirstNeighbors" [45] "getGraph" "getGraphFromCyWindow" [47] "getLayoutNameMapping" "getLayoutNames" [49] "getLayoutPropertyNames" "getLayoutPropertyType" [51] "getLayoutPropertyValue" "getLineStyles" [53] "getNodeAttribute" "getNodeAttributeNames" [55] "getNodeCount" "getNodePosition" [57] "getNodeShapes" "getNodeSize" [59] "getSelectedEdgeCount" "getSelectedEdges" [61] "getSelectedNodeCount" "getSelectedNodes" [63] "getViewCoordinates" "getVisualStyleNames" [65] "getWindowCount" "getWindowID" [67] "getWindowList" "getZoom" [69] "hideAllPanels" "hideNodes" [71] "hidePanel" "hideSelectedEdges" [73] "hideSelectedNodes" "initEdgeAttribute" [75] "initNodeAttribute" "invertEdgeSelection" [77] "invertNodeSelection" "layoutNetwork" [79] "lockNodeDimensions" "makeRandomGraph" [81] "makeSimpleGraph" "noa" [83] "noa.names" "ping" [85] "pluginVersion"
"predictTimeToDisplayGraph" [87] "raiseWindow" "redraw" [89] "restoreLayout" "saveImage" [91] "saveLayout" "saveNetwork" [93] "selectEdges"
"selectFirstNeighborsOfSelectedNodes" [95] "selectNodes" "sendEdges" [97] "sendNodes" "setCenter" [99] "setDefaultBackgroundColor" "setDefaultEdgeColor" [101] "setDefaultEdgeFontSize"
"setDefaultEdgeLineWidth" [103] "setDefaultEdgeReverseSelectionColor"
"setDefaultEdgeSelectionColor" [105] "setDefaultEdgeSourceArrowColor"
"setDefaultEdgeTargetArrowColor" [107] "setDefaultNodeBorderColor"
"setDefaultNodeBorderWidth" [109] "setDefaultNodeColor"
"setDefaultNodeFontSize" [111] "setDefaultNodeLabelColor"
"setDefaultNodeReverseSelectionColor" [113] "setDefaultNodeSelectionColor" "setDefaultNodeShape" [115] "setDefaultNodeSize" "setEdgeAttributes" [117] "setEdgeAttributesDirect" "setEdgeColorDirect" [119] "setEdgeColorRule" "setEdgeFontSizeDirect" [121] "setEdgeLabelColorDirect" "setEdgeLabelDirect" [123] "setEdgeLabelOpacityDirect" "setEdgeLabelRule" [125] "setEdgeLineStyleDirect" "setEdgeLineStyleRule" [127] "setEdgeLineWidthDirect" "setEdgeLineWidthRule" [129] "setEdgeOpacityDirect" "setEdgeOpacityRule" [131] "setEdgeSourceArrowColorDirect"
"setEdgeSourceArrowColorRule" [133] "setEdgeSourceArrowOpacityDirect"
"setEdgeSourceArrowRule" [135] "setEdgeSourceArrowShapeDirect"
"setEdgeTargetArrowColorDirect" [137] "setEdgeTargetArrowColorRule"
"setEdgeTargetArrowOpacityDirect" [139] "setEdgeTargetArrowRule"
"setEdgeTargetArrowShapeDirect" [141] "setEdgeTooltipDirect" "setEdgeTooltipRule" [143] "setGraph" "setLayoutProperties" [145] "setNodeAttributes"
"setNodeAttributesDirect" [147] "setNodeBorderColorDirect"
"setNodeBorderColorRule" [149] "setNodeBorderOpacityDirect"
"setNodeBorderWidthDirect" [151] "setNodeBorderWidthRule" "setNodeColorDirect" [153] "setNodeColorRule"
"setNodeFillOpacityDirect" [155] "setNodeFontSizeDirect" "setNodeHeightDirect" [157] "setNodeImageDirect"
"setNodeLabelColorDirect" [159] "setNodeLabelDirect"
"setNodeLabelOpacityDirect" [161] "setNodeLabelRule" "setNodeOpacityDirect" [163] "setNodeOpacityRule" "setNodePosition" [165] "setNodeShapeDirect" "setNodeShapeRule" [167] "setNodeSizeDirect" "setNodeSizeRule" [169] "setNodeTooltipRule" "setNodeWidthDirect" [171] "setTooltipDismissDelay"
"setTooltipInitialDelay" [173] "setVisualStyle" "setWindowSize" [175] "setZoom" "sfn" [177] "showGraphicsDetails" "unhideAll"


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tmuetze/Bioconductor_RCy3_the_new_RCytoscape/issues/17#issuecomment-235747203

Node and edge visual properties test

Mark Grimes

July 7, 2016

# library(gplots) library(RCy3)

Define node default property setting function

nodeDprops.new <- function (windowobj, cf, merged=FALSE) { setDefaultBackgroundColor (windowobj, "#949494") # grey 58 if (merged) setDefaultBackgroundColor (windowobj, "#FFFFFF") # white setDefaultNodeShape(windowobj, "ELLIPSE") setDefaultNodeColor (windowobj, '#F0FFFF') # azure1 setDefaultNodeSize (windowobj, 100) # for grey non-data nodes setDefaultNodeFontSize(windowobj, 22) setDefaultNodeLabelColor(windowobj, '#000000') # black setDefaultNodeBorderWidth (windowobj, 1.8) setDefaultNodeBorderColor (windowobj, '#888888') # gray setDefaultNodeSelectionColor(windowobj, "#FF3388") molclasses <- c("unknown", "receptor tyrosine kinase", "SH2 protein", "SH2-SH3 protein", "SH3 protein", "tyrosine kinase", "SRC-family kinase", "kinase", "phosphatase", "transcription factor", "RNA binding protein")

NOTE getNodeShapes(cy) returns node shapes in random order! Define manually

 #  *12 for RCy2; 9 for RCy3
 # there are now 24 nodeType classes
nodeshapes <- c("ELLIPSE","ROUND_RECTANGLE", "VEE", "VEE", "TRIANGLE", "HEXAGON", "DIAMOND", "OCTAGON", "OCTAGON", "PARALLELOGRAM", "RECTANGLE")
if(length(sessionInfo()$otherPkgs$RCy3)==0) {
    nodeshapes <- c("ellipse", "round_rect", "vee", "triangle", "hexagon", "diamond", "octagon", "octagon", "parallelogram", "rect")}
setDefaultNodeSelectionColor (windowobj,  "#CC00FF") 
setNodeShapeRule (windowobj, node.attribute.name="nodeType", attribute.values=molclasses, node.shapes=nodeshapes, default.shape="ELLIPSE")
setNodeBorderWidthRule(windowobj, node.attribute.name="nodeType", attribute.values=c("deacetylase","acetyltransferase","demethylase","methyltransferase","membrane protein", "receptor tyrosine kinase", "G protein-coupled receptor", "SRC-family kinase", "tyrosine kinase", "kinase", "phosphatase"), line.widths=c(4,12,4,12,8,16,16,12,12,12,14), default.width=4)
if (length(cf[grep("SH2", cf$Domains), 1])>0 & !all(grep("SH2", cf$Domains) %in% which(cf$nodeType %in% molclasses))) {
setNodeShapeDirect(windowobj, cf[grep("SH2", cf$Domains) %w/o% which(cf$nodeType %in% molclasses), 1], nodeshapes[3])} 
if (length(cf[grep("RNA", cf$nodeType), 1])>0) {
setNodeShapeDirect(windowobj, cf[grep("RNA", cf$nodeType), 1], nodeshapes[11])}
if (length(cf[grep("transcription", cf$nodeType), 1])>0) {
setNodeShapeDirect(windowobj, cf[grep("transcription", cf$nodeType), 1], nodeshapes[10])}
if (length(cf[grep("acetyl", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("acetyl", cf$nodeType), 1], "#FF8C00")} # darkorange
if (length(cf[grep("methyl", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("methyl", cf$nodeType), 1], "#005CE6")} # blue
if (length(cf[grep("membrane", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("membrane", cf$nodeType), 1], "#6600CC") # purple
setNodeShapeDirect(windowobj, cf[grep("membrane", cf$nodeType), 1], nodeshapes[2])} 
if (length(cf[grep("kinase", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("kinase", cf$nodeType), 1], "#EE0000")} # red2
if (length(cf[grep("phosphatase", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("phosphatase", cf$nodeType), 1], "#FFEC8B")} # lightgoldenrod1
if (length(cf[grep("receptor", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("receptor", cf$nodeType), 1], "#BF3EFF") # darkorchid1
setNodeShapeDirect(windowobj, cf[grep("receptor", cf$nodeType), 1], nodeshapes[2])} 
if (length(cf[grep("TM", cf$nodeType), 1])>0) {
setNodeBorderColorDirect(windowobj, cf[grep("TM", cf$Domains), 1], "#6600CC") # purple
setNodeShapeDirect(windowobj, cf[grep("TM", cf$Domains), 1], nodeshapes[2])} 
# setNodeLabelRule(windowobj, node.attribute.name)
# redraw(windowobj)

} # end # remove.autophos.cy <- function(windowobj) { win.edges <- getAllEdges(windowobj) gene1 <- sapply(win.edges, function(x) unlist(strsplit(x, " "))[1]) gene2 <- sapply(win.edges, function(x) rev(unlist(strsplit(x, " ")))[1]) auto <- which(mapply(identical, gene1, gene2)) if (length(auto) > 0) { selectEdges(windowobj, win.edges[auto]) deleteSelectedEdges(windowobj) } }

end

Set up graph

molclasses <- c("unknown", "receptor tyrosine kinase",  "SH2 protein", "SH3 protein", "tyrosine kinase",  "SRC-family kinase",   "kinase", "phosphatase", "transcription factor", "RNA binding protein")
nodeTypes <- c(molclasses,"deacetylase","acetyltransferase","demethylase","methyltransferase","membrane protein", "receptor tyrosine kinase", "G protein-coupled receptor")
nulledges <- data.frame(Gene.1="unknown", Gene.2="unknown", edgeType="unknown", Weight=0)
nodetype.cf <- data.frame(Gene.Name=nodeTypes, nodeType=nodeTypes, size=130)
nodetype.cf$Domains <- c("undefined", "TM", "SH2", "SH3", "tyrosine kinase", "tyrosine kinase", "kinase", "phosphatase", "zinc finger", "RNA binding", "undefined", "undefined","undefined","undefined", "TM", "TM", "TM")
node.g <- cyPlot(nodetype.cf, nulledges)
node.w <- CytoscapeWindow("Node Key", node.g)
displayGraph(node.w)
    #
layoutNetwork(node.w, "grid")
 remove.autophos.cy(node.w)
 nodeDprops.new(node.w, nodetype.cf)

Edge key

edgeTypes <- c("pp", "controls-phosphorylation-of", "controls-expression-of", "controls-transport-of", "controls-state-change-of", "Physical interactions", "BioPlex", "in-complex-with", 'experiments', 'database', "Pathway", "Predicted", "Genetic interactions", "correlation", "negative correlation", "positive correlation", 'combined_score', "merged" , "intersect", "peptide", 'homology', "Shared protein domains")

edgecolors <- col2hex(c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2"))

myarrows <- c ('Arrow', 'Arrow', 'Arrow', 'Arrow', "Arrow", 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow')

edge_key.tbl <- data.frame(edgeTypes, colors=c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2"), myarrows, Weight=seq(-100, 110, 10))

hist(edge_key.tbl$Weight, breaks=100, col="magenta", ylim=c(0, 50)) legend(5, 50, edgeTypes, cex=0.8, col= edgecolors, lty=rep(1,24), lwd=4, bty="n");

Bigger version (after expanding plot window):

legend(5, 50, edgeTypes, cex=1.6, col= edgecolors, lty=rep(1,24), lwd=8, bty="n");

RCy3 and Cy test

Define edge default property setting function

edgeDprops <- function(windowname) { setDefaultEdgeLineWidth (windowname, 3) setDefaultEdgeColor (windowname, "#CD9B9B") # rosybrown3 setDefaultEdgeSelectionColor(windowname, "#FF69B4") # hotpink edgecolors <- col2hex(c("red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2")) edgecolorsplus <- col2hex(c("deeppink", "red", "red", "magenta", "violet", "purple", "green", "green2", "green3", "aquamarine2", "cyan", "turquoise2", "cyan2", "lightseagreen", "gold", "blue", "yellow", "slategrey", "darkslategrey", "grey", "black", "orange", "orange2", "orangered2"))

red; turquois; green; magenta; blue; violet; green; bluegreen; black; gray; turquoiseblue; orange

edgeTypes <- c("pp", "controls-phosphorylation-of", "controls-expression-of", "controls-transport-of",  "controls-state-change-of", "Physical interactions", "BioPlex", "in-complex-with",  'experiments',  'database',   "Pathway", "Predicted", "Genetic interactions", "correlation", "negative correlation", "positive correlation",  'combined_score', "merged" , "intersect", "peptide", 'homology', "Shared protein domains") 
# 22 edgeTypes  
myarrows <- c ('Arrow', 'Arrow', 'Arrow', 'Arrow', "Arrow", 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow', 'No Arrow')
setEdgeTargetArrowRule(windowname, 'edgeType', edgeTypes, myarrows, default='No Arrow')  
setEdgeTargetArrowColorRule(windowname, "edgeType",  edgeTypes, edgecolors, mode="lookup", default.color="#E6E6FA")  
setEdgeSourceArrowColorRule(windowname, "edgeType",  edgeTypes, edgecolors, mode="lookup", default.color="#E6E6FA")  
setEdgeColorRule(windowname, 'edgeType', edgeTypes, edgecolors, mode='lookup', default.color="#CD9B9B")
}

edgefile <- data.frame(Gene.1=LETTERS[1:23], Gene.2=paste(LETTERS[1:23], 1, sep=""), edgeType=c("unknown", edgeTypes), Weight=c(exp(seq(-20, 5, 2)), 1:6, 10:13)) edgefile[edgefile$edgeType=="negative correlation", "Weight"] <- -1.0 negs <- edgefile[edgefile $Weight<0,'Weight'] frnegs <- exp (negs*20)

plot (negs,frnegs)

edgefile $Alt.Weight <- edgefile $Weight
edgefile[edgefile $Weight<0,'Alt.Weight'] <- frnegs 

nodefile <- data.frame(Gene.Name=c(edgefile$Gene.1, edgefile$Gene.2), nodeType="unknown")

edgetest.g <- cyPlot(nodefile, edgefile)

Error in attr(nodeDataDefaults(graph, attr = attribute.name), "class") = attribute.type :

attempt to set an attribute on NULL edgetest.g <- cyPlot.2(nodefile, edgefile)

works

edge.w <- CytoscapeWindow("Edge Key", edgetest.g)
displayGraph(edge.w)
    #
layoutNetwork(edge.w, "hierarchical")
 edgeDprops(edge.w)
 # Now fails: says successuflly set rule but nothing changes
 setDefaultBackgroundColor (edge.w, "#949494") # grey 58
 # Note: fixed returned error message.
#
 setEdgeLabelRule (edge.w, 'edgeType')
 # RCy2 1.2 FAILS - says success but no labels are shown; 1.16 works
 # Edge colors NO LONGER appropriately assigned.
 # Now for what is still not working:
    line.widths <- 4.5*abs(as.numeric(edgefile$Weight))
    # The following not only doesn't work, despite returning "Successfully set rule."
    #   It removes all the colors of the edges: 
    setEdgeLineWidthRule(edge.w, "Weight", attribute.values=as.character(edgefile$Weight), line.widths, default.width=1.2)
    # this doesn't work either:
    setEdgeLineWidthRule(edge.w, "Weight", attribute.values=as.numeric(edgefile$Weight), line.widths, default.width=1.2)
    # And:
    edgeDprops(edge.w)
    # now has no effect!
    # Worse, if the network is destroyed and replotted, edgeDprops doesn't work!
# Try a different function (after restarting Cytoscape and reloading graph)
setEdgeLineWidthDirect(edge.w, getAllEdges(edge.w), line.widths)  
# Works!
# Note
    redraw(edge.w)
    # Undoes the edge widths
data.frame(getAllEdges(edge.w), line.widths)

Note that any function that sets global properties removes the specifically set colors and shapes in the last part of the function. This includes setting e.g., background in Cytoscape itself. Or even changing the style name. Or redraw(windowobj)

If the above is run in the same Cy session, the node colors are removed in the first window after the edge properties are set in the second window.

Function to get cy edge names from edgefile (to ensure the Weights match up)

getCyEdgeNames <- function(edgefile) { cyedges <- mapply(paste, edgefile $Gene.1, " (", edgefile $edgeType, ") ", edgefile $Gene.2, sep="") return(cyedges) }

Functions to set edge widths using setEdgeLineWidthDirect

setEdgeWidths <- function (windowobj, factor=1) { alledges <- getAllEdges(windowobj) edgeweights <- sapply(alledges, function(x) getEdgeAttribute(windowobj, x, "Weight")) line.widths <- factor*abs(as.numeric(edgeweights)) setEdgeLineWidthDirect(windowobj, alledges, line.widths)
}

setEdgeWidths.log <- function (windowobj, factor=1) { alledges <- getAllEdges(windowobj) edgeweights <- sapply(alledges, function(x) getEdgeAttribute(windowobj, x, "Weight")) line.widths <- as.numeric(log(abs(edgeweights)) + factor - min(log(abs(edgeweights)))) setEdgeLineWidthDirect(windowobj, alledges, unname(line.widths))
}

setEdgeWidths(edge.w, factor=3)
setEdgeWidths.log(edge.w, factor=2)

Note: both work directly. But visual properties are lost if style is saved under another name.

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

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] parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] RCy3_1.2.0 [and [1] RCy3_1.1.16] rgl_0.95.1441 rcytoscapejs_0.0.7 DT_0.1 htmlwidgets_0.6
[6] STRINGdb_1.12.0 preprocessCore_1.34.0 RefNet_1.8.0 shiny_0.13.2 RCurl_1.95-4.8
[11] bitops_1.0-6 AnnotationHub_2.4.2 PSICQUIC_1.10.0 httr_1.2.1 biomaRt_2.28.0
[16] Biostrings_2.40.2 XVector_0.12.1 GOstats_2.38.1 graph_1.50.0 Category_2.38.0
[21] GO.db_3.3.0 org.Hs.eg.db_3.3.0 AnnotationDbi_1.34.4 IRanges_2.6.1 S4Vectors_0.10.2
[26] Biobase_2.32.0 BiocGenerics_0.18.0 PMA_1.0.9 plyr_1.8.4 impute_1.46.0
[31] genlasso_1.3 igraph_1.0.1 Matrix_1.2-6 MASS_7.3-45 devtools_1.12.0
[36] gplots_3.0.1 Rtsne_0.11 tsne_0.1-3 vegan_2.4-0 permute_0.9-0
[41] RUnit_0.4.31 cluster_2.0.4 Hmisc_3.17-4 ggplot2_2.1.0 Formula_1.2-1
[46] survival_2.39-5 lattice_0.20-33 stringr_1.0.0 BiocInstaller_1.22.3

loaded via a namespace (and not attached): [1] nlme_3.1-128 RColorBrewer_1.1-2 tools_3.3.1
[4] R6_2.1.2 rpart_4.1-10 KernSmooth_2.23-15
[7] DBI_0.4-1 mgcv_1.8-13 colorspace_1.2-6
[10] nnet_7.3-12 withr_1.0.2 gridExtra_2.2.1
[13] curl_1.1 chron_2.3-47 caTools_1.17.1
[16] scales_0.4.0 genefilter_1.54.2 RBGL_1.48.1
[19] digest_0.6.9 foreign_0.8-66 AnnotationForge_1.14.2
[22] htmltools_0.3.5 plotrix_3.6-3 RSQLite_1.0.0
[25] gtools_3.5.0 acepack_1.3-3.3 magrittr_1.5
[28] Rcpp_0.12.6 munsell_0.4.3 proto_0.3-10
[31] sqldf_0.4-10 stringi_1.1.1 RJSONIO_1.3-0
[34] zlibbioc_1.18.0 grid_3.3.1 gdata_2.17.0
[37] splines_3.3.1 hash_2.2.6 annotate_1.50.0
[40] XML_3.98-1.4 latticeExtra_0.6-28 data.table_1.9.6
[43] png_0.1-7 httpuv_1.3.3 gtable_0.2.0
[46] gsubfn_0.6-6 mime_0.5 xtable_1.8-2
[49] memoise_1.0.0 interactiveDisplayBase_1.10.3 GSEABase_1.34.0

tmuetze commented 8 years ago

@risserlin RCy3 1.2.0 requires R 3.3. @m-grimes I will bump RCy3 1.1.16 on this github repo to 1.2.1. I am talking to the cyREST creators about the rule-based and direct function issues. I will update you as soon as this issue is fixed.