procope.data
Class LocalizationData

java.lang.Object
  extended by procope.data.LocalizationData

public class LocalizationData
extends Object

A set of cellular localization information for proteins.

Colocalization of two proteins means that they share at least one localization in the given data set.

Localizations might be for instance, nuclear, ER, cytoplasmatic etc.

Author:
Jan Krumsiek
See Also:
Colocalization, LocalizationDataReader, ROC.calculateROCCurves(java.util.List, procope.data.complexes.ComplexSet, procope.data.complexes.ComplexSet, LocalizationData, boolean)

Constructor Summary
LocalizationData()
          Creates an empty localization data set.
 
Method Summary
 void addLocalization(int protein, String localization)
          Annotate a protein with a given localization.
 byte areColocalized(int protein1, int protein2)
          Determines whether two proteins are colocalized.
 String getLocalizationName(int id)
          Returns the name of a localization for a given internal integer ID
 Collection<Integer> getLocalizations(int protein)
          Get the set of localizations for a given protein.
 int getNumberOfLocalizations()
          Returns the number of different localizations in the dataset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalizationData

public LocalizationData()
Creates an empty localization data set.

Method Detail

areColocalized

public byte areColocalized(int protein1,
                           int protein2)
Determines whether two proteins are colocalized.

Parameters:
protein1 - first protein
protein2 - second protein
Returns:
1 if the proteins are colocalized, 0 if they are not colocalized and -1 if at least one protein has no localization information and thus colocalization cannot be determined

getLocalizations

public Collection<Integer> getLocalizations(int protein)
Get the set of localizations for a given protein. Returns a list of internal integer identifiers. The actual name of that localization can be determined using getLocalizationName(int).

Parameters:
protein - protein for which localizations are retrieved
Returns:
list of localizations for the given proteins (internal integer IDs) or null if there are no localization information for the given protein

getLocalizationName

public String getLocalizationName(int id)
Returns the name of a localization for a given internal integer ID

Parameters:
id - internal integer ID
Returns:
name of that localization or null if that internal ID is not assigned

getNumberOfLocalizations

public int getNumberOfLocalizations()
Returns the number of different localizations in the dataset

Returns:
number of localizations in the set

addLocalization

public void addLocalization(int protein,
                            String localization)
Annotate a protein with a given localization.

Parameters:
protein - protein to be annotated
localization - localization string