|
| Scoring (const Sequence &seqA, const Sequence &seqB, const RnaData &rna_dataA, const RnaData &rna_dataB, const ArcMatches &arc_matches, const MatchProbs *match_probs, const ScoringParams ¶ms) |
| construct scoring object More...
|
|
void | modify_by_parameter (score_t lambda) |
| modify scoring by a parameter lambda. More...
|
|
void | apply_unpaired_penalty () |
|
score_t | lambda () const |
| Get factor lambda for normalized alignment. More...
|
|
score_t | basematch (size_type i, size_type j) const |
| Score of a match of bases (without structure) More...
|
|
score_t | arcmatch (const ArcMatch &am, bool stacked=false) const |
| Score of arc match, support explicit arc match scores. More...
|
|
score_t | arcmatch (const BasePairs__Arc &arcA, const BasePairs__Arc &arcB, bool stacked=false) const |
| Score of arc match, given two arcs. More...
|
|
const ArcMatches * | arc_matches () const |
|
template<bool gapAorB> |
score_t | arcDel (const BasePairs__Arc &arc, bool stacked=false) const |
| Very basic interface, score of aligning a basepair to gap. More...
|
|
score_t | arcmatch_stacked (const ArcMatch &am) const |
| Score of stacked arc match. More...
|
|
template<bool gapInA> |
score_t | gapX (size_type alignedToGap) const |
|
score_t | gapA (size_type posA) const |
|
score_t | gapB (size_type posB) const |
|
score_t | exclusion () const |
| cost of an exclusion
|
|
score_t | indel_opening () const |
| cost to begin a new indel
|
|
score_t | loop_indel_score (const score_t score) const |
| multiply an score by the ratio of indel_loop/indel
|
|
score_t | indel_opening_loop () const |
| cost to begin a new indel
|
|
double | prob_exp (size_type len) const |
| Expected base pair probability. More...
|
|
bool | stacking () const |
| Query stacking flag. More...
|
|
bool | is_stackable_arcA (const Arc &a) const |
| Is arc of A stackable. More...
|
|
bool | is_stackable_arcB (const Arc &a) const |
| Is arc of B stackable. More...
|
|
bool | is_stackable_am (const ArcMatch &am) const |
| Is arc match stackable. More...
|
|
template<> |
score_t | gapX (size_type alignedToGap) const |
|
template<> |
score_t | gapX (size_type alignedToGap) const |
|
|
void | precompute_sequence_identities () |
|
score_t | round2score (double d) const |
| Round a double to score_t. More...
|
|
score_t | sigma_ (int i, int j) const |
| Compute base similarity. More...
|
|
void | precompute_sigma () |
| Precompute all base similarities. More...
|
|
void | precompute_gapcost () |
| Precompute the tables for gapcost.
|
|
void | precompute_weights () |
| Precompute weights/stacked weights for all arcs in A and B.
|
|
void | precompute_weights (const RnaData &rna_data, const BasePairs &bps, double exp_prob, std::vector< score_t > &weights, std::vector< score_t > &stack_weights) |
| Helper for precompute_weights (does job for one rna) More...
|
|
score_t | probToWeight (double p, double prob_exp) const |
| convert probability to weight for scoring More...
|
|
double | ribosum_arcmatch_prob (const Arc &arcA, const Arc &arcB) const |
|
score_t | riboX_arcmatch_score (const Arc &arcA, const Arc &arcB) const |
| ribofit or ribosum arcmatch score contribution More...
|
|
void | subtract (std::vector< score_t > &v, score_t x) const |
| subtract from each element of a score_t vector v a value x
|
|
void | subtract (Matrix< score_t > &m, score_t x) const |
| subtract from each element of a score_t Matrix m a value x
|
|
Provides methods for the scoring of alignments.
Maintains and provides the scores for the alignment of two specific Rnas. Configurable via class ScoringParams, supports the classic LocARNA-score as well as the LocARNA MEA-Score. for "Classic Score" it supports
- match/mismatch cost or RIBOSUM for bases
- linear or affine gap cost
- arc match scores build of arc probabilitiesmatch_probs and optionally base match contribution or RIBOSUM for the "MEA Score" it supports
- base match/mismatch scores derived from base match probabilities
- RIBOSUM for base and arc match contribution
- arc match score contributions from arc probabilities
- weighting of single score contributions
The scoring class supports only characters ACGU, gap -, and N for ribosum scoring. ALL other characters are treated as unknown characters and are basically ignored. In consequence, IUPAC codes are handled badly. Even more important, for ribosum scoring, sequences have to be upper case and Ts should be converted to Us!!!
- Note
- The class implements two versions of the stacking score (controlled by ScoringParams flags stacking and new_stacking. The first flag lets the class derive the arc weights for stacked arcs from the conditional probability of the base pair (i,j) if (i+1,j-1) exists. The new_stacking flag adds a log odd contribution derived from the joint probability of (i,j) and (i+1,j-1) to the weight of (i,j).
- Note
- holds only pointers and references to passed objects; since no copies are made, the caller is responsible to keep the objects alive
-
the set of possible arc matches is considered part of the scoring information for alignments