|
Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.Cytoscape
public abstract class 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.
Field Summary | |
---|---|
static String |
ATTRIBUTES_CHANGED
This signals when new attributes have been loaded and a few other large scale changes to attributes have been made. |
static String |
CYTOSCAPE_EXIT
|
static String |
CYTOSCAPE_INITIALIZED
|
static String |
DATASERVER_CHANGED
|
static String |
EXPRESSION_DATA_LOADED
|
static int |
FILE_BIOPAX
|
static int |
FILE_BY_SUFFIX
When creating a network, use one of the standard suffixes to have it parsed correctly sif -- Simple Interaction File gml -- Graph Markup Languange sbml -- SBML xgmml -- XGMML |
static int |
FILE_GML
|
static int |
FILE_PSI_MI
|
static int |
FILE_SBML
|
static int |
FILE_SIF
|
static int |
FILE_XGMML
|
static String |
NETWORK_CREATED
|
static String |
NETWORK_DESTROYED
|
static String |
NETWORK_LOADED
|
static String |
NETWORK_MODIFIED
|
static String |
NETWORK_SAVED
|
static String |
NETWORK_TITLE_MODIFIED
|
static String |
ONTOLOGY_ROOT
|
static String |
PREFERENCE_MODIFIED
|
static String |
PREFERENCES_UPDATED
|
static String |
PROXY_MODIFIED
Specifies that the Proxy settings Cytoscape uses to connect to the internet have been changed. |
static String |
READER_CLIENT_KEY
|
static String |
RESTORE_PLUGIN_STATE
|
static String |
SAVE_PLUGIN_STATE
|
static String |
SAVE_VIZMAP_PROPS
|
static int |
SELECT_EDGES_ONLY
|
static int |
SELECT_NODES_AND_EDGES
|
static int |
SELECT_NODES_ONLY
|
static Integer |
SESSION_CHANGED
|
static int |
SESSION_CLOSED
|
static String |
SESSION_LOADED
|
static Integer |
SESSION_NEW
|
static Integer |
SESSION_OPENED
|
static String |
SESSION_SAVED
|
static String |
VIZMAP_LOADED
|
static String |
VIZMAP_RESTORED
|
Constructor Summary | |
---|---|
Cytoscape()
|
Method Summary | |
---|---|
static OntologyServer |
buildOntologyServer()
This will replace the bioDataServer. |
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(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 title,
CyNetwork parent,
boolean create_view)
Creates a new, empty Network. |
static CyNetwork |
createNetworkFromFile(String location)
Creates a CyNetwork from a file. |
static CyNetwork |
createNetworkFromFile(String loc,
boolean create_view)
Creates a CyNetwork from a file. |
static CyNetwork |
createNetworkFromURL(URL url,
boolean create_view)
Creates a CyNetwork from a URL. |
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 CyNetworkView |
createNetworkView(CyNetwork network,
String title,
CyLayoutAlgorithm layout)
Creates a CyNetworkView, but doesn't do anything with it. |
static CyNetworkView |
createNetworkView(CyNetwork network,
String title,
CyLayoutAlgorithm layout,
VisualStyle vs)
Creates a CyNetworkView that is placed placed in a given visual style and rendered with a given layout algorithm. |
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 |
ensureCapacity(int nodes,
int edges)
Ensure the capacity of Cytoscapce. |
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)
DOCUMENT ME! |
static BioDataServer |
getBioDataServer()
|
static cytoscape.bookmarks.Bookmarks |
getBookmarks()
DOCUMENT ME! |
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)
Returns and edge if it exists, otherwise creates a directed edge. |
static List |
getCyEdgesList()
|
static CyNode |
getCyNode(String alias)
|
static CyNode |
getCyNode(String nodeID,
boolean create)
|
static List |
getCyNodesList()
|
static CytoscapeDesktop |
getDesktop()
|
static CyAttributes |
getEdgeAttributes()
Gets Global Edge Attributes |
static ExpressionData |
getExpressionData()
DOCUMENT ME! |
static ImportHandler |
getImportHandler()
DOCUMENT ME! |
static CyNetwork |
getNetwork(String id)
|
static CyAttributes |
getNetworkAttributes()
Gets Global Network Attributes. |
static Set<CyNetwork> |
getNetworkSet()
Return a List of all available CyNetworks |
static CyNetworkView |
getNetworkView(String network_id)
|
static Map<String,CyNetworkView> |
getNetworkViewMap()
This Map has keys that are Strings ( network_ids ) and values that are networkviews. |
static CyAttributes |
getNodeAttributes()
Gets Global Node Attributes. |
static CyNetwork |
getNullNetwork()
|
static CyNetworkView |
getNullNetworkView()
|
static CyAttributes |
getOntologyAttributes()
Gets Global Network Attributes. |
static String |
getOntologyRootID()
DOCUMENT ME! |
static OntologyServer |
getOntologyServer()
DOCUMENT ME! |
static PropertyChangeSupport |
getPropertyChangeSupport()
DOCUMENT ME! |
static CytoscapeRootGraph |
getRootGraph()
Return the CytoscapeRootGraph |
static List<CyNetwork> |
getSelectedNetworks()
Returns the list of selected networks. |
static List<CyNetworkView> |
getSelectedNetworkViews()
Returns the list of currently selected networks. |
static int |
getSelectionMode()
Gets the selection mode value. |
static int |
getSessionstate()
DOCUMENT ME! |
static SwingPropertyChangeSupport |
getSwingPropertyChangeSupport()
Bound events are: NETWORK_CREATED NETWORK_DESTROYED CYTOSCAPE_EXIT |
static VisualMappingManager |
getVisualMappingManager()
DOCUMENT ME! |
static void |
loadAttributes(String[] nodeAttrLocations,
String[] edgeAttrLocations)
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 |
setBookmarks(cytoscape.bookmarks.Bookmarks pBookmarks)
DOCUMENT ME! |
static void |
setCurrentNetwork(String id)
|
static boolean |
setCurrentNetworkView(String id)
|
static void |
setCurrentSessionFileName(String newName)
Set the current session name. |
static void |
setExpressionData(ExpressionData expData)
DOCUMENT ME! |
static void |
setOntologyRootID(String id)
DOCUMENT ME! |
static void |
setSelectedNetworks(List<String> ids)
Sets the list of selected networks. |
static void |
setSelectedNetworkViews(List<String> viewIDs)
Sets the selected network views. |
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)
DOCUMENT ME! |
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 ATTRIBUTES_CHANGED
public static String NETWORK_CREATED
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 SAVE_PLUGIN_STATE
public static final String RESTORE_PLUGIN_STATE
public static final String NETWORK_MODIFIED
public static final String NETWORK_TITLE_MODIFIED
public static final String NETWORK_SAVED
public static final String NETWORK_LOADED
public static final String ONTOLOGY_ROOT
public static final String PREFERENCE_MODIFIED
public static final String PREFERENCES_UPDATED
public static final String PROXY_MODIFIED
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 int FILE_BIOPAX
public static int FILE_PSI_MI
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 Integer SESSION_NEW
public static final Integer SESSION_OPENED
public static final Integer SESSION_CHANGED
public static final int SESSION_CLOSED
public static final String READER_CLIENT_KEY
Constructor Detail |
---|
public Cytoscape()
Method Detail |
---|
public static ImportHandler getImportHandler()
public static CyNetworkView getNullNetworkView()
public static CyNetwork getNullNetwork()
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 CytoscapeRootGraph getRootGraph()
public static void ensureCapacity(int nodes, int edges)
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 truepublic 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 CyNetwork getCurrentNetwork()
public static Set<CyNetwork> 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 List<CyNetworkView> getSelectedNetworkViews()
public static void setSelectedNetworkViews(List<String> viewIDs)
public static List<CyNetwork> getSelectedNetworks()
public static void setSelectedNetworks(List<String> ids)
public static CytoscapeDesktop getDesktop()
public static void setCurrentNetwork(String id)
public static boolean setCurrentNetworkView(String id)
public static Map<String,CyNetworkView> 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 to be 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(String title, CyNetwork parent, 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 loc, boolean create_view)
loc
- location of importable filecreate_view
- whether or not a view will be created
public static CyNetwork createNetworkFromURL(URL url, boolean create_view)
url
- url of importable filecreate_view
- whether or not a view will be created
public static CyNetwork createNetwork(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 CyAttributes getNodeAttributes()
public static CyAttributes getEdgeAttributes()
public static CyAttributes getNetworkAttributes()
public static CyAttributes getOntologyAttributes()
public static ExpressionData getExpressionData()
public static void setExpressionData(ExpressionData expData)
expData
- DOCUMENT ME!public static boolean loadExpressionData(String filename, boolean copy_atts)
public 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 BioDataServer loadBioDataServer(String location)
public static BioDataServer getBioDataServer()
public static OntologyServer buildOntologyServer()
public static OntologyServer getOntologyServer()
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 oftitle
- the title to use for the viewpublic static CyNetworkView createNetworkView(CyNetwork network, String title, CyLayoutAlgorithm layout)
network
- the network to create a view oftitle
- the title to use for the viewlayout
- the CyLayoutAlgorithm to use to lay this out by defaultpublic static CyNetworkView createNetworkView(CyNetwork network, String title, CyLayoutAlgorithm layout, VisualStyle vs)
network
- the network to create a view oftitle
- the title to use for the viewlayout
- the CyLayoutAlgorithm to use for layout. If null, will
use the default layout (CyLayouts.getDefaultLayout()).vs
- the VisualStyle in which to render this new network. If null,
the default visual style will be used.public static void firePropertyChange(String property_type, Object old_value, Object new_value)
property_type
- DOCUMENT ME!old_value
- DOCUMENT ME!new_value
- DOCUMENT ME!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)
state
- DOCUMENT ME!public static int getSessionstate()
public static void createNewSession()
public static String getOntologyRootID()
public static void setOntologyRootID(String id)
id
- DOCUMENT ME!public static cytoscape.bookmarks.Bookmarks getBookmarks() throws javax.xml.bind.JAXBException, IOException
javax.xml.bind.JAXBException
- DOCUMENT ME!
IOException
- DOCUMENT ME!public static void setBookmarks(cytoscape.bookmarks.Bookmarks pBookmarks)
pBookmarks
- DOCUMENT ME!
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |