Data Integrator (Python API)
Public Member Functions | List of all members
cls.AnnotationCorpus.CAnnotationCorpus Class Reference

Annotation corpus. More...

Inheritance diagram for cls.AnnotationCorpus.CAnnotationCorpus:
Inheritance graph
[legend]
Collaboration diagram for cls.AnnotationCorpus.CAnnotationCorpus:
Collaboration graph
[legend]

Public Member Functions

def __init__ (s, name)
 
def Add (s, goID, elemName)
 Add a ontology/entity relationship. More...
 
def GetGOIDs (s)
 Get all ontology identifiers. More...
 
def GetElementsByGOID (s, goID)
 Get all elements associated with a particular ontology term. More...
 
def Merge (s, ac)
 Update this corpus with the contents of another corpus. More...
 
def GetElementCount (s, goID)
 Get the number of elements associated with a particular ontology term. More...
 
def GetGOIDsByElement (s, elemName)
 Get the ontology identifiers associated with an element. More...
 
def GetElements (s)
 Get all entities associated with GO IDs. More...
 
def Read (s, ffn)
 Read a simplified annotation corpus data file. More...
 
def Write (s, ffn)
 Store annotation corpus to a file. More...
 

Detailed Description

Annotation corpus.

This class holds both mappings from GO IDs to associated entities
(eg. proteins) and vice versa. For large corpora, this can be very memory
demanding!

Constructor & Destructor Documentation

◆ __init__()

def cls.AnnotationCorpus.CAnnotationCorpus.__init__ (   s,
  name 
)
     @param name Namespace name, eg. 'biological_process'.

Member Function Documentation

◆ Add()

def cls.AnnotationCorpus.CAnnotationCorpus.Add (   s,
  goID,
  elemName 
)

Add a ontology/entity relationship.

    @param goID  Ontology identifier, usually the GO ID.
    @param elemName  Element name the ontology identifier is associated
     with, usually a protein accession number.

◆ GetElementCount()

def cls.AnnotationCorpus.CAnnotationCorpus.GetElementCount (   s,
  goID 
)

Get the number of elements associated with a particular ontology term.

Parameters
goIDOntology identifier, usually the GO ID.
Returns
(int) Can be zero if goID has not been associated with any element.

◆ GetElements()

def cls.AnnotationCorpus.CAnnotationCorpus.GetElements (   s)

Get all entities associated with GO IDs.

    Report all elements that have been associated with a GO ID.
    @return @c List of @c strings.

◆ GetElementsByGOID()

def cls.AnnotationCorpus.CAnnotationCorpus.GetElementsByGOID (   s,
  goID 
)

Get all elements associated with a particular ontology term.

    @param goID  Ontology identifier, usually the GO ID.
    @return A list of element names (@c strings). Can be empty if @c goID
    has not been associated with any element.

◆ GetGOIDs()

def cls.AnnotationCorpus.CAnnotationCorpus.GetGOIDs (   s)

Get all ontology identifiers.

    Report all GO identifiers that have been associated with an element.
    @return @c List of @c strings.

◆ GetGOIDsByElement()

def cls.AnnotationCorpus.CAnnotationCorpus.GetGOIDsByElement (   s,
  elemName 
)

Get the ontology identifiers associated with an element.

    @param elemName  Element name the ontology identifier to be queried,
    usually a protein accession number.
    @return @c List of GO IDs (@c strings).

◆ Merge()

def cls.AnnotationCorpus.CAnnotationCorpus.Merge (   s,
  ac 
)

Update this corpus with the contents of another corpus.

    @param ac  A @ref CAnnotationCorpus object.

◆ Read()

def cls.AnnotationCorpus.CAnnotationCorpus.Read (   s,
  ffn 
)

Read a simplified annotation corpus data file.

    Reads ontology/entity relationships previously dumped by the @ref
    Write method of this object. Does not read GAF files.
    @param ffn  Full path file name, must be writable.

◆ Write()

def cls.AnnotationCorpus.CAnnotationCorpus.Write (   s,
  ffn 
)

Store annotation corpus to a file.

    Dumps a tab-separated file for quick reading of this annotation
    corpus. This should not be confused with cls.GAFReader.CGAFReader, as
    this method here stores only ontology/entity relationships deposited
    in this object without any additional information as would be done for
    GAF files.
    @param ffn  Full path file name, must be writable.

The documentation for this class was generated from the following file: