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 | |
double | basematch_score_corrected (char i, char j) const |
Get corrected score for a base match. | |
void | print_basematch_scores_corrected (std::ostream &out) const |
Print the corrected score of base matches. | |
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 |
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 | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const RibosumFreq &ribosum) |
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
LocARNA::RibosumFreq::RibosumFreq | ( | const std::string & | filename | ) | [explicit] |
Construct from file
filename | Name of input file |
double LocARNA::RibosumFreq::arcmatch_prob | ( | char | i, |
char | j, | ||
char | k, | ||
char | l | ||
) | const [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 |
double LocARNA::RibosumFreq::base_nonstruct_prob | ( | char | i | ) | const [inline] |
Get probability of a base occuring in a non-structural match
i | nucleotide character |
double LocARNA::RibosumFreq::base_prob | ( | char | i | ) | const [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 |
double LocARNA::RibosumFreq::basematch_prob | ( | char | i, |
char | j | ||
) | const [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 |
double LocARNA::RibosumFreq::basepair_prob | ( | char | i, |
char | j | ||
) | const [inline] |
Get probability of a basepair
i | left nucleotide character |
j | right nucleotide character |
const matrix_t& LocARNA::RibosumFreq::get_arcmatch_probs | ( | ) | const [inline] |
Get arcmatch prob matrix @ return matrix of arc match probabilities
const matrix_t& LocARNA::RibosumFreq::get_base_nonstruct_probs | ( | ) | const [inline] |
Get base nonstruct prob matrix
const matrix_t& LocARNA::RibosumFreq::get_base_probs | ( | ) | const [inline] |
Get base prob matrix
const matrix_t& LocARNA::RibosumFreq::get_basematch_probs | ( | ) | const [inline] |
Get basematch prob matrix
const matrix_t& LocARNA::RibosumFreq::get_basepair_probs | ( | ) | const [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 |
std::ostream& operator<< | ( | std::ostream & | out, |
const RibosumFreq & | ribosum | ||
) | [friend] |
Output operator
out | output stream |
ribosum | Ribosum to be written to stream |
matrix_t LocARNA::RibosumFreq::base_nonstruct_probs_ [protected] |
matrix of base probabilities in non-structural context