Sleipnir
|
Implements IOntology for the MIPS functional catalog. More...
#include <annotation.h>
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 CGene & | GetGene (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. |
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.
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.
iTerm | Index of ontology term. |
iChild | Child to retrieve. |
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.
iTerm | Index of ontology 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.
iTerm | Index of ontology term. |
setiChildren | Output set of descendant term IDs. |
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.
iTerm | Ontology term index from which to retrieve gene. |
iGene | Index of gene within the requested term. |
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.
vecstrGenes | Outputs 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.
iTerm | Ontology term index. |
fRecursive | If true, include gene annotations to descendant terms. |
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.
iTerm | Index of ontology term. |
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.
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.
iTerm | Index of ontology term. |
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.
strID | Ontology term ID to retrieve (e.g. "GO:0007093"). |
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.
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.
iTerm | Index of ontology term. |
iParent | Parent to retrieve. |
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.
iTerm | Index of ontology 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.
iTerm | Index of ontology term. |
setiParents | Output set of parent term IDs. |
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.
iTerm | Ontology term index. |
Gene | Gene for which annotation is tested. |
fRecursive | If true, include annotations to descendants of 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.
istmOntology | Stream from which the catalog structure file is read. |
istmAnnotations | Stream from which the catalog annotation file is read. |
Genome | Genome into which genes are inserted or read during annotation parsing. |
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.
Genes | Gene set to test for functional enrichments. |
vecsTerms | Output statistics for the given genes over all terms in the ontology. |
fBonferroni | If true, p-values are Bonferroni corrected. |
fRecursive | If true, annotations to descendants are used when calculating term overlaps. |
fGenome | If true, use all genes in the genome as background; otherwise, use only genes with at least one annotation in the ontology. |
dPValue | Only terms significant below this p-value will be recorded. |
pBackground | If 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.