RFC Name : ... |
Editor(s): ... |
About this document
This is an official Request for Comment (RFC) for CyNode Identification
For details on RFCs in general, check out the [http://www.answers.com/main/ntquery?method=4&dsid=2222&dekey=Request+for+Comments&gwp=8&curtab=2222_1&linktext=Request%20for%20Comments Wikipedia Entry: Request for Comments (RFCs)]
Status
This RFC is still under construction and open for public comment. (01/17/06 -Ben)
How to Comment
To view/add comments, click on any of 'Comment' links below. By adding your ideas to the Wiki directly, we can more easily organize everyone's ideas, and keep clear records. Be sure to include today's date and your name for each comment. Here is an example to get things started: ["/Comment"].
Try to keep your comments as concrete and constructive as possible. For example, if you find a part of the RFC makes no sense, please say so, but don't stop there. Take the extra step and propose alternatives.
Proposal
Switch to a numbered node system instead of the current node ID as a string system. There should be a clear distinction between a node id and its label.
- use unique numerical ids for nodes
- get rid of CANONICAL_NAME and COMMON_NAME ["/Comment"]
- add LABEL attribute
- only use graph objects on methods, ie int [] getAdjacentEdges (Node node);
Biological Questions / Use Cases
Graph Editing:
- Ability to manipulate nodes that have not been labeled.
- Ability to have two or more unique nodes with the same label.
General Notes
In this rfc, the term "label" or "node label" has been used in place of the more historic term "name" or "node name".
Requirements
- Use a unique ID that is generated by Cytoscape (maybe Strings parsable as numbers).
- These IDs are NOT visible to users (for example in the attribute browser).
- CANONICAL_NAME and COMMON_NAME attributes should go away and be replaced with a LABEL attribute.
- SIF reader has to ensure that there are no duplicate labels. SIF reuses a label if it can find one. We are going to write SIF files.
Deferred Items
Open Issues
Unique ID generation:
- Should ID's be unique across Cytoscape community (say if stored in SIF file) ?
- Should this unique id be stored/represented internally as a String ?
SIF File Format:
- What new information (if any) has to be written to SIF ?
- SIF reader has to ensure that there are no duplicate labels.
- SIF reuses a label if it can find one.
- What affect does this have on new Cytoscape session saving subsystem ?
Backward Compatibility
Importing/Exporting:
- Ok to import old attributes file.
- Exporting should use new format.
Expected growth and plan for growth
References
Current Implementation Notes (2.2)
cytoscape.graph.dynamic.util.DynamicGraphRepresentation.nodeCreate() creates a unique node id as integer.
cytoscape.giny.CyNodeDepot creates new CyNode using nodeID obtained from cytoscape.graph.dynamic.util.DynamicGraphRepresentation.nodeCreate()
nodes are created/retrieved through Cytoscape.getCyNode(), using cytoscape.giny.CytoscapeFingRootGraph (which extends fing.model.FRootGraph). cytoscape.giny.CytoscapeFingRootGraph handles mapping of node indentifiers as strings to node id's as integers via com.sosnoski.util.hashmap.StringIntHashMap() (it translates the string to id before forwarding request to fing.model.FRootGraph).
- cytoscape.getCyNode() is called from:
- cytoscape.data.readers.GMLReader.read()
- cytoscape.data.readers.GMLReader2.createGraph()
cytoscape.data.readers.InteractionsReader.createRootGraphFromInteractionData()
cytoscape.editor.CytoscapeEditorManager.addNode()
Implementation Plan
- Resolve open issues within RFC/clarify specification. Code analysis to support final RFC proposal.