user697911
user697911

Reputation: 10571

How to create node/edge attributes in Cytoscape?

I am manually creating a simple network in Cytoscape and I can create label and edge with names. But don't know how to add attributes to node or edge. For example, for a Student node, I want to add 'ID', 'age' as attributes of Student. I learnt that I need to use 'function builder to create a composite string and then use that column as your passthrough'. But exactly how to create a "composite string"? I can't find any example or tutorial on this. Thank you for your instruction.

enter image description here

Upvotes: 1

Views: 2286

Answers (1)

Scooter Morris
Scooter Morris

Reputation: 1400

To be clear, you don't want these as "attributes", you want to create a new label that includes all of these values, right?
So to do this, you would

  1. go to the table panel and create a new String column
  2. click in one cell of the column and then click the function builder [f(x)] icon in the row of icons at the top of the table panel.
  3. choose the CONCATENATE function
  4. for each column you want to concatenate:
    1. select the name of the column and "Add" it
    2. type a separator into the text field (e.g. ": ") and "Add" it
  5. finally, make sure to click on entire column and then say OK.

You now have a new column with contains a concatenation of the columns you wanted. Just change the Label passthrough to point to that column.

Upvotes: 2

Related Questions