Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
5153f051
Commit
5153f051
authored
9 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
make the GetIndex function of the HMMColumn publicly available
parent
c7e86f51
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/seq/base/src/hmm.cc
+3
-3
3 additions, 3 deletions
modules/seq/base/src/hmm.cc
modules/seq/base/src/hmm.hh
+1
-1
1 addition, 1 deletion
modules/seq/base/src/hmm.hh
with
4 additions
and
4 deletions
modules/seq/base/src/hmm.cc
+
3
−
3
View file @
5153f051
...
...
@@ -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!"
);
}
...
...
This diff is collapsed.
Click to expand it.
modules/seq/base/src/hmm.hh
+
1
−
1
View file @
5153f051
...
...
@@ -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
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment