Sleipnir
Public Member Functions
Sleipnir::COntologyMIPS Class Reference

Implements IOntology for the MIPS functional catalog. More...

#include <annotation.h>

Inheritance diagram for Sleipnir::COntologyMIPS:
Sleipnir::COntologyMIPSImpl Sleipnir::IOntology Sleipnir::COntologyImpl Sleipnir::COntologyMIPSPhenotypes

Public Member Functions

bool Open (std::istream &istmOntology, std::istream &istmAnnotations, CGenome &Genome)
 Initializes the ontology using the "funcat" scheme (structure) and annotation files.
void GetGeneNames (std::vector< std::string > &vecstrGenes) const
 Obtain the primary gene names for all genes in the ontology.
void TermFinder (const CGenes &Genes, std::vector< STermFound > &vecsTerms, bool fBonferroni=true, bool fRecursive=true, bool fGenome=false, float dPValue=1, const CGenes *pBackground=NULL) const
 Uses the hypergeometric distribution to find functional enrichments of the given gene set.
size_t GetNode (const std::string &strID) const
 Returns the ontology term index corresponding to the given ontology-specific ID string.
bool IsAnnotated (size_t iTerm, const CGene &Gene, bool fRecursive) const
 Indicates whether the given gene is annotated to or (optionally) below the given term.
size_t GetNodes () const
 Returns the number of nodes (terms) in the ontology.
const std::string & GetID () const
 Returns string identifier of the encapsulated ontology.
const std::string & GetID (size_t iTerm) const
 Returns the ontology-specific ID string of the requested term.
const std::string & GetGloss (size_t iTerm) const
 Returns the ontology-specific description of the requested term.
size_t GetParents (size_t iTerm) const
 Returns the number of parents of the requested term.
size_t GetParent (size_t iTerm, size_t iParent) const
 Returns the ontology term index of the requested parent of the requested term.
size_t GetChildren (size_t iTerm) const
 Returns the number of children of the requested term.
size_t GetChild (size_t iTerm, size_t iChild) const
 Returns the ontology term index of the requested child of the requested term.
size_t GetGenes (size_t iTerm, bool fRecursive) const
 Returns the number of genes annotated to or (optionally) below this term.
const CGeneGetGene (size_t iTerm, size_t iGene) const
 Returns the requested gene annotated to or below the given term.
bool GetParents (size_t iTerm, std::set< size_t > &setiParents) const
 Retrieves the parent term IDs of the requested term.
bool GetChildren (size_t iTerm, std::set< size_t > &setiChildren) const
 Retrieves the descendant term IDs of the requested term.

Detailed Description

Implements IOntology for the MIPS functional catalog.

COntologyMIPS parses the "funcat" structure and annotation files from the Munich Information center for Protein Sequences.

Definition at line 548 of file annotation.h.


Member Function Documentation

size_t Sleipnir::COntologyMIPS::GetChild ( size_t  iTerm,
size_t  iChild 
) const [inline, virtual]

Returns the ontology term index of the requested child of the requested term.

Parameters:
iTermIndex of ontology term.
iChildChild to retrieve.
Returns:
Ontology term index of the requested child.
Remarks:
Requested child must be less than IOntology::GetChildren.

Implements Sleipnir::IOntology.

Definition at line 600 of file annotation.h.

size_t Sleipnir::COntologyMIPS::GetChildren ( size_t  iTerm) const [inline, virtual]

Returns the number of children of the requested term.

Parameters:
iTermIndex of ontology term.
Returns:
Number of children of the requested term.

Implements Sleipnir::IOntology.

Definition at line 596 of file annotation.h.

Referenced by GetChildren().

bool Sleipnir::COntologyMIPS::GetChildren ( size_t  iTerm,
std::set< size_t > &  setiChildren 
) const [inline, virtual]

Retrieves the descendant term IDs of the requested term.

Parameters:
iTermIndex of ontology term.
setiChildrenOutput set of descendant term IDs.
Returns:
True on success, false otherwise.
Remarks:
Operates recursively, returning all nodes between iTerm and the ontology leaves.
See also:
GetChildren | GetChild

Implements Sleipnir::IOntology.

Definition at line 616 of file annotation.h.

References GetChildren().

const CGene& Sleipnir::COntologyMIPS::GetGene ( size_t  iTerm,
size_t  iGene 
) const [inline, virtual]

Returns the requested gene annotated to or below the given term.

Parameters:
iTermOntology term index from which to retrieve gene.
iGeneIndex of gene within the requested term.
Returns:
Gene annotation at the requested index.
Remarks:
If iGene is less than the number of genes annotated directly to the term, a direct annotation is returned. Otherwise, descendant terms are searched and the requested gene index is retrieved from this set. iGene must be less than the value of IOntology::GetGenes.

Implements Sleipnir::IOntology.

Definition at line 608 of file annotation.h.

void Sleipnir::COntologyMIPS::GetGeneNames ( std::vector< std::string > &  vecstrGenes) const [inline, virtual]

Obtain the primary gene names for all genes in the ontology.

Parameters:
vecstrGenesOutputs primary gene names for all genes in the ontology.

Implements Sleipnir::IOntology.

Definition at line 553 of file annotation.h.

size_t Sleipnir::COntologyMIPS::GetGenes ( size_t  iTerm,
bool  fRecursive 
) const [inline, virtual]

Returns the number of genes annotated to or (optionally) below this term.

Parameters:
iTermOntology term index.
fRecursiveIf true, include gene annotations to descendant terms.
Returns:
Number of genes annotated to or below this term.

Implements Sleipnir::IOntology.

Definition at line 604 of file annotation.h.

const std::string& Sleipnir::COntologyMIPS::GetGloss ( size_t  iTerm) const [inline, virtual]

Returns the ontology-specific description of the requested term.

Parameters:
iTermIndex of ontology term.
Returns:
Ontology-specific description of the requested term (e.g. "mitotic cell cycle").

Implements Sleipnir::IOntology.

Definition at line 584 of file annotation.h.

const std::string& Sleipnir::COntologyMIPS::GetID ( ) const [inline, virtual]

Returns string identifier of the encapsulated ontology.

Returns:
String identifier of the ontology.

Implements Sleipnir::IOntology.

Definition at line 576 of file annotation.h.

Referenced by GetID().

const std::string& Sleipnir::COntologyMIPS::GetID ( size_t  iTerm) const [inline, virtual]

Returns the ontology-specific ID string of the requested term.

Parameters:
iTermIndex of ontology term.
Returns:
Ontology-specific ID of the requested term (e.g. "GO:0007093").

Implements Sleipnir::IOntology.

Definition at line 580 of file annotation.h.

References GetID().

size_t Sleipnir::COntologyMIPS::GetNode ( const std::string &  strID) const [inline, virtual]

Returns the ontology term index corresponding to the given ontology-specific ID string.

Parameters:
strIDOntology term ID to retrieve (e.g. "GO:0007093").
Returns:
The index of the requested term, -1 if not found.

Implements Sleipnir::IOntology.

Definition at line 564 of file annotation.h.

size_t Sleipnir::COntologyMIPS::GetNodes ( ) const [inline, virtual]

Returns the number of nodes (terms) in the ontology.

Returns:
Number of nodes (terms) in the ontology.

Implements Sleipnir::IOntology.

Definition at line 572 of file annotation.h.

size_t Sleipnir::COntologyMIPS::GetParent ( size_t  iTerm,
size_t  iParent 
) const [inline, virtual]

Returns the ontology term index of the requested parent of the requested term.

Parameters:
iTermIndex of ontology term.
iParentParent to retrieve.
Returns:
Ontology term index of the requested parent.
Remarks:
Requested parent must be less than IOntology::GetParents.

Implements Sleipnir::IOntology.

Definition at line 592 of file annotation.h.

size_t Sleipnir::COntologyMIPS::GetParents ( size_t  iTerm) const [inline, virtual]

Returns the number of parents of the requested term.

Parameters:
iTermIndex of ontology term.
Returns:
Number of parents of the requested term.

Implements Sleipnir::IOntology.

Definition at line 588 of file annotation.h.

Referenced by GetParents().

bool Sleipnir::COntologyMIPS::GetParents ( size_t  iTerm,
std::set< size_t > &  setiParents 
) const [inline, virtual]

Retrieves the parent term IDs of the requested term.

Parameters:
iTermIndex of ontology term.
setiParentsOutput set of parent term IDs.
Returns:
True on success, false otherwise.
Remarks:
Operates recursively, returning all nodes between iTerm and the ontology root.
See also:
GetParents | GetParent

Implements Sleipnir::IOntology.

Definition at line 612 of file annotation.h.

References GetParents().

bool Sleipnir::COntologyMIPS::IsAnnotated ( size_t  iTerm,
const CGene Gene,
bool  fRecursive 
) const [inline, virtual]

Indicates whether the given gene is annotated to or (optionally) below the given term.

Parameters:
iTermOntology term index.
GeneGene for which annotation is tested.
fRecursiveIf true, include annotations to descendants of the given term.
Returns:
True if the given gene is annotated to or (optionally) below the given term.

Implements Sleipnir::IOntology.

Definition at line 568 of file annotation.h.

bool Sleipnir::COntologyMIPS::Open ( std::istream &  istmOntology,
std::istream &  istmAnnotations,
CGenome Genome 
)

Initializes the ontology using the "funcat" scheme (structure) and annotation files.

Parameters:
istmOntologyStream from which the catalog structure file is read.
istmAnnotationsStream from which the catalog annotation file is read.
GenomeGenome into which genes are inserted or read during annotation parsing.
Returns:
True if the ontology was successfully initialized.

COntologyMIPS::Open parses the structure of the MIPS functional catalog from the (organism-independent) funcat scheme file and a set of (organism-dependent) annotations from a data file. Terms are identified by MIPS IDs (e.g. "16.03.03"), and genes are identified by the name given by the annotation file. Genes are retrieved from Genome if already present or inserted if not; it is thus important to ensure that the proper primary gene names are used so as to agree with any identifiers already present in Genome.

Definition at line 61 of file annotationmips.cpp.

void Sleipnir::COntologyMIPS::TermFinder ( const CGenes Genes,
std::vector< STermFound > &  vecsTerms,
bool  fBonferroni = true,
bool  fRecursive = true,
bool  fGenome = false,
float  dPValue = 1,
const CGenes pBackground = NULL 
) const [inline, virtual]

Uses the hypergeometric distribution to find functional enrichments of the given gene set.

Parameters:
GenesGene set to test for functional enrichments.
vecsTermsOutput statistics for the given genes over all terms in the ontology.
fBonferroniIf true, p-values are Bonferroni corrected.
fRecursiveIf true, annotations to descendants are used when calculating term overlaps.
fGenomeIf true, use all genes in the genome as background; otherwise, use only genes with at least one annotation in the ontology.
dPValueOnly terms significant below this p-value will be recorded.
pBackgroundIf non-null, use the given gene set as the background.

TermFinder uses the GO::TermFinder technique of Boyle, Sherlock, et al to calculate ontology terms (i.e. functions) enriched in the given gene set. This involves significance testing the overlap of the given gene set with annotations to every ontology term using the hypergeometric test.

Implements Sleipnir::IOntology.

Definition at line 557 of file annotation.h.


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