Skip to content

Loading and editing attributes

luzgaral edited this page Feb 24, 2015 · 19 revisions


Attributes and types

What are the attributes?

Attributes are information relative to the elements of the network: nodes and edges. For example, if your nodes represents the proteins in a cell, then an attribute can be the "cellular location". Each node (protein) would have a different attribute value (nucleus, cytoplasm, membrane, etc) for the attribute "cellular location".

These attributes can be used to customise the network visualization by integrating onto it a variety of additional data of different nature. For example, use protein location to customise the protein shape and time series of gene expression to display the node as a pie chart representing the gene expression at each measurement point. To learn more about how to use attribute to custom the visualization: go to the Visualization and Advanced visualization sections.

Attribute types: simple or lists?

When there is only one attribute value per node, then the attribute is simple (or a string). But there are cases when the information you want to integrate onto your network elements is not simple but complex. For example, imagine you want to represent the location of a protein. A protein can move among the different cellular organelles and be preset in several places. For example, the Nuclear RNA export factor 1 protein, involved in the nuclear export of mRNA from the nucleus to the cytoplasm, will be present at both places. In these cases, the attribute is not a simple element but a list of elements. Another example could be time series of gene expression, when for each gene you have gene expression measurements at different points. Thus, you can provide an attribute of the type of a list of values per node. Each value in the list would represent the gene expression at a particular point.

See the following downloadable examples:

How to add attributes?

When you upload a network, by default, it doesn't have any attribute. These attributes should be created or imported by the user.

Integrating data onto a network in the form of attributes is very easy: you can introduce directly this data going to Attributes > Edit attributes which offers you the possibility of editing these as if excel program. Alternatively, we offer you the possibility of importing data from other databases. For a faster and customised integration, you can provide them by means of a table or excel with the data you need. Just be sure that the first column of this table contains the Node or edge id you used to label these elements when you uploaded the network.

In the following sections there is a complete explanation on how to enrich your network with attributes by adding, editing and removing them.


Import attributes from your file

Upload your own attributes by going to File > Import > Node / edges attributes. A window will appear. Browse your file and click OK. Your file must be a flat text file, and the different attributes must be separated by a tab. Note that the first column must contain the name of the element that will be use to map the attributes.

A preview of your data will appear in the window like a spreadsheet. Select the columns you want to import as attributes. You can change the attribute names by editing the corresponding column header. Finally, you can also allow CellMaps to create new nodes for unrecognized names.

importnodeattributes


Import attributes from databases

Import attributes from a bunch of databases through CellBase by going to Attributes > Import Attributes from CellBase.

importattributescellbase


Create your own attributes

You can create attributes directly on CellMaps by going to Attributes > Edit Node/Edge. An editor window will appear. To create an attribute, go to add attribute and expand the panel. First, write the name of the attribute, second select the attribute type and, finally, assign a default value. To save the attribute click on the apply button.

createattributes


Edit your attributes

You can edit your attributes directly on CellMaps by going to Attributes > Edit Node/Edge. An editor window will appear. To modify attributes, go to Edit section. First, select the attribute name from the pull-down menu and, secondly, select the rows (nodes or edges) that you want to modify. NOTE that only the values for the selected nodes will be modified. To apply the change to all the elements just click on "select all" button. Finally, introduce the new attribute value and click the blue button.

Alternatively, you can modify directly the editable spreadsheet by double click on the spreadsheet cell and re-write the content. Changes will be automatically saved.

createattributes


Delete attributes

To remove an attribute, go to Attributes > Edit Node/Edge. Here in the delete attribute select the attribute name from the list and click on the apply button.


Continue your analysis

Once your network and attributes are loaded, you can continue your analysis by setting the visual style of you network (see Network and attributes visualization) and performing analysis onto it (see Analysis).