LocARNA-2.0.0
|
Represents ribosum similarity matrices. More...
#include <ribosum.hh>
Public Types | |
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 | |
Public Member Functions | |
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 | |
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 | |
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 Ribosum &ribosum) |
Represents ribosum similarity matrices.
Reads ribosum data from file and provides access.
|
explicit |
Construct from file
filename | name of the input file |
|
inline |
Get the basename alphabet as alphabet over characters
|
inline |
Get arc match score.
i | left character of first arc |
j | right character of first arc |
k | left character of second arc |
l | right character of second arc |
|
inline |
Get base match score.
i | character of first nucleotide |
j | character of second nucleotide |
|
inline |
Get arc match scores
|
inline |
Get base match scores.
|
inline |
Get name of ribosum
|
protected |
Read matrix from input stream
in | input stream | |
[out] | mat | matrix to be read |
names | alphabet names provided as Alphabet (of strings) |
|
protected |
reads the standard ribosum file format
in | input stream |
|
inlineprotected |
Set alphabet of base names
a | array of strings of the arc names |
|
inlineprotected |
Set alphabet of base names
a | array of strings of the base names |
|
inline |
Get the basename alphabet as alphabet over strings
|
protected |
Write matrix to output stream
out | output stream |
mat | matrix to be written |
alph | alphabet names provided as Alphabet (of strings) |
|
friend |
Output operator
out | output stream |
ribosum | Ribosum to be written to stream |
|
protected |
16x16 matrix
scores for basepair/arc matches,