Differences between revisions 15 and 27 (spanning 12 versions)
Revision 15 as of 2005-08-17 19:21:38
Size: 3878
Editor: c-24-19-45-25
Comment:
Revision 27 as of 2009-02-12 01:04:01
Size: 5019
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[TableOfContents]] #pragma section-numbers on
## with the above line, sections are automatically numbered, avoiding the duplication of section numbers in the TableOfContents. Feel free to change it back if you prefer the old way.
Line 3: Line 4:
=== 1. Overview of the CytoscapeData Classes === ['drawing.picturename']

<<TableOfContents>>

=== Overview of the CytoscapeData Classes ===
Line 9: Line 14:
[ftp://baker.systemsbiology.net/pub/xmas/CytoscapeData_classes.png] [[ftp://baker.systemsbiology.net/pub/xmas/CytoscapeData_classes.png]]
Line 12: Line 17:
=== 2. Allowed Data Types, and other Conventions === === Allowed Data Types, and other Conventions ===
Line 26: Line 31:
=== 3. Beginning CytoscapeData Attribute Storage and Access === === Beginning CytoscapeData Attribute Storage and Access ===
Line 32: Line 37:
[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_1.png] [[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_1.png]]
Line 36: Line 41:
[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_2.png] [[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_2.png]]
Line 45: Line 50:
=== 4. Advanced CytoscapeData Attribute Storage and Access === === Advanced CytoscapeData Attribute Storage and Access ===
Line 51: Line 56:
[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_3.png] [[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_3.png]]
Line 55: Line 60:
[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_4.png] [[ftp://baker.systemsbiology.net/pub/xmas/CD_structure_4.png]]
Line 60: Line 65:
{{{#!java
This is = test;
}}}
=== List Functions ===
Line 64: Line 67:
||||List Function Overview||
||'''Function'''||'''CytoscapeData Method'''||
||Add||{{{addAttributeListValue(String identifier, String attribute, Object value)}}}||
||Return List||{{{getAttributeValueList(String identifier, String attribute)}}}||
||Get Element||{{{getAttributeValueListElement(String identifier, String attribute, int position)}}}||
||List Size||{{{getAttributeValueListCount(String identifier, String attribute)}}}||
||Delete Value||{{{deleteAttributeListValue(String identifier, String attribute, int position)}}}||
Line 65: Line 75:
Will give you access to the new data API now provided by Cytoscape. === Hash Functions ===
Line 67: Line 77:
= Some Features =
 *This
 *That
 *Other

||'''New'''||'''Old'''||
||||Span||
||yes||no||
||||Hash Function Overview||
||'''Function'''||'''CytoscapeData Method'''||
||Put||{{{putAttributeKeyValue(String identifier, String attribute, String key, Object value)}}}||
||Get||{{{getAttributeKeyValue(String identifier, String attribute, String key)}}}||
||Keys||{{{getAttributeKeySet(String identifier, String attribute)}}}||
||Return Map||{{{getAttributeValuesMap(String identifier, String attribute)}}}||
||Delete||{{{deleteAttributeKeyValue(String identifier, String attribute, String key)}}}||

['drawing.picturename']

1. Overview of the CytoscapeData Classes

CytoscapeData is the primary class that Cytoscape uses for its attribute storage and access. CytoscapeData is an interface that provides a tiered API that allows for more advanced use as the user becomes more familiar with the class. The primary class, CytoscapeData, is an interface located at cytoscape.data.CytoscapeData. It extends the old data class, GraphObjAttributes, to support legacy code. CytoscapeData also extends the classes, CyData and CyDataDefinition, these classes provide the advanced functionality of CytoscapeData.

This document will deal primarily with the API offered by CytoscapeData, but more information is available for the support classes. The implementation and inheritance of CytoscapeData is shown here:

ftp://baker.systemsbiology.net/pub/xmas/CytoscapeData_classes.png

2. Allowed Data Types, and other Conventions

CytoscapeData is restricted in the type of data it can store. While the arguments for values are Objects. Only certain types are allowed.

Allowable Value Types

Java Class

CytoscapeData Type

java.lang.String

STRING_TYPE

java.lang.Double

FLOATING_POINT_TYPE

java.lang.Integer

INTEGER_TYPE

java.lang.Boolean

BOOLEAN_TYPE

While this is somewhat restrictive, especially since Lists and Hashes are not allowed, CytoscapeData makes up for that lack, by providing built-in list and hash data structures. Section 4 covers this.

3. Beginning CytoscapeData Attribute Storage and Access

CytoscapeData stores values in a multi-dimensional way. Every object in Cytoscape that has values stored for it, has a getIdentifier() method that will return the unique identifier for that object. Currently this is restricted to Nodes and Edges. To store or access a value, the value must be stored under an attribute name. This means that many different values can be associated with a node, each identifiable by a specific attribute.

The simplest case is one attribute, and one value:

ftp://baker.systemsbiology.net/pub/xmas/CD_structure_1.png

As more attributes are added, more values are stored for a given identifier.

ftp://baker.systemsbiology.net/pub/xmas/CD_structure_2.png

The following methods are used for accessing using the one-attribute-one-value paradigm.

Set

setAttributeValue(String identifier, String attribute, Object value) 

Get

getAttributeValue(String identifier, String attribute) 

Delete

deleteAttributeValue(String identifier, String attribute) 

4. Advanced CytoscapeData Attribute Storage and Access

As more complex data is created, CytoscapeData has the potential to accomodate. Lists and Hashes provide a mechanism for storing complex multi-dimensional data. Since the basic CytoscapeData types do not allow for these, they are built into the API.

One Attribute, with several keys:

ftp://baker.systemsbiology.net/pub/xmas/CD_structure_3.png

Multipe Attributes, each with several (possibly different) keys:

ftp://baker.systemsbiology.net/pub/xmas/CD_structure_4.png

There are 2 sets of methods that allow for the Identifier->Attribute->Key paradigm to be used. There are both List and Hash type methods. If the List methods are used first, then later the Hash methods, the values added as a list will simply be given hash keys which are the position in the list as a string. The same is true for using Hash methods then List methods, the Hash keys will be ignored, and the values returned as though they were a list.

5. List Functions

List Function Overview

Function

CytoscapeData Method

Add

addAttributeListValue(String identifier, String attribute, Object value)

Return List

getAttributeValueList(String identifier, String attribute)

Get Element

getAttributeValueListElement(String identifier, String attribute, int position)

List Size

getAttributeValueListCount(String identifier, String attribute)

Delete Value

deleteAttributeListValue(String identifier, String attribute, int position)

6. Hash Functions

Hash Function Overview

Function

CytoscapeData Method

Put

putAttributeKeyValue(String identifier, String attribute, String key, Object value)

Get

getAttributeKeyValue(String identifier, String attribute, String key)

Keys

getAttributeKeySet(String identifier, String attribute)

Return Map

getAttributeValuesMap(String identifier, String attribute)

Delete

deleteAttributeKeyValue(String identifier, String attribute, String key)

CytoscapeData (last edited 2009-02-12 01:04:01 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