How to Adjust Metascape Network Plots?

[This is an old blog written on Saturday, September 15, 2018]

Metascape relies on Cytoscape [1] to render networks, including both enrichment networks and protein-protein interaction networks.  When a network contains too many edges, it can become a visual “hair ball” and no longer serves as an intuitive depiction.  Such visual clutter can be significantly reduced by an edge bundling algorithm [2] implemented in Cytoscape (Figure 1).

Figure 1.  An example network rendered with straight edges (left) and bundled edges (right).  High-level network edge patterns are more readily visible in the latter case.  Screenshots were taken from a YouTube video here.

To bundle edges in Cytoscape, use menu Layout > Bundle Edges > All Nodes and Edges (Figure 2).  The default parameters work well for most networks.

Figure 2. Operations lead to edge bundling in Cytoscape.

Since edge bundling is so useful, it is used by default in network visualization outputs generated by Metascape.  For example, Figure 3 shows an enrichment network generated based on four input gene lists.

Figure 3. An enrichment network, where each node is colored by its cluster ID.

Sometimes, users would like to rearrange the nodes in the exported network, in order to better illustrate its biological context.  Simply moving the nodes, for instance the red cluster in Figure 3, can result in floppy edges (Figure 4).  We sometimes see unaesthetic network plots due to this limitation, Figure 5 is an example taken from a recent publication.

Figure 4. Simply moving the nodes for the red cluster results in floppy edges circled in red.
Figure 5.  Floppy bundled edges can lead to unreadable networks.  The example is Figure 5.C taken from this PubMed entry.

To adjust Metascape networks, we first need to use the menu option Layout > Clear All Edge Bends.  This will straighten all edges, then you can move the nodes around (the result is in Figure 6, left).  Once you are happy with the new locations of the nodes, simply use Layout > Bundle Edges > All Nodes and Edges to bundle the edges again (right).

Figure 6. Unbundle edges first and them move the red nodes (left).  At the end, bundle edges to produce more visually compact edge patterns for easier interpretation (right).  This final plot is a significant improvement over Figure 4.

To summarize, to change the layout of networks generated by Metascape, we need to unbundle edges and then rebundle them.

Referene

1. http://cytoscape.org

2. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.212.7989&rep=rep1&type=pdf

This entry was posted in Comment, Visualization and tagged , , . Bookmark the permalink.