Cytoscape allows the user to add arbitrary node, edge and network information to Cytoscape as node/edge/network attributes. Attributes could be, for example, annotation data on a gene or confidence values in a protein-protein interaction. These attributes can then be visualized in a user-defined way by setting up a mapping from data attributes to visual attributes (colors, shapes, etc.) See the section on visual styles for a discussion of this.

Node and edge attribute files are simply formatted: A node attribute file begins with the name of the attribute on the first line, and on each following line, has the name of the node, followed by an equals sign, followed by the value of that attribute. Numbers and text strings are the most common attribute types. All values for a given attribute must have the same type. For example:

FunctionalCategory
YAL001C = metabolism
YAR002W = apoptosis
YBL007C = ribosome

An edge attribute file has much the same structure, except that the name of the edge is the source node name, followed by the interaction type in parentheses, followed by the target node name. Directionality counts, so switching the source and target will refer to a different (or perhaps non-existent) edge. The following is an example edge attributes file:

InteractionStrength
YAL001C (pp) YBR043W = 0.82
YMR022W (pd) YDL112C = 0.441
YDL112C (pd) YMR022W = 0.9013

Cytoscape treats edge attributes as directional, so note that the second and third edge attribute values refer to two different edges (source and target are reversed, though the nodes involved are the same).

Each attribute is stored in a separate file. Node and edge attribute files use the same format. Node attribute file names often use the suffix ".noa", while edge attribute file names use the suffix ".eda". Cytoscape recognizes these suffixes when browsing for attribute files.

Node and edge attributes may be loaded at the command line using the –n and –e options or via the File → Import menu.

When expression data is loaded using an expression matrix, it is automatically copied into the Node Attributes data structure unless explicitly specified not to.

Node and edge attributes are attached to nodes and edges, NOT to networks. If two different networks have the same nodes, then those nodes will have the same attributes. Even if a network is loaded after attributes have been loaded, if the nodes or edges found in the new network already exist, then any existing attributes will be applied to those nodes.

Detailed file format (Advanced users) Every attribute file has one header line that gives the name of the attribute, and optionally some additional meta-information about that attribute. The format is as follows:

attributeName (class=formal.class.of.value)

The first field is always the attribute name: it cannot contain spaces. If present, the class field defines the formal (package qualified) name of the class of the attribute values. For example, java.lang.String for Strings, java.lang.Double for floating point values, java.lang.Integer for integer values, etc. If the value is actually a list of values, the class should be the type of the objects in the list. If no class is specified in the header line, Cytoscape will attempt to guess the type from the first value. If the first value contains numbers in a floating point format, Cytoscape will assume java.lang.Double; if the first value contains only numbers with no decimal point, Cytoscape will assume java.lang.Integer; otherwise Cytoscape will assume java.lang.String. Note that the first value can lead Cytoscape astray: for example,

floatingPointAttribute
firstName = 1
secondName = 2.5

In this case, the first value will make Cytoscape think the values should be integers, when in fact they should be floating point numbers. It's safest to explicitly specify the value type to prevent confusion. Every line past the first line identifies the name of an object and the String representation of the attribute value. The delimiter is always an equals sign; whitespace (spaces and/or tabs) before and after the equals sign is ignored. This means that your names and values can contain whitespace, but object names cannot contain an equals sign and no guarantees are made concerning leading or trailing whitespace. Usually the object names should be the same as the names in your graph file, unless name conversion is being used (see the section on name resolution in section). Edge names are all of the form:

sourceName (edgeType) targetName

Note that this format is different from the specification of interactions in the SIF file format. To be explicit: in a SIF file, an interaction looks like

sourceName edgeType targetName

To set an attribute for the edge defined by this interaction, the matching line in an attributes file should look like

sourceName (edgeType) targetName = value

listAttributeName (class=java.lang.String)
firstObjectName = (firstValue::secondValue::thirdValue)
secondObjectName = (onlyOneValue)

This defines an attribute which is a list of Strings. The first object has three strings, and thus three elements in its list, while the second object has a list with only one member. In the case of a list every attribute value should be specified as a list, and every member of the list should be of the same class. Again, the class will be inferred if it is not specified in the header line. Lists are not supported by the visual mapper, so can’t be mapped to visual attributes.

Import Attribute Table Files

From version 2.4, Cytoscape can import arbitraly data tables from text and MS Excel files. By using this function, users can import virtually all kinds of text/Excel tables into Cytoscape as attributes.

How To Import Attributes from Table

  1. Select command: File → Import → Attribute from Table (text/MS Excel).

  2. Select one of the attribute types using Attributes radio buttons. Cytoscape can import node, edge, or network attributes.

  3. Select a data file. To load a local file, click on Select File button.

Attribute Browser When Cytoscape is started, the Attribute Browser appears in the bottom Cytopanel. This browser can be hidden and restored using the F5 key or the View → Show/Hide attribute browser menu option. Like other Cytopanels, the browser can be undocked by pressing the little icon in the browser’s top right corner.

attachment:attribute_browser_nodes.png

To swap between displaying node, edge, and network attributes use the tabs on the bottom of the panel: “Node Attribute Browser”, “Edge Attribute Browser”, and "Network Attribute Browser". The attribute browser displays attributes belonging to selected nodes and/or edges and the currently selected network. To populate the browser with rows (as pictured above), simply select nodes and/or edges in a loaded network. By default, only the “ID” of nodes and edges is shown. To display more than just the ID, click the “Select Attributes” attachment:attributes_select_icon.png button and choose the attributes that are to be displayed. Each attribute chosen will result in one column in the attribute browser (in the screenshot above there are 5 columns total including the ID). Most attribute values can be edited by double-clicking an attribute cell; list values cannot be edited, and neither can the ID. Attribute rows in the browser can be sorted alphabetically by specific attribute by clicking on a column heading. A new attribute can be created using the “Create New Attribute” attachment:attributes_new_icon.png button. Attributes created using the attribute browser must be one of four types – integer, string, real number (floating point), or boolean. Attributes can be deleted using the "Delete Attributes..." attachment:attributes_delete_icon.png button. NOTE: Deleting attributes removes them from Cytoscape, not just the attribute browser! To remove attributes only from the browser simply unselect the attribute using the "Select Attributes" attachment:attributes_select_icon.png button. The right-click menu on the Attribute Browser has several functions. This menu is useful for exporting attribute information to spreadsheet applications. For example, choose “Select All” and then “Copy” from the right-click and then paste into a spreadsheet application. Each attribute browser panel has a button for importing new attributes: attachment:attributes_import_icon.png .

The Node Attribute Browser panel has additional buttons for loading Gene Expression attribute matrices ( attachment:attributes_gene_expr_icon.png ) and for selecting Gene Ontology (GO) terms ( attachment:attributes_go_icon.png ) as node attributes. The Ontology selection button is only available if an Ontology Server has been imported. You can import an Ontology server through the File → Import → Ontology → Ontology Server menu option.

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