Biorithm
1.1
|
#include <old-annotations.h>
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. |
A class for storing different GO evidence codes and numerical weights associated with them.
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.
[in] | ecUsageCounts | a map from evidence codes to the number of times it occurs (in an annotation file). |
[out] | logStream | Print evidence codes without weights to logStream. |
MyNT GOEvidenceCodes::getWeight | ( | string | code | ) | const [inline] |
Return the weight of an evidence code.
[in] | code | An 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.
[in] | code | An 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.