Biorithm  1.1
Public Member Functions
GOEvidenceCodes Class Reference

#include <old-annotations.h>

List of all members.

Public Member Functions

 GOEvidenceCodes ()
 Default constructor, which sets weights for evidence codes based on Brett Tyler's recommendations.
MyNT getWeight (string code) const
 Return the weight of an evidence code.
bool hasWeight (string code) const
 Return true iff the evidence code has an associated weight.
bool isExperimental (string code) const
void checkEvidenceCodeWeights (const map< string, unsigned int > &ecUsageCounts, ostream &logStream)
 For every evidence code in ecUsageCounts for which the count is non-zero, check if the invocant contains a weight.
void readEvidenceCodeWeights (string ecwFile)
 Read evidence code weights from a file.

Detailed Description

A class for storing different GO evidence codes and numerical weights associated with them.


Member Function Documentation

void GOEvidenceCodes::checkEvidenceCodeWeights ( const map< string, unsigned int > &  ecUsageCounts,
ostream &  logStream 
)

For every evidence code in ecUsageCounts for which the count is non-zero, check if the invocant contains a weight.

Parameters:
[in]ecUsageCountsa map from evidence codes to the number of times it occurs (in an annotation file).
[out]logStreamPrint evidence codes without weights to logStream.
MyNT GOEvidenceCodes::getWeight ( string  code) const [inline]

Return the weight of an evidence code.

Parameters:
[in]codeAn evidence code.

The method returns 0 if the code does not have a weight and also print an error message.

bool GOEvidenceCodes::hasWeight ( string  code) const [inline]

Return true iff the evidence code has an associated weight.

Parameters:
[in]codeAn evidence code.
bool GOEvidenceCodes::isExperimental ( string  code) const [inline]

Return true if and only if the evidence code is experimental.

Experimental evidence codes are TAS, IDA, IC, NAS, IMP, IGI, IPI, and IEP.

Non-experimental evidence codes are ISS, RCA, and IEA.

void GOEvidenceCodes::readEvidenceCodeWeights ( string  ecwFile)

Read evidence code weights from a file.

Each line of the file should contain two values: an evidence code and its weight, separated by a tab. The method will ignore lines that start with '#'. One use of this method is to input biologist-provided weights for evidence codes. Another use of the method is to ignore some evidence codes (e.g., electronic ones) by setting their weights to 0.

Note:
The method accepts any weights that are provided in the input file.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends