1 #ifndef LOCARNA_EDGE_PROBS 
    2 #define LOCARNA_EDGE_PROBS 
   18     template <
class T, 
size_t N> 
class Alphabet;
 
   20     class TraceController;
 
   60         prob(
size_t i, 
size_t j)
 const {
 
  117     template <
class pf_score_t>
 
  146                 double gap_extension,
 
  147                 double pf_struct_weight,
 
  156         z()
 const {
return z_;}
 
  202         bool fail()
 const {
return z_==(pf_score_t)0 || std::isnan(z_) || std::isinf(z_);}
 
  231     template <
class  pf_score_t>
 
  261                      double gap_extension,
 
  262                      double pf_struct_weight,
 
  278     template <
class pf_score_t>
 
  306                      double gap_extension,
 
  307                      double pf_struct_weight,
 
  401                       const PairHMMParams ¶ms);
 
  405 #include "edge_probs.icc" 
Provides probabilities for alignment egdes (match or trace probabilities etc).
Definition: edge_probs.hh:28
 
EdgeProbs(std::istream &in, size_type lenA, size_type lenB)
construct from input stream (sparse format)
Definition: edge_probs.hh:35
 
std::ostream & write_sparse(std::ostream &out, double threshold) const
Definition: edge_probs.cc:35
 
size_t size_type
size
Definition: edge_probs.hh:30
 
size_type lenB() const
get the length of the second sequence
Definition: edge_probs.hh:54
 
Matrix< double > probs_
the base match probabilities
Definition: edge_probs.hh:68
 
size_type lenA() const
get the length of the first sequence
Definition: edge_probs.hh:48
 
double prob(size_t i, size_t j) const
return the match probability for the two bases
Definition: edge_probs.hh:60
 
void read_sparse(const std::string &filename, size_type lenA, size_type lenB)
 
std::istream & read_sparse(std::istream &in, size_type lenA, size_type lenB)
Definition: edge_probs.cc:19
 
Description of free end gaps.
Definition: free_endgaps.hh:15
 
Provide match probabilities.
Definition: edge_probs.hh:91
 
MatchProbs(std::istream &in, size_type lenA, size_type lenB)
construct from input stream (sparse format)
Definition: edge_probs.hh:96
 
size_pair_type sizes() const
Definition: matrix.hh:91
 
Provide Gotoh partition functions.
Definition: edge_probs.hh:118
 
Matrix< pf_score_t > zBr_
reverse zB_
Definition: edge_probs.hh:180
 
Matrix< pf_score_t > zB_
pfs over alignments ending w/ gap in B
Definition: edge_probs.hh:176
 
Matrix< pf_score_t > zM_
pfs over alignments ending in match i~j
Definition: edge_probs.hh:170
 
size_t size_type
size
Definition: edge_probs.hh:120
 
const pf_score_t & z() const
Get the partition function.
Definition: edge_probs.hh:156
 
Matrix< pf_score_t > zAr_
reverse zA_
Definition: edge_probs.hh:179
 
Matrix< pf_score_t > zA_
pfs over alignments ending w/ gap in A
Definition: edge_probs.hh:173
 
Matrix< pf_score_t > zMr_
reverse zM_
Definition: edge_probs.hh:178
 
PFGotoh(const RnaData &rnaA, const RnaData &rnaB, const TraceController &trace_controller, const Matrix< double > &sim_mat, const Alphabet< char, 4 > &alphabet, double gap_opening, double gap_extension, double pf_struct_weight, double temp, const FreeEndgaps &free_endgaps, bool flag_local)
Construct to provide partial partition functions from Gotoh-like matrices.
 
void pf_gotoh(Matrix< pf_score_t > &zM, Matrix< pf_score_t > &zA, Matrix< pf_score_t > &zB, const TraceController &trace_controller, const StralScore &score, const FreeEndgaps &free_endgaps)
perform the partition version of Gotoh's algorithm
 
Provide match probabilities calculated by pf approach.
Definition: edge_probs.hh:232
 
PFMatchProbs(const RnaData &rnaA, const RnaData &rnaB, const TraceController &trace_controller, const Matrix< double > &sim_mat, const Alphabet< char, 4 > &alphabet, double gap_opening, double gap_extension, double pf_struct_weight, double temp, const FreeEndgaps &free_endgaps, bool flag_local)
construct; run computation of pfs and probabilities
 
Provide match probabilities calculated by pf approach.
Definition: edge_probs.hh:279
 
PFTraceProbs(const RnaData &rnaA, const RnaData &rnaB, const TraceController &trace_controller, const Matrix< double > &sim_mat, const Alphabet< char, 4 > &alphabet, double gap_opening, double gap_extension, double pf_struct_weight, double temp, const FreeEndgaps &free_endgaps, bool flag_local)
construct; run computation of pfs and probabilities
 
Maintains parameter for computing match probabilities.
Definition: edge_probs.hh:347
 
double extendX
transition probability extendX
Definition: edge_probs.hh:359
 
double extendY
transition probability extendY
Definition: edge_probs.hh:360
 
double startX
transition probability startX
Definition: edge_probs.hh:356
 
double extendM
transition probability extendM
Definition: edge_probs.hh:358
 
Matrix< double > emmission
matrix of emmission probabilities
Definition: edge_probs.hh:366
 
std::vector< double > background
vector of background probabilities
Definition: edge_probs.hh:368
 
double startY
transition probability startY
Definition: edge_probs.hh:357
 
double initM
transition probability initM
Definition: edge_probs.hh:353
 
double initX
transition probability initX
Definition: edge_probs.hh:354
 
double startMFromY
transition probability startMFromY
Definition: edge_probs.hh:362
 
std::string basenames
base names
Definition: edge_probs.hh:364
 
double startMFromX
transition probability startMFromX
Definition: edge_probs.hh:361
 
PairHMMParams(const std::string &filename)
Definition: edge_probs.cc:49
 
double initY
transition probability initY
Definition: edge_probs.hh:355
 
Definition: edge_probs.hh:334
 
PairHMMMatchProbs(const Sequence &seqA, const Sequence &seqB, const PairHMMParams ¶ms)
construct predicting pair probs by pairHMM
Definition: edge_probs.hh:386
 
void pairHMM_probs(const Sequence &seqA, const Sequence &seqB, const PairHMMParams ¶ms)
Definition: edge_probs.cc:121
 
represent sparsified data of RNA ensemble
Definition: rna_data.hh:44
 
"Sequence View" of multiple alignment as array of column vectors
Definition: sequence.hh:17
 
Implements the stral-like scoring function.
Definition: stral_score.hh:29
 
Controls the matrix cells valid for traces.
Definition: trace_controller.hh:200
 
Provide trace probabilities.
Definition: edge_probs.hh:210
 
TraceProbs(std::istream &in, size_type lenA, size_type lenB)
construct from input stream (sparse format)
Definition: edge_probs.hh:215
 
Definition: aligner.cc:15
 
size_t size_type
general size type
Definition: aux.hh:120