Implementation of ExtRnaData. More...
#include <ext_rna_data_impl.hh>
Public Types | |
typedef SparseVector< double > | arc_prob_vector_t |
vector of arc probabilities | |
typedef RnaDataImpl::arc_prob_matrix_t | arc_prob_matrix_t |
matrix of arc probabilities | |
typedef SparseMatrix < arc_prob_vector_t > | arc_prob_vector_matrix_t |
matrix of arc probability vectors | |
typedef SparseMatrix < arc_prob_matrix_t > | arc_prob_matrix_matrix_t |
matrix of arc probability matrices | |
Public Member Functions | |
ExtRnaDataImpl (ExtRnaData *self, double p_bpilcut, double p_uilcut) | |
Construct. | |
void | init_from_fixed_structure (const RnaStructure &structure) |
initialize in loop probabilities from fixed structure | |
void | init_from_ext_rna_ensemble (const RnaEnsemble &rna_ensemble) |
initialize from rna ensemble | |
std::istream & | read_pp_in_loop_probabilities (std::istream &in) |
read in loop probability section of pp-format | |
void | read_pp_in_loop_probabilities_kwline (const std::string &line) |
read keyword line in loop probability section of pp-format | |
void | read_pp_in_loop_probabilities_line (const std::string &line) |
read probability line in loop probability section of pp-format | |
std::ostream & | write_pp_in_loop_probabilities (std::ostream &out, double p_outbpcut, double p_outbpilcut, double p_outuilcut) const |
Write in loop probability section of pp 2.0. | |
std::ostream & | write_pp_in_loop_probability_line (std::ostream &out, size_t i, size_t j, double p_bpcut, double p_ucut) const |
Write a line of in loop probabilities for one base pair. | |
std::ostream & | write_pp_basepair_in_loop_probabilities (std::ostream &out, const arc_prob_matrix_t &probs, double p_cut) const |
Write in loop base pair probabilities for a specific base pair. | |
std::ostream & | write_pp_unpaired_in_loop_probabilities (std::ostream &out, const arc_prob_vector_t &probs, double p_cut) const |
Write in loop unpaired probabilities for a specific base pair. | |
void | drop_worst_bps (size_t keep) |
Drop in loop bases and base pairs without base pairs. | |
void | drop_worst_uil (size_t keep) |
Drop unpaired bases in loops with lowest probability. | |
void | drop_worst_bpil (size_t keep) |
Drop base pairs in loops with lowest probability. | |
void | drop_worst_bpil_precise (double ratio) |
Drop base pairs in loops with lowest probability based on loop length. | |
Public Attributes | |
ExtRnaData * | self_ |
double | p_bpilcut_ |
cutoff probabilitiy for base pair in loop | |
double | p_uilcut_ |
cutoff probabilitiy for unpaired base in loop | |
arc_prob_matrix_matrix_t | arc_in_loop_probs_ |
in loop probabilities of base pairs | |
arc_prob_vector_matrix_t | unpaired_in_loop_probs_ |
in loop probabilities of unpaired bases | |
bool | has_in_loop_probs_ |
Implementation of ExtRnaData.
LocARNA::ExtRnaDataImpl::ExtRnaDataImpl | ( | ExtRnaData * | self, |
double | p_bpilcut, | ||
double | p_uilcut | ||
) |
Construct.
self | self pointer |
p_bpilcut | probability cutoff base pair in loop |
p_uilcut | probability cutoff unpaired in loop |
void LocARNA::ExtRnaDataImpl::drop_worst_bpil | ( | size_t | keep | ) |
Drop base pairs in loops with lowest probability.
keep | the maximum total number of base pairs in loops to keep |
void LocARNA::ExtRnaDataImpl::drop_worst_bpil_precise | ( | double | ratio | ) |
Drop base pairs in loops with lowest probability based on loop length.
ratio | limit on number of base pairs closed by a loop divided by loop length |
void LocARNA::ExtRnaDataImpl::drop_worst_bps | ( | size_t | keep | ) |
Drop in loop bases and base pairs without base pairs.
keep | the maximum number of base pairs to keep |
void LocARNA::ExtRnaDataImpl::drop_worst_uil | ( | size_t | keep | ) |
Drop unpaired bases in loops with lowest probability.
keep | the maximum total number of unpaired bases in loops to keep |
void LocARNA::ExtRnaDataImpl::init_from_ext_rna_ensemble | ( | const RnaEnsemble & | rna_ensemble | ) |
initialize from rna ensemble
rna_ensemble | rna ensemble |
void LocARNA::ExtRnaDataImpl::init_from_fixed_structure | ( | const RnaStructure & | structure | ) |
initialize in loop probabilities from fixed structure
structure | fixed structure |
std::istream & LocARNA::ExtRnaDataImpl::read_pp_in_loop_probabilities | ( | std::istream & | in | ) |
read in loop probability section of pp-format
in | input stream |
Reads only base pairs with probabilities greater than p_bpcut_; base pairs in loops, p_bpilcut_; unpaired bases in loops, p_uilcut_
void LocARNA::ExtRnaDataImpl::read_pp_in_loop_probabilities_kwline | ( | const std::string & | line | ) |
read keyword line in loop probability section of pp-format
line | input line |
void LocARNA::ExtRnaDataImpl::read_pp_in_loop_probabilities_line | ( | const std::string & | line | ) |
read probability line in loop probability section of pp-format
line | input line |
std::ostream & LocARNA::ExtRnaDataImpl::write_pp_basepair_in_loop_probabilities | ( | std::ostream & | out, |
const arc_prob_matrix_t & | probs, | ||
double | p_cut | ||
) | const |
Write in loop base pair probabilities for a specific base pair.
out | output stream |
probs | in loop probability matrix of a base pair |
p_cut | base pair in loop probability cutoff |
std::ostream & LocARNA::ExtRnaDataImpl::write_pp_in_loop_probabilities | ( | std::ostream & | out, |
double | p_outbpcut, | ||
double | p_outbpilcut, | ||
double | p_outuilcut | ||
) | const |
Write in loop probability section of pp 2.0.
out | output stream |
p_outbpcut | base pair probability cutoff |
p_outbpilcut | base pair in loop probability cutoff |
p_outuilcut | unpaired in loop probability cutoff |
std::ostream & LocARNA::ExtRnaDataImpl::write_pp_in_loop_probability_line | ( | std::ostream & | out, |
size_t | i, | ||
size_t | j, | ||
double | p_bpcut, | ||
double | p_ucut | ||
) | const |
Write a line of in loop probabilities for one base pair.
out | output stream |
i | left end |
j | right end |
p_bpcut | base pair in loop probability cutoff |
p_ucut | unpaired in loop probability cutoff |
std::ostream & LocARNA::ExtRnaDataImpl::write_pp_unpaired_in_loop_probabilities | ( | std::ostream & | out, |
const arc_prob_vector_t & | probs, | ||
double | p_cut | ||
) | const |
Write in loop unpaired probabilities for a specific base pair.
out | output stream |
probs | in loop probability vector of a base pair |
p_cut | unpaired in loop probability cutoff |
used in initialization, to check whether in loop probs still have to be computed