Sequence::TwoSubs Class Reference
[Classes related to the calculation of Ka and Ks]

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

#include <TwoSubs.hpp>

List of all members.

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 60 of file TwoSubs.hpp.


Member Function Documentation

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

Definition at line 34 of file TwoSubs.cc.

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

Definition at line 137 of file TwoSubs.cc.

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

Definition at line 146 of file TwoSubs.cc.

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

Definition at line 155 of file TwoSubs.cc.

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

Definition at line 164 of file TwoSubs.cc.

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

Definition at line 173 of file TwoSubs.cc.

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

Definition at line 182 of file TwoSubs.cc.

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

Definition at line 191 of file TwoSubs.cc.

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

Definition at line 200 of file TwoSubs.cc.


The documentation for this class was generated from the following files:
Generated on Thu Aug 11 13:22:04 2011 for libsequence by  doxygen 1.6.3