Help:DataVisualizationInCytoscape

From WikiPathways

(Difference between revisions)
Jump to: navigation, search
(Pathway import and mapping)
Current revision (22:03, 9 November 2018) (view source)
(commented out content)
 
(21 intermediate revisions not shown.)
Line 1: Line 1:
-
'''UNDER CONSTRUCTION'''
+
'''This tutorial has been replaced by the [https://cytoscape.org/cytoscape-tutorials/protocols/wikipathways-app/#/title WikiPathways App Tutorial].'''
-
 
+
<!--
-
This tutorial describes how to visualize experimental data on WikiPathways in Cytoscape. After importing pathways from WikiPathways, they are mapped to the same identifier system as used by the data, using BridgeDb. Data is imported, and a visual style is created to visualize the data on pathways.  
+
-
 
+
= Installation =
= Installation =
-
 
=== Cytoscape ===
=== Cytoscape ===
* Download Cytoscape here: http://www.cytoscape.org/.
* Download Cytoscape here: http://www.cytoscape.org/.
Line 12: Line 9:
* In Cytoscape, open the '''App Manager''' under '''Apps > App Manager'''.
* In Cytoscape, open the '''App Manager''' under '''Apps > App Manager'''.
-
[[image:AppManager.png|left|]]<br clear="all" />
+
[[image:AppManager.png|650px|left|]]<br clear="all" />
* In the search field, type ''WikiPathways'' to search for the WikiPathways app. Select the WikiPathways app from the results and click '''Install'''.
* In the search field, type ''WikiPathways'' to search for the WikiPathways app. Select the WikiPathways app from the results and click '''Install'''.
-
* Next, find and install the BridgeDb app in the same way. When the installation is complete, click '''Close''' to exit the '''App Manager'''.
+
* When the installation is complete, click '''Close''' to exit the '''App Manager'''.
Alternatively, Cytoscape apps can be installed directly from the Cytoscape App Store. If Cytoscape is open on your computer, you can click '''Install''' on the relevant app page, and the app will install.  
Alternatively, Cytoscape apps can be installed directly from the Cytoscape App Store. If Cytoscape is open on your computer, you can click '''Install''' on the relevant app page, and the app will install.  
[http://apps.cytoscape.org/apps/wikipathways WikiPathways app]
[http://apps.cytoscape.org/apps/wikipathways WikiPathways app]
-
 
-
[http://apps.cytoscape.org/apps/bridgedb BridgeDb app]
 
= Pathway import and mapping =
= Pathway import and mapping =
Line 29: Line 24:
Based on over-representation analysis, two pathways have been identified as significant for this dataset. To start, we will open these pathways.
Based on over-representation analysis, two pathways have been identified as significant for this dataset. To start, we will open these pathways.
-
* Go to '''File > Import > Network > Public Databases...'''. In the '''Data Source''' drop-down, select WikiPathways.
+
* Locate the search field at the top of the Network Panel and choose WikiPathways from the pulldown options.
 +
* Type in ''Electron Transport'' and hit '''Enter''' or click the icon to search.
 +
* In the results dialog, check the  box for '''Only''' and select '''Mus musculus''' in the species drop-down.
 +
* In the pathway results, select the Electron Transport Chain and either double-click on the entry to open, or click on the '''Import as Pathway''' button at the bottom right. Once opened, the pathway should look like this:
-
[[image:ImportNetworkDatabase.png|left|]]<br clear="all" />
+
[[image:WPSearchResults.png|900px|left|]]<br clear="all" />
-
* Check the box for '''Only''' and select '''Mus musculus''' in the species drop-down.
+
Once the pathway opens in Cytoscape, it should look like this:
-
* In the search field, type in ''Electron Transport Chain''. Click '''Enter''' to search.
+
-
* In the pathway results, select the Electron Transport Chain and either double-click on the entry to open, or click ont he '''Import as Pathway''' button at the bottom right. Once opened, the pathway should look like this:
+
-
[[image:WPSearchResults.png|left|]]<br clear="all" />
 
-
Once the pathway opens in Cytoscape, it should look like this:
+
[[image:ElectronTransport.png|1100px|left|]]<br clear="all" />
-
[[image:ElectronTransport.png|left|]]<br clear="all" />
 
-
* Repeat the steps above to import the '''Proteasome degradation''' pathway.
+
* Repeat the steps above to search for ''Proteasome'' and import the '''Proteasome degradation''' pathway.
* You should now have both pathways open in Cytoscape:
* You should now have both pathways open in Cytoscape:
-
[[image:PathwaysInCytoscape.png|left|]]<br clear="all" />
+
[[image:PathwaysInCytoscape.png|1100px|left|]]<br clear="all" />
-
=== Map pathways with BridgeDb ===
+
=== Identifier Mapping ===
-
Since the experimental data is annotated with Ensembl identifiers and the pathways have a mix of identifiers, the pathways need to be mapped to Ensembl before the data can be visualized. The BridgeDb app does exactly this, given a mapping file. Before performing the mapping, we need to import the appropriate mapping file to BridegDb.
+
In the Table Panel you can see that the gene identifiers in these pathways from Ensembl. It turns out that the experimental data we will be using in this example is also annotated with Ensembl identifiers. But this is not always the case! Fortunately, it is very easy to get a new column of identifiers in any of the major types. In this example, we will go ahead and add a column of Entrez Gene IDs to demonstrate this functionality.
-
* Open the BridgeDb app under '''Apps > BridegDb > Manage ID Mapping Resources'''.
+
* In the Table Panel, right click on the column header '''XrefId''' which contains the identifiers for the data nodes.
 +
* Choose '''map column''' to bring up the ID Mapping dialog
 +
* Select the following:
 +
** Species: '''Mouse'''
 +
** Map from: '''Ensembl'''
 +
** To: '''Entrez'''
 +
* Then click '''OK'''
 +
* Now you have a new column of Entrez Gene IDs (all the way to the right)
-
[[Image:BridegDb_Resources.png|left|]]<br clear="all" />
+
'''Note that the WikiPathways app automatically adds Ensembl identifiers to pathways upon import. This means that manually annotating the pathway is only necessary if the data is annotated with a system other than Ensembl.'''
-
 
+
-
BridgeDb works with mapping information from various sources. For example, you can either download a database [http://www.pathvisio.org/downloads/download-bridgedbs/ here], and after extracting it select it under '''Databases''' in the '''ID Mapping Resources Configuration''' interface. You can also supply a local or remote mapping file.
+
-
For this tutorial, we will use Web Services for the mappings.
+
-
 
+
-
* Click on the '''Web Services''' entry in the list of ID mapping sources.
+
-
* In the '''Webservice-based ID Mapping Resources Configuration''' interface, select '''BridegDb web service''' in the drop-down.
+
-
 
+
-
[[Image:BridgeDb_webservice.png|left|]]<br clear="all" />
+
-
 
+
-
* In the '''Base URL of BridgeDb web service''' drop-down, select the entry for mouse. Click '''OK''' to continue.
+
-
 
+
-
You will see a listing of supported ID systems. We are now ready to perform the mapping.
+
-
 
+
-
[[Image:BridgeDb_Config.png|left|]]<br clear="all" />
+
-
 
+
-
* Close the '''ID Mapping Source Configuration''' interface.
+
-
 
+
-
We are now ready to map the identifiers from the pathways to Ensembl. BridgeDb works best when you know the type of identifier to map from (Source).
+
-
* To find out which identifier type(s) is used in your pathway, first select all nodes on the pathway by clicking and dragging to select the entire pathway. Selected nodes will turn yellow.
+
-
* Immediately below the network view in Cytoscape is the '''Table Panel'''. Expand the table either by clicking dragging on the table border, or by click on the '''Float Window''' icon on the right end of the Table Panel border.
+
-
* The identifier types for data nodes are listed in the '''XrefDatasource''' column. The pathways in this tutorial are annotated with a mix of Entrez Gene, MGI and Ensembl identifiers.
+
-
 
+
-
[[Image:DataNodeTable.png|left|]]<br clear="all" />
+
-
 
+
-
* With one of the networks selected, go to '''Apps > BridegDb > Map Identifiers'''.
+
-
* In the BridgeDb interface, open the drop-down under '''Source ID Type(s)''', and select Ensembl, Entrez Gene and MGI in the list of identifier types.
+
-
* In the '''Source Column in Node Table''', select '''XrefId''', which is the column that contains the identifier for WikiPathways data nodes.
+
-
* In the '''Target ID Type''', select Ensembl. The '''Target Column in Node Table''' will default to '''Ensembl''', which will be a new column in the ''''Table Panel''' for the pathway.
+
-
* Finally, in the '''All Target ID(s) or First Only?''' drop-down, select '''Keep the first target ID only'''.
+
-
 
+
-
To summarize, we are mapping Entrez Gene, MGI and Ensembl identifiers to Ensembl identifiers. It may seem redundant to map Ensembl - > Ensembl, but BridgeDb works by placing the new identifiers (targets) in a new column, which we will use later to link to our data. We can not designate more than one column to link to, so existing Ensembl identifiers in the pathway will not be linked unless we effectively transfer them to this new column by performing the same-to-same mapping.  
+
-
The interface should now look like this:
+
-
 
+
-
[[Image:BridgeDbMapping.png|left|]]<br clear="all" />
+
-
 
+
-
* Click '''OK''' to run the mapping. When the mapping is complete, you will get a message stating how many identifiers were converted, and a question about running additional mapping. Click '''No''' to close BridgeDb.
+
-
 
+
-
* Repeat the mapping process with the Urea cycle pathway.
+
= Data import =
= Data import =
-
 
=== Download data ===
=== Download data ===
-
For this tutorial, we will use an example dataset describing intestinal changes in response to fasting. The data is in the form of a text file.  
+
For this tutorial, we will use an example dataset describing intestinal changes in response to fasting in mice. The data gene expression array data, and is in the form of a text file.  
The experimental data for this tutorial can be found here: [http://opentutorials.cgl.ucsf.edu/images/f/f7/Starvation_dataset_trans.txt Starvation_dataset_trans.txt].
The experimental data for this tutorial can be found here: [http://opentutorials.cgl.ucsf.edu/images/f/f7/Starvation_dataset_trans.txt Starvation_dataset_trans.txt].
 +
 +
Source: [http://bmcgenomics.biomedcentral.com/articles/10.1186/1471-2164-8-361 Sokolovic et al. BMC Genomics. 2007 Oct 9;8:361]
=== Import data to Cytoscape ===
=== Import data to Cytoscape ===
-
* To import the experimental data, select '''File > Import > Table > File...'''. Select the ''starvation_dataset_trans.txt'' file and click '''Open'''.
+
* To import the experimental data, select '''File > Import > Table from File...'''. Select the ''starvation_dataset_trans.txt'' file and click '''Open'''.
* Under '''Where to Import Table Data''', choose '''To selected networks only'''.
* Under '''Where to Import Table Data''', choose '''To selected networks only'''.
* To select both pathways, click the '''Select All''' button.
* To select both pathways, click the '''Select All''' button.
-
* Under '''Key Column for Networks''', select '''Ensembl'''. This is the column created during BridgeDb mapping.
+
* Under '''Key Column for Networks''', select '''XrefId''' (the column with Ensembl IDs).
* In the '''Preview''' section, click the expand symbol at the top of the '''ensid''' column. This will open an interface where you can define the details of the column, such as data type etc.  
* In the '''Preview''' section, click the expand symbol at the top of the '''ensid''' column. This will open an interface where you can define the details of the column, such as data type etc.  
* For the purposes of this tutorial, click the key symbol. This defines the '''ensid''' column as being the key column, which will be used to link the data to the pathways.
* For the purposes of this tutorial, click the key symbol. This defines the '''ensid''' column as being the key column, which will be used to link the data to the pathways.
-
[[image:DataImport.png|left|]]<br clear="all" />
+
[[image:DataImport.png|600px|left|]]<br clear="all" />
* Click '''OK''' to import the data.
* Click '''OK''' to import the data.
Line 123: Line 87:
[[image:ContinousDefault.png|left|]]<br clear="all" />
[[image:ContinousDefault.png|left|]]<br clear="all" />
-
* Double-click on the default black and white continuum to customize it.
+
* Double-click on the default color continuum to customize it.
-
* First, set the min/max values by clicking the '''Set Min and Max...''' button. Set Min to 0 and Max to 1.
+
* Set the min/max values by clicking the '''Set Min and Max...''' button. Set Min to 0 and Max to 0.05.
-
* Next, double-click the large triangle at the left and select a green color. Repeat with the smaller triangle handle right next to it.
+
* Set the colors for both min and max by double-clicking on the small triangles and choosing a shade of green.
-
* Move the smaller left-most handle to the right, to the 0.05 position. Once the handle is selected, its position can be set in the '''Handle Position''' field.
+
* For the large right-most triangle, set the color to a pale gray color.  
* For the large right-most triangle, set the color to a pale gray color.  
-
* Next, select the small right-most triangle and click '''Delete''''.
 
-
 
-
[[image:ContinousMapper.png‎|left|]]<br clear="all" />
 
You now have a color scheme where nodes with an ANOVA value of 0.05 or below is colored green, and all other measured nodes are colored gray. Nodes that are not found will simply be white.
You now have a color scheme where nodes with an ANOVA value of 0.05 or below is colored green, and all other measured nodes are colored gray. Nodes that are not found will simply be white.
Line 137: Line 97:
=== Export visualizations ===
=== Export visualizations ===
-
Any pathway or network visualization in Cytoscape can be exported to graphical formats, which can easily be included in publications and websites.  
+
Any pathway or network visualization in Cytoscape can be exported into a number of graphical file formats, which can easily be included in publications and websites. File formats supported for export are PNG, JPEG, PDF, PostScript and SVG.  
* To export the pathway visualization, select '''File > Export > Network View as Graphics...'''
* To export the pathway visualization, select '''File > Export > Network View as Graphics...'''
Line 143: Line 103:
[[image:ExportPathway.png|left|]]<br clear="all" />
[[image:ExportPathway.png|left|]]<br clear="all" />
 +
 +
-->

Current revision

This tutorial has been replaced by the WikiPathways App Tutorial.

Personal tools