Cytoscape 2.8.2 API

cytoscape
Class Cytoscape

java.lang.Object
  extended by cytoscape.Cytoscape

public abstract class Cytoscape
extends Object

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.
protected static String currentNetworkID
           
protected static String currentNetworkViewID
           
static String CYTOSCAPE_EXIT
           
static String CYTOSCAPE_INITIALIZED
           
protected static CytoscapeRootGraph cytoscapeRootGraph
          The shared RootGraph between all Networks
static String DATASERVER_CHANGED
           
protected static CytoscapeDesktop defaultDesktop
           
static String EXPRESSION_DATA_LOADED
           
protected static ExpressionData expressionData
           
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
           
protected static CyLogger logger
           
static String NESTED_NETWORK_CREATED
          Fired every time a nested network is assigned to a node.
static String NESTED_NETWORK_DESTROYED
          Fired every time a nested network is removed from a node.
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
           
protected static Map<String,CyNetwork> networkMap
           
protected static Map<String,CyNetworkView> networkViewMap
           
static String NEW_ATTRS_LOADED
          Fired every time new attributes are loaded and provides the CyAttributes that was modified as well as a set of the new attribute names..
protected static PropertyChangeSupport newPcs
           
protected static CyNetwork nullNetwork
          A null CyNetwork to give when there is no Current Network
protected static CyNetworkView nullNetworkView
          A null CyNetworkView to give when there is no Current NetworkView
static String ONTOLOGY_ROOT
           
protected static String ontologyRootID
           
protected static SwingPropertyChangeSupport pcs
           
protected static Object pcs2
           
protected static Object pcsO
           
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
           
protected static LinkedList<CyNetwork> selectedNetworks
          The list analog to the currentNetworkID
protected static LinkedList<CyNetworkView> selectedNetworkViews
          The list analog to the currentNetworkViewID
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
           
protected static VisualMappingManager VMM
           
 
Constructor Summary
Cytoscape()
           
 
Method Summary
static void addNetwork(CyNetwork network, String title, CyNetwork parent, boolean create_view)
          Add a network to Cytoscape's internal list of networks.
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 network view.
static void destroyNetworkView(String networkViewID)
          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 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 EqnAttrTracker getEqnAttrTracker()
           
static ExpressionData getExpressionData()
          DOCUMENT ME!
static ImportHandler getImportHandler()
          DOCUMENT ME!
static CyNetwork getNetwork(String id)
           
static CyAttributes getNetworkAttributes()
          Gets Global Network Attributes.
protected static Map<String,CyNetwork> getNetworkMap()
          This Map has keys that are Strings ( network_ids ) and values that are networks.
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 RecentlyOpenedTracker getRecentlyOpenedSessionTracker()
           
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 boolean loadExpressionData(String filename, boolean copy_atts)
          Load Expression Data
static void setBookmarks(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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTES_CHANGED

public static String ATTRIBUTES_CHANGED
This signals when new attributes have been loaded and a few other large scale changes to attributes have been made. There is no equivalent in the CyAttributes events.


NETWORK_CREATED

public static String NETWORK_CREATED

DATASERVER_CHANGED

public static String DATASERVER_CHANGED

EXPRESSION_DATA_LOADED

public static String EXPRESSION_DATA_LOADED

NETWORK_DESTROYED

public static String NETWORK_DESTROYED

CYTOSCAPE_INITIALIZED

public static String CYTOSCAPE_INITIALIZED

CYTOSCAPE_EXIT

public static String CYTOSCAPE_EXIT

SESSION_SAVED

public static String SESSION_SAVED

SESSION_LOADED

public static String SESSION_LOADED

VIZMAP_RESTORED

public static String VIZMAP_RESTORED

SAVE_VIZMAP_PROPS

public static String SAVE_VIZMAP_PROPS

VIZMAP_LOADED

public static String VIZMAP_LOADED

SAVE_PLUGIN_STATE

public static final String SAVE_PLUGIN_STATE
See Also:
Constant Field Values

RESTORE_PLUGIN_STATE

public static final String RESTORE_PLUGIN_STATE
See Also:
Constant Field Values

NETWORK_MODIFIED

public static final String NETWORK_MODIFIED
See Also:
Constant Field Values

NETWORK_TITLE_MODIFIED

public static final String NETWORK_TITLE_MODIFIED
See Also:
Constant Field Values

NETWORK_SAVED

public static final String NETWORK_SAVED
See Also:
Constant Field Values

NETWORK_LOADED

public static final String NETWORK_LOADED
See Also:
Constant Field Values

ONTOLOGY_ROOT

public static final String ONTOLOGY_ROOT
See Also:
Constant Field Values

PREFERENCE_MODIFIED

public static final String PREFERENCE_MODIFIED
See Also:
Constant Field Values

PREFERENCES_UPDATED

public static final String PREFERENCES_UPDATED
See Also:
Constant Field Values

PROXY_MODIFIED

public static final String PROXY_MODIFIED
Specifies that the Proxy settings Cytoscape uses to connect to the internet have been changed.

See Also:
Constant Field Values

NESTED_NETWORK_CREATED

public static final String NESTED_NETWORK_CREATED
Fired every time a nested network is assigned to a node. This event contains the following values:

See Also:
Constant Field Values

NESTED_NETWORK_DESTROYED

public static final String NESTED_NETWORK_DESTROYED
Fired every time a nested network is removed from a node.

See Also:
Constant Field Values

NEW_ATTRS_LOADED

public static final String NEW_ATTRS_LOADED
Fired every time new attributes are loaded and provides the CyAttributes that was modified as well as a set of the new attribute names..

See Also:
Constant Field Values

FILE_BY_SUFFIX

public static int FILE_BY_SUFFIX
When creating a network, use one of the standard suffixes to have it parsed correctly


FILE_GML

public static int FILE_GML

FILE_SIF

public static int FILE_SIF

FILE_SBML

public static int FILE_SBML

FILE_XGMML

public static int FILE_XGMML

FILE_BIOPAX

public static int FILE_BIOPAX

FILE_PSI_MI

public static int FILE_PSI_MI

SELECT_NODES_ONLY

public static final int SELECT_NODES_ONLY
See Also:
Constant Field Values

SELECT_EDGES_ONLY

public static final int SELECT_EDGES_ONLY
See Also:
Constant Field Values

SELECT_NODES_AND_EDGES

public static final int SELECT_NODES_AND_EDGES
See Also:
Constant Field Values

SESSION_NEW

public static final Integer SESSION_NEW

SESSION_OPENED

public static final Integer SESSION_OPENED

SESSION_CHANGED

public static final Integer SESSION_CHANGED

SESSION_CLOSED

public static final int SESSION_CLOSED
See Also:
Constant Field Values

READER_CLIENT_KEY

public static final String READER_CLIENT_KEY
See Also:
Constant Field Values

cytoscapeRootGraph

protected static CytoscapeRootGraph cytoscapeRootGraph
The shared RootGraph between all Networks


expressionData

protected static ExpressionData expressionData

pcsO

protected static Object pcsO

pcs

protected static SwingPropertyChangeSupport pcs

pcs2

protected static Object pcs2

newPcs

protected static PropertyChangeSupport newPcs

networkViewMap

protected static Map<String,CyNetworkView> networkViewMap

networkMap

protected static Map<String,CyNetwork> networkMap

defaultDesktop

protected static CytoscapeDesktop defaultDesktop

currentNetworkID

protected static String currentNetworkID

currentNetworkViewID

protected static String currentNetworkViewID

ontologyRootID

protected static String ontologyRootID

nullNetwork

protected static CyNetwork nullNetwork
A null CyNetwork to give when there is no Current Network


selectedNetworkViews

protected static LinkedList<CyNetworkView> selectedNetworkViews
The list analog to the currentNetworkViewID


selectedNetworks

protected static LinkedList<CyNetwork> selectedNetworks
The list analog to the currentNetworkID


nullNetworkView

protected static final CyNetworkView nullNetworkView
A null CyNetworkView to give when there is no Current NetworkView


VMM

protected static VisualMappingManager VMM

logger

protected static CyLogger logger
Constructor Detail

Cytoscape

public Cytoscape()
Method Detail

getImportHandler

public static ImportHandler getImportHandler()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNullNetworkView

public static CyNetworkView getNullNetworkView()
Returns:
a nullNetworkView object. This is NOT simply a null object.

getNullNetwork

public static CyNetwork getNullNetwork()
Returns:
the nullNetwork CyNetwork. This is NOT simply a null object.

getEqnAttrTracker

public static EqnAttrTracker getEqnAttrTracker()

exit

public static void exit(int returnVal)
Shuts down Cytoscape, after giving plugins time to react.

Parameters:
returnVal - The return value. Zero indicates success, non-zero otherwise.

getSwingPropertyChangeSupport

public static SwingPropertyChangeSupport getSwingPropertyChangeSupport()
Bound events are:
  1. NETWORK_CREATED
  2. NETWORK_DESTROYED
  3. CYTOSCAPE_EXIT


getPropertyChangeSupport

public static PropertyChangeSupport getPropertyChangeSupport()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getVisualMappingManager

public static VisualMappingManager getVisualMappingManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getRootGraph

public static CytoscapeRootGraph getRootGraph()
Return the CytoscapeRootGraph


ensureCapacity

public static void ensureCapacity(int nodes,
                                  int edges)
Ensure the capacity of Cytoscapce. This is to prevent the inefficiency of adding nodes one at a time.


getCyNodesList

public static List getCyNodesList()
Returns:
all CyNodes that are present in Cytoscape

getCyEdgesList

public static List getCyEdgesList()
Returns:
all CyEdges that are present in Cytoscape

getCyNode

public static CyNode getCyNode(String alias)
Parameters:
alias - an alias of a node
Returns:
will return a node, if one exists for the given alias

getCyNode

public static CyNode getCyNode(String nodeID,
                               boolean create)
Parameters:
nodeID - an alias of a node
create - will create a node if one does not exist
Returns:
will always return a node, if create is true

getCyEdge

public 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. If the edge doesn't exist, then it creates an undirected edge. This method MIGHT be deprecated, or even removed, because Cytoscape shouldn't really be using undirected edges.

Parameters:
node_1 - one end of the edge
node_2 - the other end of the edge
attribute - 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
Returns:
returns an existing CyEdge if present, or creates one if create is true and attribute is Semantics.INTERACTION, otherwise returns null.

getCyEdge

public 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. If direction flag is set, then direction is taken into account, A->B is NOT equivalent to B->A

Parameters:
source - one end of the edge
target - the other end of the edge
attribute - 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
Returns:
returns an existing CyEdge if present, or creates one if create is true and attribute is Semantics.INTERACTION, otherwise returns null.

getCyEdge

public 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.

Parameters:
source_alias - an alias of a node
edge_name - the name of the node
target_alias - an alias of a node
Returns:
will always return an edge

getCurrentNetwork

public static CyNetwork getCurrentNetwork()
Return the Network that currently has the Focus. Can be different from getCurrentNetworkView


getNetworkSet

public static Set<CyNetwork> getNetworkSet()
Return a List of all available CyNetworks


getNetwork

public static CyNetwork getNetwork(String id)
Returns:
the CyNetwork that has the given identifier or the nullNetwork (see getNullNetwork()) if there is no such network.

getNetworkView

public static CyNetworkView getNetworkView(String network_id)
Returns:
a CyNetworkView for the given ID, if one exists, otherwise returns NullNetworkView

viewExists

public static boolean viewExists(String network_id)
Returns:
if a view exists for a given network id

getCurrentNetworkView

public static CyNetworkView getCurrentNetworkView()
Return the CyNetworkView that currently has the focus. Can be different from getCurrentNetwork


getSelectedNetworkViews

public static List<CyNetworkView> getSelectedNetworkViews()
Returns the list of currently selected networks.


setSelectedNetworkViews

public static void setSelectedNetworkViews(List<String> viewIDs)
Sets the selected network views.


getSelectedNetworks

public static List<CyNetwork> getSelectedNetworks()
Returns the list of selected networks.


setSelectedNetworks

public static void setSelectedNetworks(List<String> ids)
Sets the list of selected networks.


getDesktop

public static CytoscapeDesktop getDesktop()
Returns:
the reference to the One CytoscapeDesktop

setCurrentNetwork

public static void setCurrentNetwork(String id)

setCurrentNetworkView

public static boolean setCurrentNetworkView(String id)
Returns:
true if there is network view, false if not

getNetworkMap

protected static Map<String,CyNetwork> getNetworkMap()
This Map has keys that are Strings ( network_ids ) and values that are networks.


getNetworkViewMap

public static Map<String,CyNetworkView> getNetworkViewMap()
This Map has keys that are Strings ( network_ids ) and values that are networkviews.


destroyNetwork

public static void destroyNetwork(String network_id)
destroys the given network


destroyNetwork

public static void destroyNetwork(CyNetwork network)
destroys the given network


destroyNetwork

public static void destroyNetwork(CyNetwork network,
                                  boolean destroy_unique)
destroys the given network

Parameters:
network - the network to be destroyed
destroy_unique - if this is true, then all Nodes and Edges that are in this network, but no other are also destroyed.

destroyNetworkView

public static void destroyNetworkView(CyNetworkView view)
Destroys the network view.


destroyNetworkView

public static void destroyNetworkView(String networkViewID)
destroys the networkview, including any layout information


destroyNetworkView

public static void destroyNetworkView(CyNetwork network)
destroys the networkview, including any layout information


addNetwork

public static void addNetwork(CyNetwork network,
                              String title,
                              CyNetwork parent,
                              boolean create_view)
Add a network to Cytoscape's internal list of networks. This also fires the NETWORK_CREATED event and as a byproduct adds the network to the Network Panel.

Parameters:
network - the network to add
title - the title (name) of the network
parent - the parent of the network to be added
create_view - if true create the view for this network

createNetwork

public static CyNetwork createNetwork(String title)
Creates a new, empty Network.

Parameters:
title - the title of the new network.

createNetwork

public static CyNetwork createNetwork(String title,
                                      boolean create_view)
Creates a new, empty Network.

Parameters:
title - the title of the new network.
create_view - if the size of the network is under the node limit, create a view

createNetwork

public static CyNetwork createNetwork(String title,
                                      CyNetwork parent,
                                      boolean create_view)
Creates a new, empty Network.

Parameters:
title - the title of the new network.
create_view - if the size of the network is under the node limit, create a view

createNetwork

public static CyNetwork createNetwork(int[] nodes,
                                      int[] edges,
                                      String title)
Creates a new Network. A view will be created automatically.

Parameters:
nodes - the indeces of nodes
edges - the indeces of edges
title - the title of the new network.

createNetwork

public static CyNetwork createNetwork(Collection nodes,
                                      Collection edges,
                                      String title)
Creates a new Network. A view will be created automatically.

Parameters:
nodes - a collection of nodes
edges - a collection of edges
title - the title of the new network.

createNetwork

public static CyNetwork createNetwork(int[] nodes,
                                      int[] edges,
                                      String child_title,
                                      CyNetwork parent)
Creates a new Network, that inherits from the given ParentNetwork. A view will be created automatically.

Parameters:
nodes - the indeces of nodes
edges - the indeces of edges
child_title - the title of the new network.
parent - the parent of the this Network

createNetwork

public 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

Parameters:
nodes - the indeces of nodes
edges - the indeces of edges
child_title - the title of the new network.
parent - the parent of the this Network
create_view - whether or not a view will be created

createNetwork

public static CyNetwork createNetwork(Collection nodes,
                                      Collection edges,
                                      String child_title,
                                      CyNetwork parent)
Creates a new Network, that inherits from the given ParentNetwork. A view will be created automatically.

Parameters:
nodes - the indeces of nodes
edges - the indeces of edges
parent - the parent of the this Network

createNetwork

public 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.

Parameters:
nodes - the indeces of nodes
edges - the indeces of edges
parent - the parent of the this Network
create_view - whether or not a view will be created

createNetworkFromFile

public static CyNetwork createNetworkFromFile(String location)
Creates a CyNetwork from a file. The file type is determined by the suffix of the file.* Uses the new ImportHandler and thus the passed in location should be a file of a recognized "Graph Nature". The "Nature" of a file is a new way to tell what a file is beyond it's filetype e.g. galFiltered.sif is, in addition to being a .sif file, the file is also of Graph "Nature". Other files of Graph Nature include GML and XGMML. Beyond Graph Nature there are Node, Edge, and Properties Nature. A view will be created automatically.

Parameters:
location - the location of the file

createNetworkFromFile

public static CyNetwork createNetworkFromFile(String loc,
                                              boolean create_view)
Creates a CyNetwork from a file. The file type is determined by the suffix of the file.* Uses the new ImportHandler and thus the passed in location should be a file of a recognized "Graph Nature". The "Nature" of a file is a new way to tell what a file is beyond it's filetype e.g. galFiltered.sif is, in addition to being a .sif file, the file is also of Graph "Nature". Other files of Graph Nature include GML and XGMML. Beyond Graph Nature there are Node, Edge, and Properties Nature.

Parameters:
loc - location of importable file
create_view - whether or not a view will be created
Returns:
a network based on the specified file or null if the file type is supported but the file is not of Graph Nature.

createNetworkFromURL

public static CyNetwork createNetworkFromURL(URL url,
                                             boolean create_view)
Creates a CyNetwork from a URL. The file type is determined by the suffix of the file or, if one does't exist, the contentType of the data. Uses the new ImportHandler and thus the passed in location should be a file of a recognized "Graph Nature". The "Nature" of a file is a new way to tell what a file is beyond it's filetype e.g. galFiltered.sif is, in addition to being a .sif file, the file is also of Graph "Nature". Other files of Graph Nature include GML and XGMML. Beyond Graph Nature there are Node, Edge, and Properties Nature.

Parameters:
url - url of importable file
create_view - whether or not a view will be created
Returns:
a network based on the specified file or null if the file type is supported but the file is not of Graph Nature.

createNetwork

public static CyNetwork createNetwork(GraphReader reader,
                                      boolean create_view,
                                      CyNetwork parent)
Creates a cytoscape.data.CyNetwork from a reader. Neccesary with cesssions.

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.

Parameters:
reader - the graphreader that will read in the network
create_view - whether or not a view will be created

getNodeAttributes

public static CyAttributes getNodeAttributes()
Gets Global Node Attributes.

Returns:
CyAttributes Object.

getEdgeAttributes

public static CyAttributes getEdgeAttributes()
Gets Global Edge Attributes

Returns:
CyAttributes Object.

getNetworkAttributes

public static CyAttributes getNetworkAttributes()
Gets Global Network Attributes.

Returns:
CyAttributes Object.

getOntologyAttributes

public static CyAttributes getOntologyAttributes()
Gets Global Network Attributes.

Returns:
CyAttributes Object.

getExpressionData

public static ExpressionData getExpressionData()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setExpressionData

public static void setExpressionData(ExpressionData expData)
DOCUMENT ME!

Parameters:
expData - DOCUMENT ME!

loadExpressionData

public static boolean loadExpressionData(String filename,
                                         boolean copy_atts)
Load Expression Data


loadAttributes

public static void loadAttributes(String[] nodeAttrLocations,
                                  String[] edgeAttrLocations)
Loads Node and Edge attribute data into Cytoscape from the given file locations. Currently, the only supported attribute types are of the type "name = value".

Parameters:
nodeAttrLocations - an array of node attribute file locations. May be null.
edgeAttrLocations - an array of edge attribute file locations. May be null.

buildOntologyServer

public static OntologyServer buildOntologyServer()
This will replace the bioDataServer.


getOntologyServer

public static OntologyServer getOntologyServer()
DOCUMENT ME!

Returns:
DOCUMENT ME!

createNetworkView

public static CyNetworkView createNetworkView(CyNetwork network)
Creates a CyNetworkView, but doesn't do anything with it. Ifnn's you want to use it

Parameters:
network - the network to create a view of

createNetworkView

public static CyNetworkView createNetworkView(CyNetwork network,
                                              String title)
Creates a CyNetworkView, but doesn't do anything with it. Ifnn's you want to use it

Parameters:
network - the network to create a view of
title - the title to use for the view

createNetworkView

public static CyNetworkView createNetworkView(CyNetwork network,
                                              String title,
                                              CyLayoutAlgorithm layout)
Creates a CyNetworkView, but doesn't do anything with it. Ifnn's you want to use it

Parameters:
network - the network to create a view of
title - the title to use for the view
layout - the CyLayoutAlgorithm to use to lay this out by default

createNetworkView

public 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. The CyNetworkView will become the current view and have focus.

Parameters:
network - the network to create a view of
title - the title to use for the view
layout - 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.

firePropertyChange

public static void firePropertyChange(String property_type,
                                      Object old_value,
                                      Object new_value)
DOCUMENT ME!

Parameters:
property_type - DOCUMENT ME!
old_value - DOCUMENT ME!
new_value - DOCUMENT ME!

getSelectionMode

public static int getSelectionMode()
Gets the selection mode value.


setSelectionMode

public static void setSelectionMode(int selectionMode)
Sets the specified selection mode on all views.

Parameters:
selectionMode - SELECT_NODES_ONLY, SELECT_EDGES_ONLY, or SELECT_NODES_AND_EDGES.

setSelectionMode

public static void setSelectionMode(int selectionMode,
                                    GraphView view)
Utility method to set the selection mode on the specified GraphView.

Parameters:
selectionMode - SELECT_NODES_ONLY, SELECT_EDGES_ONLY, or SELECT_NODES_AND_EDGES.
view - the GraphView to set the selection mode on.

getCurrentSessionFileName

public static String getCurrentSessionFileName()
Get name of the current session file.

Returns:
current session file name

setCurrentSessionFileName

public static void setCurrentSessionFileName(String newName)
Set the current session name.

Parameters:
newName -

setSessionState

public static void setSessionState(int state)
DOCUMENT ME!

Parameters:
state - DOCUMENT ME!

getSessionstate

public static int getSessionstate()
DOCUMENT ME!

Returns:
DOCUMENT ME!

createNewSession

public static void createNewSession()
Clear all networks and attributes and start a new session.


getOntologyRootID

public static String getOntologyRootID()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setOntologyRootID

public static void setOntologyRootID(String id)
DOCUMENT ME!

Parameters:
id - DOCUMENT ME!

getBookmarks

public static Bookmarks getBookmarks()
                              throws JAXBException,
                                     IOException
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
JAXBException - DOCUMENT ME!
IOException - DOCUMENT ME!

setBookmarks

public static void setBookmarks(Bookmarks pBookmarks)
DOCUMENT ME!

Parameters:
pBookmarks - DOCUMENT ME!

getRecentlyOpenedSessionTracker

public static RecentlyOpenedTracker getRecentlyOpenedSessionTracker()

Cytoscape 2.8.2 API

Copyright 2010 Cytoscape Consortium. All rights reserved.