|
Cytoscape 2.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.
| Field Summary | |
static String |
ATTRIBUTES_CHANGED
|
static String |
CYTOSCAPE_EXIT
|
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 |
static int |
FILE_GML
|
static int |
FILE_SBML
|
static int |
FILE_SIF
|
static String |
NETWORK_CREATED
|
static String |
NETWORK_DESTROYED
|
| 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(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(String title)
Creates a new, empty Network. |
static CyNetwork |
createNetwork(String location,
int file_type,
boolean canonicalize,
BioDataServer biodataserver,
String species)
Creates a cytoscape.data.CyNetwork from a file. |
static CyNetwork |
createNetworkFromFile(String location)
Creates a cytoscape.data.CyNetwork from a file. |
static CyNetwork |
createNetworkFromProject(CyProject project,
BioDataServer bioDataServer)
Constructs a network using information from a CyProject argument that contains information on the location of the graph file, any node/edge attribute files, and a possible expression data file. |
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 |
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()
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 CyEdge |
getCyEdge(Node node_1,
Node node_2,
String attribute,
Object attribute_value,
boolean create)
Gets the first CyEdge found. |
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 alias,
boolean create)
|
static List |
getCyNodesList()
|
static CytoscapeObj |
getCytoscapeObj()
Deprecated. |
static CytoscapeDesktop |
getDesktop()
|
static String[] |
getEdgeAttributesList()
Return all availble Attributes for the Edges in this CyNetwork |
static Object |
getEdgeAttributeValue(Edge edge,
String attribute)
Return the requested Attribute for the given Edge |
static cytoscape.data.GraphObjAttributes |
getEdgeNetworkData()
Deprecated. This should not be used by any user-code |
static ExpressionData |
getExpressionData()
|
static CyNetwork |
getNetwork(String id)
|
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 String[] |
getNodeAttributesList()
Return all availble Attributes for the Nodes in this CyNetwork |
static String[] |
getNodeAttributesList(Edge[] edges)
Return all available Attributes for the given Edges |
static String[] |
getNodeAttributesList(Node[] nodes)
Return all available Attributes for the given Nodes |
static Object |
getNodeAttributeValue(Node node,
String attribute)
Return the requested Attribute for the given Node |
static cytoscape.data.GraphObjAttributes |
getNodeNetworkData()
Deprecated. This should not be used by any user-code |
static cytoscape.giny.CytoscapeRootGraph |
getRootGraph()
Return the CytoscapeRootGraph |
static SwingPropertyChangeSupport |
getSwingPropertyChangeSupport()
Bound events are: NETWORK_CREATED NETWORK_DESTROYED ATTRIBUTES_ADDED CYTOSCAPE_EXIT |
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 boolean |
setEdgeAttributeValue(Edge edge,
String attribute,
Object value)
Return the requested Attribute for the given Edge |
static void |
setExpressionData(ExpressionData expData)
|
static boolean |
setNodeAttributeValue(Node node,
String attribute,
Object value)
Return the requested Attribute for the given Node |
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
public static String NETWORK_DESTROYED
public static String CYTOSCAPE_EXIT
public static int FILE_BY_SUFFIX
public static int FILE_GML
public static int FILE_SIF
public static int FILE_SBML
| Constructor Detail |
public Cytoscape()
| Method Detail |
public static void exit()
public static SwingPropertyChangeSupport getSwingPropertyChangeSupport()
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 alias,
boolean create)
alias - an alias of a nodecreate - will create a node if one does not exist
create is true
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.INTERACTIONattribute_value - a value for the attribute, like "pp"create - will create an edge if one does not exist
create is true, 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)
node - the given CyNodeattribute - the name of the requested attribute
public static Object getEdgeAttributeValue(Edge edge,
String attribute)
public static String[] getNodeAttributesList()
public static String[] getNodeAttributesList(Node[] nodes)
public static String[] getEdgeAttributesList()
public static String[] getNodeAttributesList(Edge[] edges)
public static boolean setNodeAttributeValue(Node node,
String attribute,
Object value)
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)
public static void setSpecies()
public static CyNetwork getCurrentNetwork()
public static Set getNetworkSet()
public static CyNetwork getNetwork(String id)
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(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.
public static CyNetwork createNetwork(Collection nodes,
Collection edges,
String child_title,
CyNetwork parent)
nodes - the indeces of nodesedges - the indeces of edgespublic static CyNetwork createNetworkFromFile(String location)
location - the location of the file
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.
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 CytoscapeObj getCytoscapeObj()
public static cytoscape.data.GraphObjAttributes getNodeNetworkData()
public static cytoscape.data.GraphObjAttributes getEdgeNetworkData()
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's
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 CyNetwork createNetworkFromProject(CyProject project,
BioDataServer bioDataServer)
CyProjectpublic static BioDataServer loadBioDataServer(String location)
public static BioDataServer getBioDataServer()
public static CyNetworkView createNetworkView(CyNetwork network)
network - the network to create a view of
public static CyNetworkView createNetworkView(CyNetwork network,
String title)
network - the network to create a view of
public static void firePropertyChange(String property_type,
Object old_value,
Object new_value)
|
www.cytoscape.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||