|
Cytoscape 2.3.1 (c) 2004 ISB, MSKCC, UCSD | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.Cytoscape
This class, Cytoscape is the primary class in the API.
All Nodes and Edges must be created using the methods getCyNode and
getCyEdge, available only in this class. Once A node or edge is created using
these methods it can then be added to a CyNetwork, where it can be used
algorithmically.
The methods get/setNode/EdgeAttributeValue allow you to assocate data with
nodes or edges. That data is then carried into all CyNetworks where that
Node/Edge is present.
Constructor Summary | |
Cytoscape()
|
Method Summary | |
static void |
clearCytoscape()
Deprecated. WARNING: this should only be used under special circumstances. |
static CyNetwork |
createNetwork(Collection nodes,
Collection edges,
String title)
Creates a new Network. |
static CyNetwork |
createNetwork(Collection nodes,
Collection edges,
String child_title,
CyNetwork parent)
Creates a new Network, that inherits from the given ParentNetwork. |
static CyNetwork |
createNetwork(Collection nodes,
Collection edges,
String child_title,
CyNetwork parent,
boolean create_view)
Creates a new Network, that inherits from the given ParentNetwork. |
static CyNetwork |
createNetwork(cytoscape.data.readers.GraphReader reader,
boolean create_view,
CyNetwork parent)
Creates a cytoscape.data.CyNetwork from a reader. |
static CyNetwork |
createNetwork(int[] nodes,
int[] edges,
String title)
Creates a new Network. |
static CyNetwork |
createNetwork(int[] nodes,
int[] edges,
String child_title,
CyNetwork parent)
Creates a new Network, that inherits from the given ParentNetwork. |
static CyNetwork |
createNetwork(int[] nodes,
int[] edges,
String child_title,
CyNetwork parent,
boolean create_view)
Creates a new Network, that inherits from the given ParentNetwork |
static CyNetwork |
createNetwork(String title)
Creates a new, empty Network. |
static CyNetwork |
createNetwork(String title,
boolean create_view)
Creates a new, empty Network. |
static CyNetwork |
createNetwork(String location,
int file_type,
boolean canonicalize,
BioDataServer biodataserver,
String species)
Deprecated. It will be removed in April 2007 Use CyNetwork createNetworkFromFile(String location, boolean create_view) instead. File type is no longer needed as ImportHandler now manages all file types. |
static CyNetwork |
createNetworkFromFile(String location)
Creates a CyNetwork from a file. |
static CyNetwork |
createNetworkFromFile(String location,
boolean create_view)
Creates a CyNetwork from a file. |
static CyNetwork |
createNetworkFromProject(CyProject project,
BioDataServer bioDataServer)
Deprecated. Will be removed Oct 2006. This is not apparently used, so don't start. This functionality has been subsumed by Cytoscape Sessions. |
static CyNetworkView |
createNetworkView(CyNetwork network)
Creates a CyNetworkView, but doesn't do anything with it. |
static CyNetworkView |
createNetworkView(CyNetwork network,
String title)
Creates a CyNetworkView, but doesn't do anything with it. |
static void |
createNewSession()
Clear all networks and attributes and start a new session. |
static void |
destroyNetwork(CyNetwork network)
destroys the given network |
static void |
destroyNetwork(CyNetwork network,
boolean destroy_unique)
destroys the given network |
static void |
destroyNetwork(String network_id)
destroys the given network |
static void |
destroyNetworkView(CyNetwork network)
destroys the networkview, including any layout information |
static void |
destroyNetworkView(CyNetworkView view)
destroys the networkview, including any layout information |
static void |
destroyNetworkView(String network_view_id)
destroys the networkview, including any layout information |
static void |
disableSquiggle()
Deprecated. Squiggle is gone and we don't expect the functionality to return. if this causes major problems, let us know. This method will be removed Sept 2006. |
static void |
enableSquiggle()
Deprecated. Squiggle is gone and we don't expect the functionality to return. if this causes major problems, let us know. This method will be removed Sept 2006. |
static void |
ensureCapacity(int nodes,
int edges)
Ensure the capacity of Cytoscapce. |
static void |
exit()
Deprecated. Use exit(returnVal) instead. This will be removed in Sept 2006. |
static void |
exit(int returnVal)
Shuts down Cytoscape, after giving plugins time to react. |
static void |
firePropertyChange(String property_type,
Object old_value,
Object new_value)
|
static BioDataServer |
getBioDataServer()
|
static CyNetwork |
getCurrentNetwork()
Return the Network that currently has the Focus. |
static CyNetworkView |
getCurrentNetworkView()
Return the CyNetworkView that currently has the focus. |
static String |
getCurrentSessionFileName()
Get name of the current session file. |
static CyEdge |
getCyEdge(Node node_1,
Node node_2,
String attribute,
Object attribute_value,
boolean create)
Gets the first CyEdge found between the two nodes (direction does not matter) that has the given value for the given attribute. |
static CyEdge |
getCyEdge(Node source,
Node target,
String attribute,
Object attribute_value,
boolean create,
boolean directed)
Gets the first CyEdge found between the two nodes that has the given value for the given attribute. |
static CyEdge |
getCyEdge(String source_alias,
String edge_name,
String target_alias,
String interaction_type)
|
static List |
getCyEdgesList()
|
static CyNode |
getCyNode(String alias)
|
static CyNode |
getCyNode(String nodeID,
boolean create)
|
static List |
getCyNodesList()
|
static CytoscapeObj |
getCytoscapeObj()
Deprecated. |
static CytoscapeDesktop |
getDesktop()
|
static CyAttributes |
getEdgeAttributes()
Gets Global Edge Attributes |
static String[] |
getEdgeAttributesList()
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static Object |
getEdgeAttributeValue(Edge edge,
String attribute)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static cytoscape.data.GraphObjAttributes |
getEdgeNetworkData()
Deprecated. Use getEdgeAttributes() instead. This
method will be removed in September, 2006. |
static ExpressionData |
getExpressionData()
|
static cytoscape.data.ImportHandler |
getImportHandler()
|
static CyNetwork |
getNetwork(String id)
|
static CyAttributes |
getNetworkAttributes()
Gets Global Network Attributes. |
static Set |
getNetworkSet()
Return a List of all available CyNetworks |
static CyNetworkView |
getNetworkView(String network_id)
|
static Map |
getNetworkViewMap()
This Map has keys that are Strings ( network_ids ) and values that are networkviews. |
static CyAttributes |
getNodeAttributes()
Gets Global Node Attributes. |
static String[] |
getNodeAttributesList()
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static String[] |
getNodeAttributesList(Edge[] edges)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static String[] |
getNodeAttributesList(Node[] nodes)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static Object |
getNodeAttributeValue(Node node,
String attribute)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static cytoscape.data.GraphObjAttributes |
getNodeNetworkData()
Deprecated. Use getNodeAttributes() instead. This
method will be removed in September, 2006. |
static CyNetwork |
getNullNetwork()
|
static CyNetworkView |
getNullNetworkView()
|
static PropertyChangeSupport |
getPropertyChangeSupport()
|
static cytoscape.giny.CytoscapeRootGraph |
getRootGraph()
Return the CytoscapeRootGraph |
static int |
getSelectionMode()
Gets the selection mode value. |
static int |
getSessionstate()
|
static SwingPropertyChangeSupport |
getSwingPropertyChangeSupport()
Bound events are: NETWORK_CREATED NETWORK_DESTROYED CYTOSCAPE_EXIT |
static VisualMappingManager |
getVisualMappingManager()
|
static boolean |
isSquiggleEnabled()
Deprecated. Squiggle is gone and we don't expect the functionality to return. if this causes major problems, let us know. This method will be removed Sept 2006. |
static void |
loadAttributes(String[] nodeAttrLocations,
String[] edgeAttrLocations)
Loads Node and Edge attribute data into Cytoscape from the given file locations. |
static void |
loadAttributes(String[] nodeAttrLocations,
String[] edgeAttrLocations,
boolean canonicalize,
BioDataServer bioDataServer,
String species)
Loads Node and Edge attribute data into Cytoscape from the given file locations. |
static BioDataServer |
loadBioDataServer(String location)
A BioDataServer should be loadable from a file systems file or from a URL. |
static boolean |
loadExpressionData(String filename,
boolean copy_atts)
Load Expression Data |
static void |
setCurrentNetwork(String id)
Deprecated. |
static boolean |
setCurrentNetworkView(String id)
Deprecated. |
static void |
setCurrentSessionFileName(String newName)
Set the current session name. |
static boolean |
setEdgeAttributeValue(Edge edge,
String attribute,
Object value)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static void |
setExpressionData(ExpressionData expData)
|
static boolean |
setNodeAttributeValue(Node node,
String attribute,
Object value)
Deprecated. Use CyAttributes directly. This method will be
removed in September, 2006. |
static void |
setSelectionMode(int selectionMode)
Sets the specified selection mode on all views. |
static void |
setSelectionMode(int selectionMode,
GraphView view)
Utility method to set the selection mode on the specified GraphView. |
static void |
setSessionState(int state)
|
static void |
setSpecies()
Deprecated. argh!... |
static boolean |
viewExists(String network_id)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String NETWORK_CREATED
public static String ATTRIBUTES_CHANGED
CyAttributes
public static String DATASERVER_CHANGED
public static String EXPRESSION_DATA_LOADED
public static String NETWORK_DESTROYED
public static String CYTOSCAPE_INITIALIZED
public static String CYTOSCAPE_EXIT
public static String SESSION_SAVED
public static String SESSION_LOADED
public static String VIZMAP_RESTORED
public static String SAVE_VIZMAP_PROPS
public static String VIZMAP_LOADED
public static final String NETWORK_MODIFIED
public static final String NETWORK_SAVED
public static final String NETWORK_LOADED
public static final String PREFERENCE_MODIFIED
public static final String PREFERENCES_UPDATED
public static int FILE_BY_SUFFIX
public static int FILE_GML
public static int FILE_SIF
public static int FILE_SBML
public static int FILE_XGMML
public static final int SELECT_NODES_ONLY
public static final int SELECT_EDGES_ONLY
public static final int SELECT_NODES_AND_EDGES
public static final int SESSION_NEW
public static final int SESSION_OPENED
public static final int SESSION_CHANGED
public static final int SESSION_CLOSED
public static final String READER_CLIENT_KEY
Constructor Detail |
public Cytoscape()
Method Detail |
public static cytoscape.data.ImportHandler getImportHandler()
public static CyNetworkView getNullNetworkView()
public static CyNetwork getNullNetwork()
public static void exit()
public static void exit(int returnVal)
returnVal
- The return value. Zero indicates success,
non-zero otherwise.public static SwingPropertyChangeSupport getSwingPropertyChangeSupport()
public static PropertyChangeSupport getPropertyChangeSupport()
public static VisualMappingManager getVisualMappingManager()
public static cytoscape.giny.CytoscapeRootGraph getRootGraph()
public static void ensureCapacity(int nodes, int edges)
public static void clearCytoscape()
public static List getCyNodesList()
public static List getCyEdgesList()
public static CyNode getCyNode(String alias)
alias
- an alias of a node
public static CyNode getCyNode(String nodeID, boolean create)
nodeID
- an alias of a nodecreate
- will create a node if one does not exist
create
is true
KONO: 5/4/2006 Since we removed the canonicalName, no "canonicalization"
is necessary. This method uses given nodeID as the identifier.public static CyEdge getCyEdge(Node node_1, Node node_2, String attribute, Object attribute_value, boolean create)
node_1
- one end of the edgenode_2
- the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTION
attribute_value
- a value for the attribute, like "pp"create
- will create an edge if one does not exist and if attribute is
Semantics.INTERACTION
create
is true and attribute is
Semantics.INTERACTION, otherwise returns null.public static CyEdge getCyEdge(Node source, Node target, String attribute, Object attribute_value, boolean create, boolean directed)
source
- one end of the edgetarget
- the other end of the edgeattribute
- the attribute of the edge to be searched, a common one is
Semantics.INTERACTION
attribute_value
- a value for the attribute, like "pp"create
- will create an edge if one does not exist and if attribute is
Semantics.INTERACTION
directed
- take direction into account, source->target is NOT target->source
create
is true and attribute is
Semantics.INTERACTION, otherwise returns null.public static CyEdge getCyEdge(String source_alias, String edge_name, String target_alias, String interaction_type)
source_alias
- an alias of a nodeedge_name
- the name of the nodetarget_alias
- an alias of a node
public static Object getNodeAttributeValue(Node node, String attribute)
CyAttributes
directly. This method will be
removed in September, 2006.
node
- the given CyNodeattribute
- the name of the requested attribute
public static Object getEdgeAttributeValue(Edge edge, String attribute)
CyAttributes
directly. This method will be
removed in September, 2006.
public static String[] getNodeAttributesList()
CyAttributes
directly. This method will be
removed in September, 2006.
public static String[] getNodeAttributesList(Node[] nodes)
CyAttributes
directly. This method will be
removed in September, 2006.
public static String[] getEdgeAttributesList()
CyAttributes
directly. This method will be
removed in September, 2006.
public static String[] getNodeAttributesList(Edge[] edges)
CyAttributes
directly. This method will be
removed in September, 2006.
public static boolean setNodeAttributeValue(Node node, String attribute, Object value)
CyAttributes
directly. This method will be
removed in September, 2006.
node
- the given CyNodeattribute
- the name of the requested attributevalue
- the value to be set
public static boolean setEdgeAttributeValue(Edge edge, String attribute, Object value)
CyAttributes
directly. This method will be
removed in September, 2006.
public static void setSpecies()
public static CyNetwork getCurrentNetwork()
public static Set getNetworkSet()
public static CyNetwork getNetwork(String id)
getNullNetwork()
) if there is no such network.public static CyNetworkView getNetworkView(String network_id)
public static boolean viewExists(String network_id)
public static CyNetworkView getCurrentNetworkView()
public static CytoscapeDesktop getDesktop()
public static void setCurrentNetwork(String id)
public static boolean setCurrentNetworkView(String id)
public static Map getNetworkViewMap()
public static void destroyNetwork(String network_id)
public static void destroyNetwork(CyNetwork network)
public static void destroyNetwork(CyNetwork network, boolean destroy_unique)
network
- the network tobe destroyeddestroy_unique
- if this is true, then all Nodes and Edges that are in this
network, but no other are also destroyed.public static void destroyNetworkView(CyNetworkView view)
public static void destroyNetworkView(String network_view_id)
public static void destroyNetworkView(CyNetwork network)
public static CyNetwork createNetwork(String title)
title
- the title of the new network.public static CyNetwork createNetwork(String title, boolean create_view)
title
- the title of the new network.create_view
- if the size of the network is under the node limit, create a
viewpublic static CyNetwork createNetwork(int[] nodes, int[] edges, String title)
nodes
- the indeces of nodesedges
- the indeces of edgestitle
- the title of the new network.public static CyNetwork createNetwork(Collection nodes, Collection edges, String title)
nodes
- a collection of nodesedges
- a collection of edgestitle
- the title of the new network.public static CyNetwork createNetwork(int[] nodes, int[] edges, String child_title, CyNetwork parent)
nodes
- the indeces of nodesedges
- the indeces of edgeschild_title
- the title of the new network.parent
- the parent of the this Networkpublic static CyNetwork createNetwork(int[] nodes, int[] edges, String child_title, CyNetwork parent, boolean create_view)
nodes
- the indeces of nodesedges
- the indeces of edgeschild_title
- the title of the new network.parent
- the parent of the this Networkcreate_view
- whether or not a view will be createdpublic static CyNetwork createNetwork(Collection nodes, Collection edges, String child_title, CyNetwork parent)
nodes
- the indeces of nodesedges
- the indeces of edgesparent
- the parent of the this Networkpublic static CyNetwork createNetwork(Collection nodes, Collection edges, String child_title, CyNetwork parent, boolean create_view)
nodes
- the indeces of nodesedges
- the indeces of edgesparent
- the parent of the this Networkcreate_view
- whether or not a view will be createdpublic static CyNetwork createNetworkFromFile(String location)
location
- the location of the filepublic static CyNetwork createNetworkFromFile(String location, boolean create_view)
location
- location of importable filecreate_view
- whether or not a view will be created
public static CyNetwork createNetwork(String location, int file_type, boolean canonicalize, BioDataServer biodataserver, String species)
This operation may take a long time to complete. It is a good idea NOT to call this method from the AWT event handling thread. A view will be created automatically.
location
- the location of the filefile_type
- the type of file GML, SIF, SBML, etc.canonicalize
- this will set the preferred display name to what is on the
server.biodataserver
- provides the name conversion servicespecies
- the species used by the BioDataServerpublic static CyNetwork createNetwork(cytoscape.data.readers.GraphReader reader, boolean create_view, CyNetwork parent)
This operation may take a long time to complete. It is a good idea NOT to call this method from the AWT event handling thread. This operation assumes the reader is of type .xgmml since this should only be called by the cessions reader which opens .xgmml files from the zipped cytoscape session.
reader
- the graphreader that will read in the networkcreate_view
- whether or not a view will be createdpublic static CytoscapeObj getCytoscapeObj()
public static cytoscape.data.GraphObjAttributes getNodeNetworkData()
getNodeAttributes()
instead. This
method will be removed in September, 2006.
public static cytoscape.data.GraphObjAttributes getEdgeNetworkData()
getEdgeAttributes()
instead. This
method will be removed in September, 2006.
public static CyAttributes getNodeAttributes()
public static CyAttributes getEdgeAttributes()
public static CyAttributes getNetworkAttributes()
public static ExpressionData getExpressionData()
public static void setExpressionData(ExpressionData expData)
public static boolean loadExpressionData(String filename, boolean copy_atts)
public static void loadAttributes(String[] nodeAttrLocations, String[] edgeAttrLocations, boolean canonicalize, BioDataServer bioDataServer, String species)
nodeAttrLocations
- an array of node attribute file locations. May be null.edgeAttrLocations
- an array of edge attribute file locations. May be null.canonicalize
- convert to the preffered name on the biodataserverbioDataServer
- provides the name conversion servicespecies
- the species to use with the bioDataServer'spublic static void loadAttributes(String[] nodeAttrLocations, String[] edgeAttrLocations)
nodeAttrLocations
- an array of node attribute file locations. May be null.edgeAttrLocations
- an array of edge attribute file locations. May be null.public static CyNetwork createNetworkFromProject(CyProject project, BioDataServer bioDataServer)
CyProject
public static BioDataServer loadBioDataServer(String location)
public static BioDataServer getBioDataServer()
public static CyNetworkView createNetworkView(CyNetwork network)
network
- the network to create a view ofpublic static CyNetworkView createNetworkView(CyNetwork network, String title)
network
- the network to create a view ofpublic static void firePropertyChange(String property_type, Object old_value, Object new_value)
public static void enableSquiggle()
public static void disableSquiggle()
public static boolean isSquiggleEnabled()
public static int getSelectionMode()
public static void setSelectionMode(int selectionMode)
selectionMode
- SELECT_NODES_ONLY, SELECT_EDGES_ONLY, or
SELECT_NODES_AND_EDGES.public static void setSelectionMode(int selectionMode, GraphView view)
selectionMode
- SELECT_NODES_ONLY, SELECT_EDGES_ONLY, or
SELECT_NODES_AND_EDGES.view
- the GraphView to set the selection mode on.public static String getCurrentSessionFileName()
public static void setCurrentSessionFileName(String newName)
newName
- public static void setSessionState(int state)
public static int getSessionstate()
public static void createNewSession()
|
www.cytoscape.org | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |