graphcytoscapegml

Incorrect rendering of GML where multiple nodes have the same labels but different id values


Cytoscape Version: 3.9.1

Operating System: Mac_OS_X_10.16

Java Version: 11.0.6

The GML code

graph [
 node [
  id 8026
  label "DB00094"
  graphics [
   fill "#a6cee3"
  ]
 ]
 node [
  id 8027
  label "A"
  graphics [
   fill "#b2df8a"
  ]
 ]
 node [
  id 8028
  label "B"
  graphics [
   fill "#b2df8a"
  ]
 ]
 node [
  id 8029
  label "A"
  graphics [
   fill "#b2df8a"
  ]
 ]
 node [
  id 8030
  label "A"
  graphics [
   fill "#b2df8a"
  ]
 ]
 edge [
  label "label"
  source 8026
  target 8027
  graphics [
   type "line"
   arrow "last"
  ]
 ]
 edge [
  label "synonyms"
  source 8026
  target 8028
  graphics [
   type "line"
   arrow "last"
  ]
 ]
 edge [
  label "synonyms"
  source 8026
  target 8029
  graphics [
   type "line"
   arrow "last"
  ]
 ]
 edge [
  label "description"
  source 8026
  target 8030
  graphics [
   type "line"
   arrow "last"
  ]
 ]
]

describes a graph with three nodes having the same label ("A") but different id values; the three nodes are the target of three different edges, whose source is the same node. Cytoscape seems to ignore that the three nodes with label "A" are different, and points the three edges to the one target node with label "A", while leaving the other two nodes isolated - see following picture: enter image description here

Other graph tools render the GML file correctly:

Am I doing something wrong with Cytoscape?


Solution

  • Nope -- it's a bug in the way we're reading the source and target attributes. We're (incorrectly) assuming that the labels are unique. I would suggest posting a bug and we'll get it fixed in the next release.