libsequence  1.9.5

Deal with codons differing at 2 positions. More...

#include <TwoSubs.hpp>

Public Member Functions

void operator() (const RedundancyCom95 &sitesObj, const std::string &cod1, const std::string &cod2, const Sequence::WeightingScheme2 *weights2)
 
double P0 (void) const
 
double P2S (void) const
 
double P2V (void) const
 
double P4 (void) const
 
double Q0 (void) const
 
double Q2S (void) const
 
double Q2V (void) const
 
double Q4 (void) const
 

Detailed Description

Deal with codons differing at 2 positions.

2subs.jpg
Pathways when codons differ at 2 sites
each branch can have a weighting scheme, x_i
the correct weights to apply to changes for each path are:
p1 = changes on b1 + changes on b2
p2 = changes on b3 + changes on b4
A function object to obtain divergence statistics for Comeron's method for codons that differ at two positions. Alternate paths are weighted by Grantham's distances. Used by Sequence::Comeron95.

Note
In the above figure, codon1 and intermediate1 differ at the first of the 2 substitued sites (either the first or second codon position). Likewise, codon1 and intermedate2 differ at the seconf of the 2 substituted positions (i.e. the second or the third codon position). This is important information, because if you want to implement your own scheme to weight these pathways (done by deriving a class from Sequence::WeightingScheme2 and Sequence::WeightingScheme3), you must know how this class names and assigns the intermediate steps and the branches. In other words, you must study the implementation of this class. You may also want to refer to the implementations of Sequence::GranthamWeights2 and Sequence::GranthamWeights3 for an example of implementing weighting schemes.
Author
Kevin Thornton

Definition at line 61 of file TwoSubs.hpp.

Member Function Documentation

◆ operator()()

void Sequence::TwoSubs::operator() ( const RedundancyCom95 sitesObj,
const std::string &  codon1,
const std::string &  codon2,
const Sequence::WeightingScheme2 weights2 
)
Parameters
sitesObjan initialized object of type Sequence::RedundancyCom95
codegenetic code, see Sequence::GeneticCodes for valid values
codon1string of length 3 representing nucleodites
codon2string of length 3 representing nucleodites
weights2a weighting scheme for the pathways

Definition at line 58 of file TwoSubs.cc.

◆ P0()

double Sequence::TwoSubs::P0 ( void  ) const
Returns
number of transitions at non-degenerate sites in the codon

Definition at line 159 of file TwoSubs.cc.

◆ P2S()

double Sequence::TwoSubs::P2S ( void  ) const
Returns
number of transitions at transitional-degenerate sites in the codon

Definition at line 168 of file TwoSubs.cc.

◆ P2V()

double Sequence::TwoSubs::P2V ( void  ) const
Returns
number of transitions at transversional-degenerate sites in the codon

Definition at line 177 of file TwoSubs.cc.

◆ P4()

double Sequence::TwoSubs::P4 ( void  ) const
Returns
number of transitions at fourfold-degenerate sites in the codon

Definition at line 186 of file TwoSubs.cc.

◆ Q0()

double Sequence::TwoSubs::Q0 ( void  ) const
Returns
number of transversions at non-degenerate sites in the codon

Definition at line 195 of file TwoSubs.cc.

◆ Q2S()

double Sequence::TwoSubs::Q2S ( void  ) const
Returns
number of transversions at transitional-degenerate sites in the codon

Definition at line 204 of file TwoSubs.cc.

◆ Q2V()

double Sequence::TwoSubs::Q2V ( void  ) const
Returns
number of transversions at transversional-degenerate sites in the codon

Definition at line 213 of file TwoSubs.cc.

◆ Q4()

double Sequence::TwoSubs::Q4 ( void  ) const
Returns
number of transversions at fourfold-degenerate sites in the codon

Definition at line 222 of file TwoSubs.cc.


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