MDA
|
#include <HMM.hpp>
Public Member Functions | |
HMM (char type) | |
Constructor. More... | |
short | num_states () const |
Returns the number of states. More... | |
short | num_ins_states () const |
The number of insert states. More... | |
const Matrix< float > & | trans_probs () const |
Returns the transition probabilities. More... | |
const std::vector< float > & | ins_probs () const |
Returns the insertion probabilities. More... | |
const Matrix< float > & | match_probs () const |
Returns the match probabilities. More... | |
const float * | init_distribution () const |
Returns initial distribution. More... | |
template<typename DataType > | |
void | calculate_insertion_probs (const DataType &aln, std::vector< float > &ins_probs) |
Calculates the insertion probabilities for an alignment. More... | |
template<typename DataType > | |
void | calculate_insertion_probs_splitted (const DataType &aln_vec, std::vector< float > &ins_probs) |
Calculates the insertion probabilities for set of alignments. More... | |
template<typename DataType > | |
void | calculate_match_probs (const DataType &aln1, const DataType &aln2, Matrix< float > &match_probs) |
Calculates the match probabilities for two alignments. More... | |
template<typename DataType > | |
void | calculate_match_probs_splitted (const DataType &aln_vec1, const DataType &aln_vec2, Matrix< float > &match_probs, size_t start, size_t end) |
Calculates the match probabilities for two sets of alignments. More... | |
The HMM class using probabilities from ProbCons.
MDAT::HMM::HMM | ( | char | type | ) |
Constructor.
type | The probabilities to use. |
void MDAT::HMM::calculate_insertion_probs | ( | const DataType & | aln, |
std::vector< float > & | ins_probs | ||
) |
Calculates the insertion probabilities for an alignment.
DataType | A SequenceSet. |
[in] | aln | The alignment |
[out] | ins_probs | The insertion probabilities. |
void MDAT::HMM::calculate_insertion_probs_splitted | ( | const DataType & | aln_vec, |
std::vector< float > & | ins_probs | ||
) |
Calculates the insertion probabilities for set of alignments.
[in] | aln_vec | The set of alignments |
[out] | ins_probs | The insertion probabilities in a single vector. |
void MDAT::HMM::calculate_match_probs | ( | const DataType & | aln1, |
const DataType & | aln2, | ||
Matrix< float > & | match_probs | ||
) |
Calculates the match probabilities for two alignments.
DataType | A SequenceSet. |
[in] | aln1 | The first alignment. |
[in] | aln2 | The second alignment. |
[out] | match_probs | The resulting match probabilities. |
void MDAT::HMM::calculate_match_probs_splitted | ( | const DataType & | aln_vec1, |
const DataType & | aln_vec2, | ||
Matrix< float > & | match_probs, | ||
size_t | start, | ||
size_t | end | ||
) |
Calculates the match probabilities for two sets of alignments.
DataType | A SequenceSet. |
[in] | aln1 | The first alignment. |
[in] | aln2 | The second alignment. |
[out] | match_probs | The resulting match probabilities in a single matrix. |
|
inline |
Returns initial distribution.
|
inline |
Returns the insertion probabilities.
|
inline |
Returns the match probabilities.
|
inline |
The number of insert states.
|
inline |
Returns the number of states.
|
inline |
Returns the transition probabilities.