cytoscapegraphml

How do I show multiple text elements in a vertex?


Suppose I have two nodes in a graphml file. The file has contents like this

   <node id="858">
        <data key="SUID">858</data>
        <data key="shared name">n2</data>
        <data key="name">n2</data>
        <data key="selected">false</data>
        <data key="Label">Node 2</data>
        <data key="Description">This is the second node</data>
    </node>
    <node id="849">
        <data key="SUID">849</data>
        <data key="shared name">n1</data>
        <data key="name">n1</data>
        <data key="selected">false</data>
        <data key="Label">Node 1</data>
        <data key="Description">This is the first node</data>
    </node>
    <edge source="849" target="858">
        <data key="SUID">861</data>
        <data key="shared name">n1 (-) n2</data>
        <data key="shared interaction">-</data>
        <data key="name">n1 (-) n2</data>
        <data key="selected">false</data>
        <data key="interaction">-</data>
    </edge>

The result in cytoscape looks like this

two nodes in cytoscape

Wha I want to do is show more than the node labels n1 or n2. I want to show the label but also some attribute text in the vertex. Say attribute 1: A. How do I place that attribute information inside the graphml and also get it to display in cytoscape?


Solution

  • Short answer: you can't. Only one attribute can be used for the node label. Longer answer: you may want to look at the enhancedGraphics app which would allow you to map other columns into text labels.