Using Cytoscape to visualize graphs from Tetrad

25 Jun 2016

Tetrad contains an wonderful suite of causal search algorithms, but it is not so great for visualization. Cytoscape is free and a great tool for visualizing networks. If you have a medium to large graph (say, more than 50 nodes), you may find it easier to interpret the structure in Cytoscape. Here’s how:

  1. Save your Tetrad graph as a text file
  2. The text file will look something like:
    Graph nodes:
    X1 X2 X3 X4 ...
    
    Graph edges:
    1. X1 --- X2
    2. X3 --> X4
    ...
    Delete everything above the first edge, so your file begins with a line like "1. X1 --- X2".
  3. Open Cytoscape and click on the "Import network from file" button.
  4. After choosing your file, click on "Advanced options". Pick the following options:
    1. Set the delimiter to SPACE
    2. Uncheck "Variable names in first row"
    3. Choose the second column to be the Source
    4. Choose the third column to be the Interaction Type
    5. Choose the fourth column to be the Target
  5. Click ok
  6. Set the edge theme to reflect the edge endpoints in Tetrad.