Skip to content
Snippets Groups Projects
Commit 5153f051 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

make the GetIndex function of the HMMColumn publicly available

parent c7e86f51
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@
namespace ost { namespace seq{
int HMMColumn::GetIndex(char olc) const {
int HMMColumn::GetIndex(char olc){
if (olc == 'A') return 0;
if (olc >= 'C' && olc <= 'I') return (olc-'A') - 1;
if (olc >= 'K' && olc <= 'N') return (olc-'A') - 2;
......@@ -61,7 +61,7 @@ Real HMMColumn::GetEntropy() const {
}
Real HMMColumn::GetFreq(char ch) const{
int idx = this->GetIndex(ch);
int idx = HMMColumn::GetIndex(ch);
if(idx == -1){
throw std::runtime_error("Invalid One Letter Code observed when getting frequency in HMMColumn!");
}
......@@ -69,7 +69,7 @@ Real HMMColumn::GetFreq(char ch) const{
}
void HMMColumn::SetFreq(char ch, Real freq){
int idx = this->GetIndex(ch);
int idx = HMMColumn::GetIndex(ch);
if(idx == -1){
throw std::runtime_error("Invalid One Letter Code observed when setting frequency in HMMColumn!");
}
......
......@@ -78,6 +78,7 @@ class HMMColumn {
char GetOneLetterCode() const { return olc_; }
void SetOneLetterCode(char olc) { olc_ = olc; }
Real GetEntropy() const;
static int GetIndex(char ch);
static HMMColumn BLOSUMNullModel();
......@@ -167,7 +168,6 @@ class HMMColumn {
}
private:
int GetIndex(char ch) const;
char olc_;
Real freq_[20];
Real trans_[3][3];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment