I have several difficulties:
1. After adding new node using editor, is it any option to change node
ID?
2. In JAVA: how can I get a canonical name? When I write this code
line -
String currentNodeCanonName =
(String)Cytoscape.getNodeAttributes().getListAttribute(((Node)
nodeIt.next()).getIdentifier(), Semantics.CANONICAL_NAME).get(0);
I recieve exception - ClassCastException: attributeName
'canonicalName' is not of TYPE_SIMPLE_LIST
2. canonical name is a String attribute. You can get it using something like:
public String getCanonicalName(CyNode node) {
return getNodeAttributes().getStringAttribute(node.getIdentifier(), Semantics.CANONICAL_NAME);
}
There may be a utility method for getting the canonical name but I don't know of one.
Thanks in Advance
Rags
It sounds as if you may want to define your own attribute for indicating whether a node is a pathway or protein. You should call it something other than NODE_TYPE, e.g. you could call it "nodeType". You can define an attribute using the Data Panel (known as the Attribute Browser in Cytoscape 2.5 and previous versions). This is described in the section on "Node and Edge Attributes" in the Help docs.
Let me know if you have any other questions.
AllanK
______________________________
Allan Kuchinsky
Agilent Technologies
5301 Stevens Creek Blvd. Mailstop 54U/SC
Santa Clara, CA, 95051
* phone (408) 553-2423
* mailto:allan_k...@agilent.com
AllanK
______________________________
Allan Kuchinsky
Agilent Technologies
5301 Stevens Creek Blvd. Mailstop 54U/SC
Santa Clara, CA, 95051
* phone (408) 553-2423
* mailto:allan_k...@agilent.com