Differences between revisions 5 and 6
Revision 5 as of 2007-01-10 23:49:16
Size: 12400
Editor: nebbiolo
Comment:
Revision 6 as of 2007-06-27 21:29:07
Size: 11080
Editor: 142
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 1. Importing pre-existing unformatted text or excel files.
 1. Creating an empty network and adding nodes and edges using the Editor.
 1. Importing pre-existing, unformatted text or Excel files.
 1. Creating an empty network and manually adding nodes and edges.
Line 7: Line 7:
Network files can be specified in any of the formats described in the [Cytoscape_User_Manual/Network_Formats Network Formats] chapter.
Networks are imported into Cytoscape through the '''''Import Network''''' dialog, which can be activated through Menu __File → Import → Network__. The network file can either be located on the local computer, or it can also be located in a remote computer and referenced with a URL.
Network files can be specified in any of the formats described in the [:Cytoscape_User_Manual/Network_Formats:Supported Network Formats] chapter.
Networks are imported into Cytoscape through the "Import Network" window, which can be accessed by going to File → Import → Network (multiple file types). The network file can either be located directly on the local computer, or found on a remote computer (in which case it will be referenced with a URL).
Line 12: Line 12:
By default, Cytoscape load network from the local computer. When the import network dialog is initialized, the data source type “Local” will be selected. To import a network, first click on the “Select” button, which will pop-up a file chooser and let user browse the local disk to choose a network file. User is allowed only to choose Cytoscape recognized network types. After the file is selected, a click on the Import button will import the network. For example, The following steps will load a sample molecular interaction network in SIF format. Use the menu __File → Import → Network__. select the file “galFiltered.sif” in “sampleData” directory. After a few seconds, a small network of 331 nodes should appear in the main window. The procedure to load network in other format is very similar. To load the same interaction network as a GML, use the menu: __File → Import → Network__ again. In the resulting file dialog box, select the file “sampleData/galFiltered.gml”. Node and edge attribute files as well as expression data and extra annotation can be loaded as well. By default, Cytoscape loads networks from the local computer.
Line 14: Line 14:
Network files may also be loaded directly from the command line using the –N option (works for SIF, GML, and XGMML). The Import Networks dialog shows a default setting of "Data Source Type: Local," meaning that network files from the local computer will be available for importing. Choose the correct file by clicking on the Select button (only file types that Cytoscape recognizes will be shown), and then load the network by clicking on the Import button. Some sample network files of different types have been included in the sampleData folder in Cytoscape.

Network files in SIF, GML, and XGMML formats may also be loaded directly from the command line using the –N option.
Line 18: Line 20:
=== Load Network from a Remote Computer (URL import) === === Load Networks from a Remote Computer (URL import) ===
Line 20: Line 22:
Cytoscape also supports network import through URL. In this case, user should choose “Remote” as the data Source Type on the Import Network dialog. Next the user can either type (or paste) a URL into choice box or select one of the pre-existing bookmarked networks. Cytoscape supports URL bookmarks. A click on the right-most arrow of the comboBox will show a list of available network bookmarks. Cytoscape contains a pre-defined a list of bookmarks, which point to sample network files located on the Cytoscapes web server. Users may add new bookmarks through the Bookmark manager described in the [Cytoscape_User_Manual/Preferences Preferences] chapter.

After the user specifies a URL a click on the import button will load the network from the remote computer.
The Import Networks dialog is also capable of importing network files using a URL. To do this, set the Data Source Type to Remote and insert the appropriate URL, either manually or using URL bookmarks. Bookmarked URLs can be accessed by clicking on the arrow to the right of the text field (see the Bookmark Manager in [:Cytoscape_User_Manual/Preferences:Preferences] for more details on bookmarks). Once a URL has been specified, click on the Import button to load the network.
Line 26: Line 26:
Network import from URL has an important caveat.  Because Cytoscape determines file type primarily (not exclusively) by file extension, it can have trouble importing networks with URLs that don't end in a  human readable file name.  If Cytoscape does not recognize a meaningful file name with extension in the URL, it will attempt to guess the type of file based on MIME type.  If the MIME type is not recognizable to any of our import handlers, then the import will fail. Importing networks from URL addresses has an important caveat. Because Cytoscape determines file type primarily (not exclusively) by file extension, it can have trouble importing networks with URLs that don't end in a human readable file name. If Cytoscape does not recognize a meaningful file name and extension in the URL, it will attempt to guess the type of file based on MIME type. If the MIME type is not recognizable to any of our import handlers, then the import will fail.
Line 28: Line 28:
Another issue for network import is the presence of firewalls, which can affect what files are accessible to a computer.  To work around this problem, Cytoscape supports the use  of proxy servers. To configure the proxy server, click __Edit Preference → Proxy Server…__. This is further described in the [Cytoscape_User_Manual/Preferences Preferences] chapter. Another issue for network import is the presence of firewalls, which can affect which files are accessible to a computer. To work around this problem, Cytoscape supports the use of proxy servers. To configure the proxy server, go to Edit → Preferences→ Proxy Server... . This is further described in the [:Cytoscape_User_Manual/Preferences:Preferences] chapter.
Line 33: Line 33:
Introduced in version 2.4, Cytoscape now supports the import of networks from delimited text files and excel files from the menu __Edit Import Network from Table (Text/MS Excel)...__. An interactive GUI allows users to specify parsing options for specified files.  The screen provides a preview that shows how the file will be parsed given the current configuration.  As the configuration changes, the preview updates automatically.  In addition to specifying how the file will be parsed, the user must also choose the columns that represent the Source nodes, the Target nodes, and an optional edge interaction type. Introduced in version 2.4, Cytoscape now supports the import of networks from delimited text files and Excel workbooks using Edit → Import → Network from Table (Text/MS Excel)... . An interactive GUI allows users to specify parsing options for specified files. The screen provides a preview that shows how the file will be parsed given the current configuration. As the configuration changes, the preview updates automatically. In addition to specifying how the file will be parsed, the user must also choose the columns that represent the Source nodes, the Target nodes, and an optional edge interaction type.
Line 38: Line 38:
Line 41: Line 40:
''Network Table Import'' function supports delimited text files and Microsoft Excel Workbooks (1).  The following is a sample table file: The "Import Network from Table" function supports delimited text files and single-sheet Microsoft Excel Workbooks. The following is a sample table file:
Line 44: Line 43:
source target interaction boolean attribute string attribute floating point attribute source  target interaction  boolean attribute string attribute floating point attribute
Line 52: Line 51:
The network table files should contain at least two columns: '''''source''''' nodes and '''''target''''' nodes.  '''''Interaction''''' is optional in this format.  Therefore, minimal network table looks like the following: The network table files should contain at least two columns: source nodes and target nodes. The interaction type is optional in this format. Therefore, a minimal network table looks like the following:
Line 62: Line 61:
One row in a network table file represents an edge and its edge attributes.  This means that a network file is considered a combination of network data and edge attributes.  A table may contain columns that aren't meant to be edge attributes.  In this case, you can choose not to import those columns by clicking on the column header in the preview window.  This function is useful when importing a data table like the following (2): One row in a network table file represents an edge and its edge attributes. This means that a network file is considered a combination of network data and edge attributes. A table may contain columns that aren't meant to be edge attributes. In this case, you can choose not to import those columns by clicking on the column header in the preview window. This function is useful when importing a data table like the following (1):
Line 73: Line 72:
This data file is a tab-delimited text and contains network data (interactions), edge attributes, and node attributes.  To import network and edge attributes from this table, you need to choose ''Unique ID A'' as source, ''Unique ID B'' as target, and ''Interactor types'' as interaction type.  Then you need to turn off columns used for node attributes (''Alternative ID A'', ''species B'', etc.).  Other columns can be imported as edge attributes. This data file is a tab-delimited text and contains network data (interactions), edge attributes, and node attributes. To import network and edge attributes from this table, you need to choose Unique ID A as source, Unique ID B as target, and Interactor types as interaction type. Then you need to turn off columns used for node attributes (Alternative ID A, species B, etc.). Other columns can be imported as edge attributes.
Line 75: Line 74:
The network import dialog cannot import node attributes - only edge attributes.  To import node attributes from this table, please see the [:Cytoscape_User_Manual/Attributes: Attributes] section of this manual. The network import function cannot import node attributes - only edge attributes. To import node attributes from this table, please see the [:Cytoscape_User_Manual/Attributes:Attributes] section of this manual.
Line 77: Line 76:
Note (1): in version 2.4, Cytoscape supports Excel Workbooks with single sheet (table) only. __Multiple sheet Workbooks are not supported.__

Note (2):
from ''A merged human interactome'' datasets by Andrew Garrow, Yeyejide Adeleye and Guy Warner (Unilever, Safety and Environmental Assurance Center, 12 October 2006).  Actual data files are available at:

http://www.cytoscape.org/cgi-bin/moin.cgi/Data_Sets/
Note (1): This data is taken from the ''A merged human interactome'' datasets by Andrew Garrow, Yeyejide Adeleye and Guy Warner (Unilever, Safety and Environmental Assurance Center, 12 October 2006). Actual data files are available at http://www.cytoscape.org/cgi-bin/moin.cgi/Data_Sets/
Line 87: Line 82:
 1. Select __File → Import → Network from Table (Text/MS Excel)...__
 1. Select a table file by clicking on '''''Select File''''' button.
 1. Set Interaction Definition. You need to specify '''''Source Interaction''''', '''''Target Interaction''''', and '''''Interaction Type'''''. For '''''Interaction Type''''', if you select ''Default Interaction'' the default interaction value will be used for all edges. The default value is ''pp''. This value can be modified in ''Advanced Options''.
 1. (Optional) Select edge attribute columns. Network table files can have edge attribute columns in addition to network data.
    * Enable/Disable Attribute Column - By '''''left'''''-clicking on a '''''column header''''' in the preview table, you can enable/disable edge attributes. If the header is checked and entries are blue, the column will be imported as an edge attribute. For example, the table below shows that column 1 through 3 will be used as network data, and column 5 and 6 will be imported as edge attributes.
 1. Select File → Import → Network from Table (Text/MS Excel)...
 1. Select a table file by clicking on the Select File button.
 1. Define the interaction parameters by specifying which columns of data contain the Source Interaction, Target Interaction, and Interaction Type. Setting the Interaction Type as Default Interaction will result in all interactions being given the value pp; this value can be modified in Advanced Options (below).
 1. (Optional) Define edge attribute columns, if applicable. Network table files can have edge attribute columns in addition to network data.
   * Enable/Disable Attribute Column - By ''left''-clicking on a column header in the preview table, you can enable/disable edge attributes. If the header is checked and entries are blue, the column will be imported as an edge attribute. For example, the table below shows that columns 1 through 3 will be used as network data, column 4 will not be imported, and columns 5 and 6 will be imported as edge attributes.
Line 93: Line 88:
    * Change Attribute Name and Data Types:
   If you '''''right'''''-click on a '''''column header''''' in the preview table, the dialog above will be displayed. You can modify attribute name and data type from this dialog. For more detail, see '''''Modify Attribute Name/Type'''''.
 1. Click '''''Import''''' button.
   * Change Attribute Name and Data Types - If you ''right''-click on a column header in the preview table, you can modify the attribute name and data type. For more detail, see "Modify Attribute Name/Type" below.
 1. Click the Import button.
Line 97: Line 91:
'''Advanced Options''' === Advanced Options ===
Line 101: Line 95:
You can select several options by checking '''''Show Text File Import Options'''''. You can select several options by checking the Show Text File Import Options checkbox.
Line 103: Line 97:
 * Delimiter: You can select multiple delimiters for text tables. By default, '''''Tab''''' and '''''Space''''' are selected as delimiters.
 * Preview Options: When you select a network table file, first 100 entries will be displayed in the Preview panel. To display more entries, change the value for this option. If you want to show all entries in the file, select '''''Show all entries in the file'''''. You need to click '''''Reload button''''' to update the Preview panel.
 * Delimiter: You can select multiple delimiters for text tables. By default, Tab and Space are selected as delimiters.
 * Preview Options: When you select a network table file, the first 100 entries will be displayed in the Preview panel. To display more entries, change the value for this option. If you want to show all entries in the file, select "Show all entries in the file". You will need to click the Reload button to update the Preview panel.
Line 106: Line 100:
    * '''''Transfer first line as attribute names''''': By choosing this option, first entry in the file will be used as edge attribute names.
    * '''''Start Import Row''''': Change the start row for import.  For example, if you want to skip first 3 rows in the file, set ''4'' for this option.
    * '''''Comment Line''''': Rows start with this character will be ignored. This option will be used to skip comment lines in text files.
 * Network Import Options: If ''Interaction Type'' is set to '''''Default Interaction''''', the value here will be used as interaction for all edges.
    * Transfer first line as attribute names: Selecting this option will cause all edge attribute columns to be named according to the first data entry in that column.
    * Start Import Row: Set which row of the table to begin importing data from. For example, if you want to skip the first 3 rows in the file, set 4 for this option.
    * Comment Line: Rows starting with this character will not be imported. This option can be used to skip comment lines in text files.
 * Network Import Options: If the Interaction Type is set to Default Interaction, the value here will be used as the interaction type for all edges.
Line 111: Line 105:
'''Modify Attribute Name/Type''' === Modify Attribute Name/Type ===
Line 115: Line 109:
Attribute names and data types can be modified in this dialog.
 * Modify Attribute Name - just type new attribute name in the text field and click OK.
 * Modify Attribute Data Type - ''Table Import'' supports the following attribute data types:
Attribute names and data types can be modified here.
 * Modify Attribute Name - just enter a new attribute name and click OK.
 * Modify Attribute Data Type - The following attribute data types are supported:
Line 122: Line 116:
    * List of String/Boolean/Integer/Floating Point
 Cytoscape has basic data type detection function for string, boolean, integer, and floating point numbers. This means attribute data type will be set to integer if all entries in a column are integers, etc. If you need to change the suggested data type, click on one of the radio buttons in the dialog. For list data type, you need to select delimiter for list cells. The list delimiter is global, i.e. all cells will be split by this character. You cannot specify column-specific list delimiter.
    * List of (one of) String/Boolean/Integer/Floating Point
Cytoscape has a basic data type detection function that automatically suggests the attribute data type of a column according to its entries. This can be overridden by selecting the appropriate data type from the radio buttons provided. For lists, a global delimiter must be specified (i.e., all cells in the table must use the same delimiter).
Line 126: Line 121:

The last option for creating a network is to create a new, empty network and manual add nodes and edges. To do this, select the __File → New → Network → Empty Network__ menu. This will create a new network. From here select the Edit tab in Cyto Panel 1 and edit the network as described in the [Cytoscape_User_Manual/Editor Cytoscape Editor] chapter.
  
  A new, empty network can also be created and nodes and edges manually added. To create an empty network, go to File → New → Network → Empty Network, and then manually add network components using the Editor in !CytoPanel 1 (see the [:Cytoscape_User_Manual/Network_Editor:Editor] chapter for more details).

There are 3 different ways of creating networks in Cytoscape:

  1. Importing pre-existing, formatted network files.
  2. Importing pre-existing, unformatted text or Excel files.
  3. Creating an empty network and manually adding nodes and edges.

Import Fixed-Format Network Files

Network files can be specified in any of the formats described in the [:Cytoscape_User_Manual/Network_Formats:Supported Network Formats] chapter. Networks are imported into Cytoscape through the "Import Network" window, which can be accessed by going to File → Import → Network (multiple file types). The network file can either be located directly on the local computer, or found on a remote computer (in which case it will be referenced with a URL).

Load Networks from Local Computer

By default, Cytoscape loads networks from the local computer.

The Import Networks dialog shows a default setting of "Data Source Type: Local," meaning that network files from the local computer will be available for importing. Choose the correct file by clicking on the Select button (only file types that Cytoscape recognizes will be shown), and then load the network by clicking on the Import button. Some sample network files of different types have been included in the sampleData folder in Cytoscape.

Network files in SIF, GML, and XGMML formats may also be loaded directly from the command line using the –N option.

attachment:network_import_dialog1.png

Load Networks from a Remote Computer (URL import)

The Import Networks dialog is also capable of importing network files using a URL. To do this, set the Data Source Type to Remote and insert the appropriate URL, either manually or using URL bookmarks. Bookmarked URLs can be accessed by clicking on the arrow to the right of the text field (see the Bookmark Manager in [:Cytoscape_User_Manual/Preferences:Preferences] for more details on bookmarks). Once a URL has been specified, click on the Import button to load the network.

attachment:network_import_dialog2.png

Importing networks from URL addresses has an important caveat. Because Cytoscape determines file type primarily (not exclusively) by file extension, it can have trouble importing networks with URLs that don't end in a human readable file name. If Cytoscape does not recognize a meaningful file name and extension in the URL, it will attempt to guess the type of file based on MIME type. If the MIME type is not recognizable to any of our import handlers, then the import will fail.

Another issue for network import is the presence of firewalls, which can affect which files are accessible to a computer. To work around this problem, Cytoscape supports the use of proxy servers. To configure the proxy server, go to Edit → Preferences→ Proxy Server... . This is further described in the [:Cytoscape_User_Manual/Preferences:Preferences] chapter.

Anchor(import-free-format-tables)

Import Free-Format Table Files

Introduced in version 2.4, Cytoscape now supports the import of networks from delimited text files and Excel workbooks using Edit → Import → Network from Table (Text/MS Excel)... . An interactive GUI allows users to specify parsing options for specified files. The screen provides a preview that shows how the file will be parsed given the current configuration. As the configuration changes, the preview updates automatically. In addition to specifying how the file will be parsed, the user must also choose the columns that represent the Source nodes, the Target nodes, and an optional edge interaction type.

attachment:network_table_import.png

Supported Files

The "Import Network from Table" function supports delimited text files and single-sheet Microsoft Excel Workbooks. The following is a sample table file:

source  target  interaction  boolean attribute  string attribute        floating point attribute
YJR022W YNR053C pp      TRUE    abcd12371       1.2344543
YER116C YDL013W pp      TRUE    abcd12372       1.2344543
YNL307C YAL038W pp      FALSE   abcd12373       1.2344543
YNL216W YCR012W pd      TRUE    abcd12374       1.2344543
YNL216W YGR254W pd      TRUE    abcd12375       1.2344543

The network table files should contain at least two columns: source nodes and target nodes. The interaction type is optional in this format. Therefore, a minimal network table looks like the following:

YJR022W YNR053C
YER116C YDL013W
YNL307C YAL038W
YNL216W YCR012W
YNL216W YGR254W

One row in a network table file represents an edge and its edge attributes. This means that a network file is considered a combination of network data and edge attributes. A table may contain columns that aren't meant to be edge attributes. In this case, you can choose not to import those columns by clicking on the column header in the preview window. This function is useful when importing a data table like the following (1):

Unique ID A     Unique ID B     Alternative ID A        Alternative ID B        Aliases A       Aliases B       Interaction detection methods   First author surnames   Pubmed IDs      species A       species B       Interactor types        Source database Interaction ID  Interaction labels      Cross-references        Associated Files        Experiment files        Experiment labels       Different techniques    Different Pubmed articles       Different sources       Weight

7205    5747    TRIP6   PTK2    Q15654  Q05397-1        vv|HPRD Currently not available 14688263|15892868(Marcotte)     Mammalia        Homo sapiens    protein|protein HPRD|Marcotte   0       Thyroid hormone receptor interactor 6-FAK-|PTK2-TRIP6   NA(HPRD)|NA(Marcotte)   HPRD/02859_psimi.xml|other/ORIGINAL_DATA_MARCOTTE.txt   vv(HPRD/02859_psimi.xml)|HPRD(other/ORIGINAL_DATA_MARCOTTE.txt) 17651(ExptRef)|Marcotte 2       2       2       2

4174    7311    MCM5    UBA52   P33992  P62987  neighbouring_reaction   Currently not available 15608231(Reactome)      Homo sapiens    Homo sapiens    protein|protein Reactome        1       P33992-P62988   Reaction:68944<->Reaction:68946(Reactome)|Reaction:68946<->Reaction:68944(Reactome)     other/ORIGINAL_DATA_MARCOTTE.txt        neighbouring_reaction(other/REACTOMEhomo_sapiens.interactions.txt)      Reactome        1       1       1       1

7040    7040    TGFB1   TGFB1   P01137  P01137  nmr: nuclear magnetic resonance Currently not available 8679613 Homo sapiens    Homo sapiens    protein|protein BIND    2       TGFB1-TGFB1-    72085(BIND)     BIND/bind_taxid9606.1.psi.xml   nmr: nuclear magnetic resonance(BIND/bind_taxid9606.1.psi.xml)  NotAvailable    1       1       1       1

This data file is a tab-delimited text and contains network data (interactions), edge attributes, and node attributes. To import network and edge attributes from this table, you need to choose Unique ID A as source, Unique ID B as target, and Interactor types as interaction type. Then you need to turn off columns used for node attributes (Alternative ID A, species B, etc.). Other columns can be imported as edge attributes.

The network import function cannot import node attributes - only edge attributes. To import node attributes from this table, please see the [:Cytoscape_User_Manual/Attributes:Attributes] section of this manual.

Note (1): This data is taken from the A merged human interactome datasets by Andrew Garrow, Yeyejide Adeleye and Guy Warner (Unilever, Safety and Environmental Assurance Center, 12 October 2006). Actual data files are available at http://www.cytoscape.org/cgi-bin/moin.cgi/Data_Sets/

Basic Operations

To import network text/Excel tables, please follow these steps:

  1. Select File → Import → Network from Table (Text/MS Excel)...

  2. Select a table file by clicking on the Select File button.
  3. Define the interaction parameters by specifying which columns of data contain the Source Interaction, Target Interaction, and Interaction Type. Setting the Interaction Type as Default Interaction will result in all interactions being given the value pp; this value can be modified in Advanced Options (below).
  4. (Optional) Define edge attribute columns, if applicable. Network table files can have edge attribute columns in addition to network data.
    • Enable/Disable Attribute Column - By left-clicking on a column header in the preview table, you can enable/disable edge attributes. If the header is checked and entries are blue, the column will be imported as an edge attribute. For example, the table below shows that columns 1 through 3 will be used as network data, column 4 will not be imported, and columns 5 and 6 will be imported as edge attributes.

      • attachment:network_table_sample.png
    • Change Attribute Name and Data Types - If you right-click on a column header in the preview table, you can modify the attribute name and data type. For more detail, see "Modify Attribute Name/Type" below.

  5. Click the Import button.

Advanced Options

attachment:network_import_advanced.png

You can select several options by checking the Show Text File Import Options checkbox.

  • Delimiter: You can select multiple delimiters for text tables. By default, Tab and Space are selected as delimiters.
  • Preview Options: When you select a network table file, the first 100 entries will be displayed in the Preview panel. To display more entries, change the value for this option. If you want to show all entries in the file, select "Show all entries in the file". You will need to click the Reload button to update the Preview panel.
  • Attribute Names
    • Transfer first line as attribute names: Selecting this option will cause all edge attribute columns to be named according to the first data entry in that column.
    • Start Import Row: Set which row of the table to begin importing data from. For example, if you want to skip the first 3 rows in the file, set 4 for this option.
    • Comment Line: Rows starting with this character will not be imported. This option can be used to skip comment lines in text files.
  • Network Import Options: If the Interaction Type is set to Default Interaction, the value here will be used as the interaction type for all edges.

Modify Attribute Name/Type

attachment:network_table_attr_dialog1.png

Attribute names and data types can be modified here.

  • Modify Attribute Name - just enter a new attribute name and click OK.
  • Modify Attribute Data Type - The following attribute data types are supported:
    • String
    • Boolean (True/False)
    • Integer
    • Floating Point
    • List of (one of) String/Boolean/Integer/Floating Point

Cytoscape has a basic data type detection function that automatically suggests the attribute data type of a column according to its entries. This can be overridden by selecting the appropriate data type from the radio buttons provided. For lists, a global delimiter must be specified (i.e., all cells in the table must use the same delimiter).

Edit a New Network

A new, empty network can also be created and nodes and edges manually added. To create an empty network, go to File → New → Network → Empty Network, and then manually add network components using the Editor in CytoPanel 1 (see the [:Cytoscape_User_Manual/Network_Editor:Editor] chapter for more details).

Cytoscape_User_Manual/Creating_Networks (last edited 2009-02-12 01:04:09 by localhost)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux