Cytoscape 2.8.0 API

cytoscape.data
Class Semantics

java.lang.Object
  extended by cytoscape.data.Semantics

public class Semantics
extends Object

This class defines names for certain data attributes that are commonly used within Cytoscape. The constants defined here are provided to enable different modules to use the same name when referring to the same conceptual attribute. This class also defines some static methods for assigning these attributes to a network, given the objects that serve as the source for this information. This is a logacy code. Use CANONICAL_NAME and INTERACTION only. Other values and functions are not in use Cytoscape.


Field Summary
static String BIOLOGICAL_PROCESS
          Deprecated. 
static String CANONICAL_NAME
          The name "CANONICAL_NAME" is an historical artifact.
static String CELLULAR_COMPONENT
          Deprecated. 
static String DNA
          Deprecated. 
static String GO_ALIASES
          Deprecated. 
static String GO_COMMON_NAME
          Deprecated. 
static String INTERACTION
          Represents edge type attribute.
static String MOLECULAR_FUNCTION
          Deprecated. 
static String MOLECULE_TYPE
          Deprecated. 
static String PROTEIN
          Deprecated. 
static String RNA
          Deprecated. 
static String SPECIES
          Deprecated. 
 
Constructor Summary
Semantics()
           
 
Method Summary
static void applyNamingServices(CyNetwork network)
          Deprecated. 
static boolean areSynonyms(String firstName, String secondName, CyNetwork network)
          Deprecated. 
static void assignCommonNames(CyNetwork network, BioDataServer bioDataServer)
          Deprecated. 
static void assignNodeAliases(CyNode node, String species, BioDataServer bds)
          Deprecated. 
static void assignSpecies(CyNetwork network)
          Deprecated. 
static List getAllSynonyms(String name, CyNetwork network)
          Deprecated. 
static String getInteractionType(CyNetwork network, Edge edge)
          Returns the interaction type of the given edge.
static String[] getInteractionTypes(CyNetwork network)
          Returns an array containing all of the unique interaction types present in the network.
static Set getSpeciesInNetwork(CyNetwork network)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANONICAL_NAME

public static final String CANONICAL_NAME
The name "CANONICAL_NAME" is an historical artifact. The ONLY purpose for this variable is to provide the name for an automatically created node attribute that is guaranteed to be created when the node is created. Any other purpose or function this value has supported in the past is officially no longer supported!

See Also:
Constant Field Values

INTERACTION

public static final String INTERACTION
Represents edge type attribute.

See Also:
Constant Field Values

GO_COMMON_NAME

@Deprecated
public static final String GO_COMMON_NAME
Deprecated. 
See Also:
Constant Field Values

GO_ALIASES

@Deprecated
public static final String GO_ALIASES
Deprecated. 
See Also:
Constant Field Values

SPECIES

@Deprecated
public static final String SPECIES
Deprecated. 
See Also:
Constant Field Values

MOLECULE_TYPE

@Deprecated
public static final String MOLECULE_TYPE
Deprecated. 
See Also:
Constant Field Values

PROTEIN

@Deprecated
public static final String PROTEIN
Deprecated. 
See Also:
Constant Field Values

DNA

@Deprecated
public static final String DNA
Deprecated. 
See Also:
Constant Field Values

RNA

@Deprecated
public static final String RNA
Deprecated. 
See Also:
Constant Field Values

MOLECULAR_FUNCTION

@Deprecated
public static final String MOLECULAR_FUNCTION
Deprecated. 
See Also:
Constant Field Values

BIOLOGICAL_PROCESS

@Deprecated
public static final String BIOLOGICAL_PROCESS
Deprecated. 
See Also:
Constant Field Values

CELLULAR_COMPONENT

@Deprecated
public static final String CELLULAR_COMPONENT
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

Semantics

public Semantics()
Method Detail

applyNamingServices

@Deprecated
public static void applyNamingServices(CyNetwork network)
Deprecated. 

This method should be called in the process of creating a new network, or upon loading a new bioDataServer. This method will use the bioDataServer to assign common names to the network using the synonym utilities of the bioDataServer. In the process, it will assign a species attribute for any name that does not currently have one. Currently, this method calls assignSpecies and assignCommonNames. At some point it may be desirable to check the configuration to see what to do, or put up a UI to prompt the user for what services they would like. KONO: 04/19/2006 Since attribute cannonical name no longer exists, these names should be created node identifiers.


assignSpecies

@Deprecated
public static void assignSpecies(CyNetwork network)
Deprecated. 

This method attempts to set a species attribute for every canonical name defined in the node attributes member of the supplied network. The value returned by getDefaultSpecies is used; if this return value is null, then this method exits without doing anything, as there is no species to set. If a canonical name already has an entry for the SPECIES attribute, then this method does not change that value. Otherwise, this method sets the value of that attribute to that returned by getDefaultSpecies. This method does nothing at all if either argument is null.


getSpeciesInNetwork

@Deprecated
public static Set getSpeciesInNetwork(CyNetwork network)
Deprecated. 

Returns every unique species defined in the supplied network. Searches the species attribute in the node attributes of the supplied network and returns a Set containing every unique value found.


assignNodeAliases

@Deprecated
public static void assignNodeAliases(CyNode node,
                                                String species,
                                                BioDataServer bds)
Deprecated. 

Use the given BioDataServer to set all of the aliases for a node, given its species.

Note: This is only for GO data!

Parameters:
node - the Node that will be assigned names
species - the species of the Node ( NOTE: if null, there will be a check to see if the node has a species set for attribute Semantics.SPECIES, if not, then the general Cytoscape defaultSpecies ( settable with -s ) will be used. )
bds - the given BioDataServer ( NOTE: if null, then the general Cytoscape BioDataServer will be used ( settable with -b ) ).

assignCommonNames

@Deprecated
public static void assignCommonNames(CyNetwork network,
                                                BioDataServer bioDataServer)
Deprecated. 

This method takes every canonical name defines in the node attributes of the given network, and attempts to assign a common name by getting a list of synonyms for the canonical name from the bioDataServer and using the first synonym as the common name. This operation requires the SPECIES attribute to be defined for the canonical name, as input to the bioDataServer. Any canonicalName that does not have this attribute defined is skipped. This method does nothing if either argument is null. Also, for any canonical name, this method does nothing if no synonyms for that name can be provided by the bioDataServer.


getInteractionTypes

public static String[] getInteractionTypes(CyNetwork network)
Returns an array containing all of the unique interaction types present in the network. Formally, gets from the edge attributes all of the unique values for the "interaction" attribute. If the argument is null, returns an array of length 0.


getInteractionType

public static String getInteractionType(CyNetwork network,
                                        Edge edge)
Returns the interaction type of the given edge. Formally, gets from the edge attributes the value for the "interaction" attribute". If either argument is null, returns null.


areSynonyms

@Deprecated
public static boolean areSynonyms(String firstName,
                                             String secondName,
                                             CyNetwork network)
Deprecated. 

This method is used to determine if two, potentially different names really refer to the same thing; that is, the two names are synonyms. The rules applied are as follows: 1) If either name is null, this method returns true if both are null, false otherwise. 2) If the names themselves match, this method returns true 3) The getAllSynonyms method is called for both names, to get all known synonyms. each possible pair of synonyms is compared, and this method returns true if any match is found, false otherwise. In all cases, comparisons are done with name1.equalsIgnoreCase(name2). The network and cytoscapeObj arguments may be null, which simply limits the tests that can be done to find synonyms.


getAllSynonyms

@Deprecated
public static List getAllSynonyms(String name,
                                             CyNetwork network)
Deprecated. 

This method returns a list of all names that are synonyms of the given name. The returned list will include the name argument itself, and thus will always be non-null and contain at least one member (unless the argument itself is null, in which case a list of size 0 is returned). The search for other names follows the following steps: First, if the network argument is non-null and the node attributes include the name argument as a canonical name, then add any entry for the COMMON_NAME attribute associated with the canonical name. Next, if a BioDataServer is available, try to get a species for the given name either from the SPECIES attribute associated with the canonicalName, or using the return value of getDefaultSpecies if needed. If a species can be determined, then use the BioDataServer to add all the synonyms that are registered for the name argument.


Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.