Cytoscape supports the ability to link data to networks as node and edge attributes, enabling data-driven network visualization. This tutorial describes how to load expression data from a spreadsheet, and how to link it to already loaded networks.
Download the network galFiltered.sif. This sample file is also included with your Cytoscape installation directory, under sampleData.
Start Cytoscape and load the network via File → Import → Network → File....
When the network first opens, the entire network is not visible because of the default zoom factor used. To see the whole network, select View → Fit Content.
By default, the "Prefuse Force Directed Layout" is applied to organize the layout of the nodes. The default layout may be changed under Layout → Settings.
Loading Expression Data
The data you are working with is from yeast, the genes Gal1, Gal4, and Gal80 are all yeast transcription factors. Your expression experiments all involve some perturbation of these transcription factor genes.
Gal1, Gal4, and Gal80 are also represented in your interaction network, where they are labeled according to yeast locus tags: Gal1 corresponds to YBR020W, Gal4 to YPL248C, and Gal80 to YML051W.
Using a text editor, open the file galExpData.csv to view the first few lines. This sample file is also included with your Cytoscape installation directory, under sampleData.
All columns are separated by a single comma character.
The first column contains node names, and must match the names of the nodes in your network exactly!
The second column contains common locus names. This column is optional, the data is not used by Cytoscape, but including this column makes the format consistent with the output of many analysis packages, and makes the file easier to read.
The remaining columns contain experimental data, two columns per experiment (one for expression measurement and a second for corresponding significance value), and one line per node. In this case, there are three expression results per node.
Load the galExpData.csv file under File menu, select Import → Table → File....
The default settings are usually correct, although you may need to change the "Key" column to indicate which column will be used to match with the network key column.
Now you should see expression values listed in new columns in the Node Table:
The Table Panel has the following features:
Select a node in the network and the table will update to show only the corresponding row.
You can limit the columns shown by clicking on the Show Columns button and selecting columns.