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

Calculate redundancy of a genetic code using Comeron's counting scheme. More...

#include <Sequence/RedundancyCom95.hpp>

List of all members.

Public Member Functions

 RedundancyCom95 (const Sequence::GeneticCodes &genetic_code=Sequence::UNIVERSAL)
double FirstNon (const std::string &codon) const throw (Sequence::SeqException)
double First2S (const std::string &codon) const throw (Sequence::SeqException)
double First2V (const std::string &codon) const throw (Sequence::SeqException)
double ThirdNon (const std::string &codon) const throw (Sequence::SeqException)
double ThirdFour (const std::string &codon) const throw (Sequence::SeqException)
double Third2S (const std::string &codon) const throw (Sequence::SeqException)
double Third2V (const std::string &codon) const throw (Sequence::SeqException)
double L0_vals (const std::string &codon) const throw (Sequence::SeqException)
double L2S_vals (const std::string &codon) const throw (Sequence::SeqException)
double L2V_vals (const std::string &codon) const throw (Sequence::SeqException)
double L4_vals (const std::string &codon) const throw (Sequence::SeqException)

Detailed Description

Calculate redundancy of a genetic code using Comeron's counting scheme.

This class performs "on-the-fly" tabulations of the redundancy of a genetic code, in terms of whether or not a transition or transversion at any site in the codon changes the amino acid encoded by that codon. It supports whatever codes libsequence supports, because it uses Sequence::Translate to determine whether a mutation at a certain position in a codon will encode the same amino acid or not.

This should be considered a "buried" class, in the sense that it is, properly speaking, an implementation detail specific to Sequence::Comeron95. Another possible use for this class (which I will implement), is for analysis of silent/replacement polymorphism in population-genetic data.

Note:
any variable of type std::string that is named codon implicity assumes codon.length()==3

Definition at line 57 of file RedundancyCom95.hpp.


Constructor & Destructor Documentation

Sequence::RedundancyCom95::RedundancyCom95 ( const Sequence::GeneticCodes genetic_code = Sequence::UNIVERSAL  )  [explicit]
Parameters:
code see Sequence::GeneticCodes

Definition at line 422 of file RedundancyCom95.cc.


Member Function Documentation

double Sequence::RedundancyCom95::First2S ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the first codon position is synonymous via a transition
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 449 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::First2V ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the first codon position is synonymous via a transversion
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 462 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::FirstNon ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the first codon position is non-degenerate
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 437 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::L0_vals ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
the number of non-degenerate positions in codon
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met
Note:
the return value = 1.0+FirstNon(codon )+ThirdNon(codon)

Definition at line 523 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::L2S_vals ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
the number of transitional silent sites in codon
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met
Note:
the return value = First2S(codon )+Third2S(codon )

Definition at line 536 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::L2V_vals ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
the number of transversional silent sites in codon
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met
Note:
the return value = First2V(codon )+Third2V(codon )

Definition at line 549 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::L4_vals ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
the number of fourfold silent sites in codon
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met
Note:
the return value = ThirdFour(codon )

Definition at line 562 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::Third2S ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the third position is synonymous via a transition
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 499 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::Third2V ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the third position is synonymous via a transversion
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 511 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::ThirdFour ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the third position is fourfold-degenerate
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 487 of file RedundancyCom95.cc.

double Sequence::RedundancyCom95::ThirdNon ( const std::string &  codon  )  const throw (Sequence::SeqException)
Returns:
number of times the third position is non-degenerate
Precondition:
codon is of length 3, is all uppercase, and only contains the characters {A,G,C,T}
Exceptions:
Sequence::SeqException if precondition is not met

Definition at line 475 of file RedundancyCom95.cc.


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