LocARNA-2.0.0
|
Represents ribosum similarity matrices including raw frequencies. More...
#include <ribosum.hh>
Public Member Functions | |
RibosumFreq (const std::string &filename) | |
double | base_prob (char i) const |
double | base_nonstruct_prob (char i) const |
const matrix_t & | get_base_probs () const |
const matrix_t & | get_base_nonstruct_probs () const |
double | basepair_prob (char i, char j) const |
const matrix_t & | get_basepair_probs () const |
double | basematch_prob (char i, char j) const |
const matrix_t & | get_basematch_probs () const |
double | arcmatch_prob (char i, char j, char k, char l) const |
const matrix_t & | get_arcmatch_probs () const |
double | base_unpaired_prob (char i) const |
probability that a nucleotide/base occurs unpaired More... | |
double | basematch_score_corrected (char i, char j) const |
Get corrected score for a base match. More... | |
void | print_basematch_scores_corrected (std::ostream &out) const |
Print the corrected score of base matches. More... | |
void | read_matrix (std::istream &in, const std::string &header, matrix_t &mat, size_t xdim, size_t ydim) |
void | write_ICC_code (std::ostream &out, const std::string &ribname) const |
std::ostream & | write_matrix (std::ostream &out, const std::string &name, const Matrix< double > &mat) const |
![]() | |
Ribosum (const std::string &filename) | |
virtual | ~Ribosum () |
virtual destructor | |
const matrix_t & | get_basematch_scores () const |
Get base match scores. More... | |
const matrix_t & | get_arcmatch_scores () const |
const base_alphabet_type & | string_alphabet () const |
const char_alphabet_type & | alphabet () const |
const std::string & | get_name () const |
double | basematch_score (char i, char j) const |
Get base match score. More... | |
double | arcmatch_score (char i, char j, char k, char l) const |
Get arc match score. More... | |
Protected Member Functions | |
void | write_CC_matrix (std::ostream &out, const std::string &ribname, const std::string &matname, int x, int y, const Ribosum::matrix_t &m) const |
![]() | |
template<size_t N> | |
std::istream & | read_matrix (std::istream &in, matrix_t &mat, const Alphabet< std::string, N > &names) const |
template<size_t N> | |
std::ostream & | write_matrix (std::ostream &out, const matrix_t &mat, const Alphabet< std::string, N > &alph) const |
Ribosum () | |
Construct empty. | |
void | read_ribosum (std::istream &in) |
char_alphabet_type | make_char_alphabet () const |
transform the basename alphabet to alphabet over characters | |
void | set_basename_alphabet (const std::array< std::string, 4 > &a) |
void | set_arcname_alphabet (const std::array< std::string, 16 > &a) |
Protected Attributes | |
matrix_t | base_probs_ |
matrix of base probabilities | |
matrix_t | base_nonstruct_probs_ |
matrix_t | basepair_probs_ |
matrix of base pair probabilities | |
matrix_t | basematch_probs_ |
matrix of base match probabilties | |
matrix_t | arcmatch_probs_ |
matrix of arc match probabilities | |
![]() | |
std::string | name_ |
name of ribosum | |
matrix_t | bm_ |
scores for base matches, 4x4 matrix | |
matrix_t | am_ |
16x16 matrix More... | |
base_alphabet_type | basename_alphabet_ |
alphabet of base names | |
arc_alphabet_type | arcname_alphabet_ |
alphabet of arc names | |
char_alphabet_type | char_basename_alphabet_ |
alphabet of base names as characters | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const RibosumFreq &ribosum) |
Additional Inherited Members | |
![]() | |
typedef Matrix< double > | matrix_t |
type of a matrix | |
typedef Alphabet< std::string, 4 > | base_alphabet_type |
type of alphabet | |
typedef Alphabet< char, 4 > | char_alphabet_type |
type of alphabet | |
typedef Alphabet< std::string, 16 > | arc_alphabet_type |
type of alphabet | |
Represents ribosum similarity matrices including raw frequencies.
Extension of the ribosum class that maintains additional "raw" information in particular frequencies of bases, basematches, basepairs, and arcmatches
|
explicit |
Construct from file
filename | Name of input file |
|
inline |
Get the probability of an arcmatch
i | left nucleotide character of first base pair |
j | right nucleotide character of first base pair |
k | left nucleotide character of second base pair |
l | right nucleotide character of second base pair |
|
inline |
Get probability of a base occuring in a non-structural match
i | nucleotide character |
|
inline |
Get probability of a base
i | nucleotide character |
double LocARNA::RibosumFreq::base_unpaired_prob | ( | char | i | ) | const |
probability that a nucleotide/base occurs unpaired
i | nucleotide character |
|
inline |
Get the probability of a base match
i | left nucleotide character |
j | right nucleotide character |
double LocARNA::RibosumFreq::basematch_score_corrected | ( | char | i, |
char | j | ||
) | const |
Get corrected score for a base match.
i | first nucleotide character |
j | second nucleotide character |
|
inline |
Get probability of a basepair
i | left nucleotide character |
j | right nucleotide character |
|
inline |
Get arcmatch prob matrix @ return matrix of arc match probabilities
|
inline |
Get base nonstruct prob matrix
|
inline |
Get base prob matrix
|
inline |
Get basematch prob matrix
|
inline |
Get base pair prob matrix
void LocARNA::RibosumFreq::print_basematch_scores_corrected | ( | std::ostream & | out | ) | const |
Print the corrected score of base matches.
void LocARNA::RibosumFreq::read_matrix | ( | std::istream & | in, |
const std::string & | header, | ||
matrix_t & | mat, | ||
size_t | xdim, | ||
size_t | ydim | ||
) |
Read one matrix in ribosum input
in | input stream | |
header | header string | |
[out] | mat | matrix object to be read into |
xdim | first dimension of matrix | |
ydim | second dimension of matrix |
void LocARNA::RibosumFreq::write_ICC_code | ( | std::ostream & | out, |
const std::string & | ribname | ||
) | const |
Write the ribosum matrices as C++ code
out | output stream |
ribname | Name of ribosum |
std::ostream & LocARNA::RibosumFreq::write_matrix | ( | std::ostream & | out, |
const std::string & | name, | ||
const Matrix< double > & | mat | ||
) | const |
Write single matrix to output stream
out | output stream |
name | name of matrix |
mat | matrix |
|
friend |
Output operator
out | output stream |
ribosum | Ribosum to be written to stream |
|
protected |
matrix of base probabilities in non-structural context