Sleipnir
Public Member Functions
Sleipnir::CSlim Class Reference

Represents a set of ontology terms. More...

#include <annotation.h>

Inheritance diagram for Sleipnir::CSlim:
Sleipnir::CSlimImpl

Public Member Functions

bool Open (std::istream &istmSlim, const IOntology *pOntology)
void GetGeneNames (std::vector< std::string > &vecstrGenes) const
const CGeneGetGene (size_t iSlim, size_t iGene) const
 Returns the gene at the requested index below the requested slim term.
size_t GetSlims () const
 Returns the number of ontology terms in this slim.
size_t GetGenes (size_t iSlim) const
 Returns the number of genes annotated below the given slim term.
const std::string & GetSlim (size_t iSlim) const
 Returns the string ID of the ontology term at the given slim index.
size_t GetNodes (size_t iSlim) const
 Returns the number of ontology terms in the requested slim.
size_t GetNode (size_t iSlim, size_t iTerm) const
 Returns the ontology term ID at the requested index in the requested slim.

Detailed Description

Represents a set of ontology terms.

Modeled after the "GO Slim" sets of GO terms, CSlim represents any set of IOntology terms. A slim is generally opened from a text file listing ontology IDs and can be used in a variety of settings, e.g. functional enrichment or gold standard generation.

See also:
CDat::Open | CDataPair::Open

Definition at line 651 of file annotation.h.


Member Function Documentation

const CGene& Sleipnir::CSlim::GetGene ( size_t  iSlim,
size_t  iGene 
) const [inline]

Returns the gene at the requested index below the requested slim term.

Parameters:
iSlimIndex of the slim term for which a gene are retrieved.
iGeneIndex of the gene to retrieve.
Returns:
Gene annotated at the requested index below the requested slim term.
Remarks:
iSlim must be less than CSlim::GetSlims; iGene must be less than CSlim::GetGenes. All genes annotated recursively to descendants of the slim terms are considered.
See also:
IOntology::GetGenes

Definition at line 676 of file annotation.h.

size_t Sleipnir::CSlim::GetGenes ( size_t  iSlim) const [inline]

Returns the number of genes annotated below the given slim term.

Parameters:
iSlimIndex of the slim term for which genes are retrieved.
Returns:
Number of genes annotated below the given slim term.
Remarks:
iSlim must be less than CSlim::GetSlims.

Definition at line 704 of file annotation.h.

Referenced by Sleipnir::CDat::Open().

size_t Sleipnir::CSlim::GetNode ( size_t  iSlim,
size_t  iTerm 
) const [inline]

Returns the ontology term ID at the requested index in the requested slim.

Parameters:
iSlimID of slim.
iTermIndex of ontology term to be returned.
Returns:
Ontology term at the requested index within the given slim.
Remarks:
No bounds checking is performed; iSlim must be less than GetSlims, and iTerm must be less than GetNodes.
See also:
GetNodes

Definition at line 761 of file annotation.h.

size_t Sleipnir::CSlim::GetNodes ( size_t  iSlim) const [inline]

Returns the number of ontology terms in the requested slim.

Parameters:
iSlimID of slim.
Returns:
Number of ontology terms in the requested slim.
See also:
GetNode

Definition at line 738 of file annotation.h.

const std::string& Sleipnir::CSlim::GetSlim ( size_t  iSlim) const [inline]

Returns the string ID of the ontology term at the given slim index.

Parameters:
iSlimIndex of the slim term to identify.
Returns:
String ID of the requested slim index.
Remarks:
iSlim must be less than CSlim::GetSlims.

Definition at line 721 of file annotation.h.

Referenced by Sleipnir::CDat::Open().

size_t Sleipnir::CSlim::GetSlims ( ) const [inline]

Returns the number of ontology terms in this slim.

Returns:
Number of ontology terms in this slim.

Definition at line 687 of file annotation.h.

Referenced by Sleipnir::CDat::Open().


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