RCytoscape not recognizing initiated edge attributes.
1
0
Entering edit mode
Burak Kutlu ▴ 140
@burak-kutlu-3941
Last seen 10.2 years ago
Hello I have issues in getting RCytoscape to recognize edge attributes. What I am doing wrong? Thanks! -burak rlNt();runNt("send2RCy") entering RCytoscape::displayGraph sending 11 nodes sending 22 edges adding node attributes... [1] "label" [1] "moleculeType" adding edge attributes... [1] "weight" Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call initEdgeAttribute (graph, attribute.name, attribute.type, default.value) where attribute type is one of "char", "integer", or "numeric". example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") [1] "mechanism" Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call initEdgeAttribute (graph, attribute.name, attribute.type, default.value) where attribute type is one of "char", "integer", or "numeric". example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") [1] "effect" Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call initEdgeAttribute (graph, attribute.name, attribute.type, default.value) where attribute type is one of "char", "integer", or "numeric". example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") > > cwB at graph A graphNEL graph with directed edges Number of Nodes = 11 Number of Edges = 22 eda(cwB at graph) Error in match(x, table, nomatch = 0L) : argument "edge.attribute.name" is missing, with no default ####### # my original graph object > edgeData(e2fSubGr) $`13555|108961` $`13555|108961`$weight [1] 1 $`13555|108961`$mechanism [1] "Binding" $`13555|108961`$effect [1] "Inhibition" ... ... > 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 org.Mm.eg.db_2.6.4 [4] RSQLite_0.11.1 DBI_0.2-5 AnnotationDbi_1.16.19 [7] Biobase_2.14.0 graph_1.32.0 BiocInstaller_1.2.1 loaded via a namespace (and not attached): [1] IRanges_1.12.6 RCurl_1.91-1 tools_2.14.2 XML_3.9-4
graph RCytoscape graph RCytoscape • 1.7k views
ADD COMMENT
0
Entering edit mode
Burak Kutlu ▴ 140
@burak-kutlu-3941
Last seen 10.2 years ago
Just realized that actually the edge attributes are in fact preserved. > eda(cwB at graph,"mechanism") 13555|108961 13555|13557 "Binding" "Binding" 13555|242705 13555|50496 "Acetylation" "Transcription regulation" 13555|13555 13555|52679 "Transcription regulation" "Transcription regulation" ... ... On Mar 15, 2012, at 10:46 PM, Burak Kutlu wrote: > Hello > I have issues in getting RCytoscape to recognize edge attributes. > What I am doing wrong? > Thanks! > -burak > > rlNt();runNt("send2RCy") > entering RCytoscape::displayGraph > sending 11 nodes > sending 22 edges > adding node attributes... > [1] "label" > [1] "moleculeType" > adding edge attributes... > [1] "weight" > Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call > initEdgeAttribute (graph, attribute.name, attribute.type, default.value) > where attribute type is one of "char", "integer", or "numeric". > example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") > [1] "mechanism" > Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call > initEdgeAttribute (graph, attribute.name, attribute.type, default.value) > where attribute type is one of "char", "integer", or "numeric". > example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") > [1] "effect" > Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call > initEdgeAttribute (graph, attribute.name, attribute.type, default.value) > where attribute type is one of "char", "integer", or "numeric". > example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") >> >> cwB at graph > A graphNEL graph with directed edges > Number of Nodes = 11 > Number of Edges = 22 > > eda(cwB at graph) > Error in match(x, table, nomatch = 0L) : > argument "edge.attribute.name" is missing, with no default > > ####### > # my original graph object > >> edgeData(e2fSubGr) > $`13555|108961` > $`13555|108961`$weight > [1] 1 > > $`13555|108961`$mechanism > [1] "Binding" > > $`13555|108961`$effect > [1] "Inhibition" > > ... > ... > > >> 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 org.Mm.eg.db_2.6.4 > [4] RSQLite_0.11.1 DBI_0.2-5 AnnotationDbi_1.16.19 > [7] Biobase_2.14.0 graph_1.32.0 BiocInstaller_1.2.1 > > loaded via a namespace (and not attached): > [1] IRanges_1.12.6 RCurl_1.91-1 tools_2.14.2 XML_3.9-4
ADD COMMENT
0
Entering edit mode
Hi Burak, Glad this worked out. I often use attribute querying methods by first reminding myself what attributes have been defined: eda.names (<graph>) # "mechanism", "edgeType", "weight" then to extract an attribute of interest, just like you did eda (<graph>, "mechanism") The node attribute querying methods are just the same: noa.names (<graph>); noa (<graph>, <attribute.name>) - Paul On Mar 15, 2012, at 11:04 PM, Burak Kutlu wrote: > Just realized that actually the edge attributes are in fact preserved. > >> eda(cwB at graph,"mechanism") > 13555|108961 13555|13557 > "Binding" "Binding" > 13555|242705 13555|50496 > "Acetylation" "Transcription regulation" > 13555|13555 13555|52679 > "Transcription regulation" "Transcription regulation" > ... > ... > > > On Mar 15, 2012, at 10:46 PM, Burak Kutlu wrote: > >> Hello >> I have issues in getting RCytoscape to recognize edge attributes. >> What I am doing wrong? >> Thanks! >> -burak >> >> rlNt();runNt("send2RCy") >> entering RCytoscape::displayGraph >> sending 11 nodes >> sending 22 edges >> adding node attributes... >> [1] "label" >> [1] "moleculeType" >> adding edge attributes... >> [1] "weight" >> Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call >> initEdgeAttribute (graph, attribute.name, attribute.type, default.value) >> where attribute type is one of "char", "integer", or "numeric". >> example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") >> [1] "mechanism" >> Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call >> initEdgeAttribute (graph, attribute.name, attribute.type, default.value) >> where attribute type is one of "char", "integer", or "numeric". >> example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") >> [1] "effect" >> Error! RCytoscape::setEdgeAttributes, attributes not initialized. You must call >> initEdgeAttribute (graph, attribute.name, attribute.type, default.value) >> where attribute type is one of "char", "integer", or "numeric". >> example: g <- initEdgeAttribute (g, "edgeType", "char", "protein-protein interaction") >>> >>> cwB at graph >> A graphNEL graph with directed edges >> Number of Nodes = 11 >> Number of Edges = 22 >> >> eda(cwB at graph) >> Error in match(x, table, nomatch = 0L) : >> argument "edge.attribute.name" is missing, with no default >> >> ####### >> # my original graph object >> >>> edgeData(e2fSubGr) >> $`13555|108961` >> $`13555|108961`$weight >> [1] 1 >> >> $`13555|108961`$mechanism >> [1] "Binding" >> >> $`13555|108961`$effect >> [1] "Inhibition" >> >> ... >> ... >> >> >>> 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 org.Mm.eg.db_2.6.4 >> [4] RSQLite_0.11.1 DBI_0.2-5 AnnotationDbi_1.16.19 >> [7] Biobase_2.14.0 graph_1.32.0 BiocInstaller_1.2.1 >> >> loaded via a namespace (and not attached): >> [1] IRanges_1.12.6 RCurl_1.91-1 tools_2.14.2 XML_3.9-4 >
ADD REPLY

Login before adding your answer.

Traffic: 645 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6