procope.evaluation.complexquality.go
Class GOAnnotations

java.lang.Object
  extended by procope.evaluation.complexquality.go.GOAnnotations
All Implemented Interfaces:
ProteinSet

public class GOAnnotations
extends Object
implements ProteinSet

Represents a set of gene-product to GO-term annotations which are normally read from a file.

Author:
Jan Krumsiek

Constructor Summary
GOAnnotations()
          Create new empty GO annotations object.
 
Method Summary
 void addAnnotation(int protein, String term)
          Adds the annotation of a given protein to a GO term.
 int getAnnotationCount(String term)
          Returns the number of gene products annotated to a given GO term
 Set<String> getGOTerms(int protein)
          Returns a set of identifiers of GO terms which are annotated to a given protein.
 Set<Integer> getProteins()
          Returns the proteins which are used in this annotation set.
 boolean isAnnotated(int protein, String term)
          Checks whether a protein is annotated to a GO term.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GOAnnotations

public GOAnnotations()
Create new empty GO annotations object.

Method Detail

addAnnotation

public void addAnnotation(int protein,
                          String term)
Adds the annotation of a given protein to a GO term.

Parameters:
protein - protein for which the term is annotated
term - identifier of the annotated GO term

getAnnotationCount

public int getAnnotationCount(String term)
Returns the number of gene products annotated to a given GO term

Parameters:
term - identifier of the GO term
Returns:
number of annotations to this term

getGOTerms

public Set<String> getGOTerms(int protein)
Returns a set of identifiers of GO terms which are annotated to a given protein.

Parameters:
protein - protein for which the GO terms will be retrieved
Returns:
set of GO term identifiers associated with the given protein

isAnnotated

public boolean isAnnotated(int protein,
                           String term)
Checks whether a protein is annotated to a GO term.

Parameters:
protein - protein for which an annotation is checked
term - identifier of the GO term
Returns:
whether the given protein is annotated to the GO term

getProteins

public Set<Integer> getProteins()
Returns the proteins which are used in this annotation set.

Specified by:
getProteins in interface ProteinSet
Returns:
a set of internal IDs