LocARNA-2.0.0
Public Member Functions | List of all members
LocARNA::StralScore Class Reference

Implements the stral-like scoring function. More...

#include <stral_score.hh>

Public Member Functions

 StralScore (const RnaData &rnaA, const RnaData &rnaB, const Matrix< double > &sim_mat, const Alphabet< char, 4 > &alphabet, double pf_struct_weight, double indel_opening, double indel)
 
double sigma (size_type i, size_type j) const
 Compute STRAL-like similarity of two residues in the two RNAs. More...
 
double indel_opening () const
 Read gap opening cost. More...
 
double indel () const
 Read gap extension cost. More...
 
void reverse ()
 Reverse the scoring. More...
 

Detailed Description

Implements the stral-like scoring function.

Note
unlike the integer scores in locarna, which are scaled by factor 100, the double scores in this class are usually not scaled.

Constructor & Destructor Documentation

◆ StralScore()

LocARNA::StralScore::StralScore ( const RnaData rnaA,
const RnaData rnaB,
const Matrix< double > &  sim_mat,
const Alphabet< char, 4 > &  alphabet,
double  pf_struct_weight,
double  indel_opening,
double  indel 
)

Construct for pair of RNAs with parameters for alignment

Parameters
rnaAdata of first RNA
rnaBdata of second RNA
sim_matsimilarity matrix for bases
alphabetalphabet
struct_weightstructure weight
indel_openinggap opening cost
indelgap extension cost

Member Function Documentation

◆ indel()

double LocARNA::StralScore::indel ( ) const
inline

Read gap extension cost.

Returns
gap extension cost

◆ indel_opening()

double LocARNA::StralScore::indel_opening ( ) const
inline

Read gap opening cost.

Returns
gap opening cost

◆ reverse()

void LocARNA::StralScore::reverse ( )

Reverse the scoring.

Postcondition
the object scores the reverted RNAs

◆ sigma()

double LocARNA::StralScore::sigma ( size_type  i,
size_type  j 
) const

Compute STRAL-like similarity of two residues in the two RNAs.

Parameters
iposition in sequence A
jposition in sequence B
Note
Computes the average similarity over all pairs of alignment rows in the RNA sequence, which are alignments in general.
The treatment of gaps and unknown nucleotide symbols in the aligned alignments is quite ad hoc.
Returns
similarity of residues i in A and j in B.

The documentation for this class was generated from the following files: