03 Visualize amica networks in Cytoscape - tbaccata/amica GitHub Wiki
Integrate amica output into Cytoscape
Cytoscape is an open source software platform for visualizing complex networks and integrating these with any type of attribute data. The software has many options for analyzing and visualizing networks and is very well documented (you can find very useful tutorials here: https://github.com/cytoscape/cytoscape-tutorials/wiki).
We can import amica's PPI networks into Cytoscape for better visualizations. Just download the amica_specificity_network.gml file in the Network section in the Differential abundance tab.
Tutorial
Download Cytoscape from https://cytoscape.org/download.html if you don't have it already, follow the installation guideline.
Open Cytoscape and import the file amica_specificity_network.gml:
File > Import > Network from File
To produce a layout select any of the layouts in the Layout tab in the main menu:
Layout > Apply Preferred Layout
We can integrate all the information in the gml file by clicking on the Style tab in the left side bar, where you find the adjustable properties. For each property, styles are defined in columns Def. (default), Map. (mapping), and Byp. (bypass) (there is another useful tutorial here: https://cytoscape.org/cytoscape-tutorials/protocols/advanced-style-properties/#/2).
The first thing we need to do is to show a label for each node. This can be done by clicking on the Map. button of the "Label" property. Select for the Column "label" and for Mapping Type "Passthrough Mapping".
For networks from single group comparisons
The same method can be applied to create a mapping for the logFC column for which we can create a "Continous Mapping" to create a color bar. Node Size and Shape can also be changed, for that just click on the left "Default" button of these properties. If you want to create circular shapes you have to tick the "lock node width and height" button at the bottom of the Node Style minipage.
When applying all these mappings your Style tab should look similar to this one:
To create edge styles click on the Edge tab at the bottom of the Style page. Similarly to the Node Styles you can change edge properties. One potential useful feature would be to map the PPI MI-Score to the edge width with a continous or discrete mapping.
After applying the column mappings for the group comparison PGRMC1__vs__MIAPACA
from the example data (enriched proteins, log2FC >= 1.5 and adj.p-value <= 0.05) we end up with a network that looks like this (the edge width legend was added manually in inkscape):
For networks from multiple group comparisons
This example was produced with the example dataset, using the ”Analyze multiple comparisons”
feature for the comparisons PGRMC1__vs__MIAPACA
and PGRMC1_AG205__vs__MIAPACA_AG205
(we
consider enriched proteins, with log2FC ≥ 1.5 and adj.p-value ≤ 0.05 in at least one of the group
comparisons)
The attributes in the gml output from a multi-group comparison are different in comparison with the single group comparison.
In this network we have two types of edges:
- Edges connecting the group comparison with significant proteins
- Edges from IntAct connecting proteins with proteins
To distinguish between these types we could set a discrete mapping for the edge color (Stroke Color (unselected)) property in the Edge Style page (Fig. 6.11b). We can show the different interaction scores of the PPIs by creating a continuous or discrete mapping for the value column:
If we want to integrate quantitative information we have to include download amica's data table in the upper part of the differential abundance tab.
File > Import > Table from File
Select the correct parameters for the target table (choose the column with the name key
as key
) and network collection and fold changes and p-values should now be available in your Node table:
From here on we can select mappings for the node style. Networks from multiple group comparisons contain two type of nodes in the group attribute of the gml file:
- Bait: a group comparison (in this case
PGRMC1__vs__MIAPACA
andPGRMC1_AG205__vs__MIAPACA_AG205
). - Prey: significant proteins of a group comparison.
We can select a discrete mapping of the group column for the fill color, a passthrough mapping of the name column for the label, a discrete mapping of the group column for the shape and a continous mapping of the logFC PGRMC1 vs MIAPACA column for the size:
After applying all these mappings we can export the network visualization, which should look similar like the one shown here (the legend was created in inkscape):
From there, you can follow these useful tutorials to visualize the data the way you want:
https://cytoscape.org/cytoscape-tutorials/protocols/basic-data-visualization
https://cytoscape.org/cytoscape-tutorials/protocols/AP-MS-network-analysis