libsequence  1.9.5

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

#include <Sequence/RedundancyCom95.hpp>

Public Member Functions

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

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 56 of file RedundancyCom95.hpp.

Constructor & Destructor Documentation

◆ RedundancyCom95()

Sequence::RedundancyCom95::RedundancyCom95 ( Sequence::GeneticCodes  genetic_code = GeneticCodes::UNIVERSAL)
explicit
Parameters
codesee Sequence::GeneticCodes

Definition at line 386 of file RedundancyCom95.cc.

Member Function Documentation

◆ First2S()

double Sequence::RedundancyCom95::First2S ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 424 of file RedundancyCom95.cc.

◆ First2V()

double Sequence::RedundancyCom95::First2V ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 447 of file RedundancyCom95.cc.

◆ FirstNon()

double Sequence::RedundancyCom95::FirstNon ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 402 of file RedundancyCom95.cc.

◆ L0_vals()

double Sequence::RedundancyCom95::L0_vals ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met
Note
the return value = 1.0+FirstNon(codon )+ThirdNon(codon)

Definition at line 557 of file RedundancyCom95.cc.

◆ L2S_vals()

double Sequence::RedundancyCom95::L2S_vals ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met
Note
the return value = First2S(codon )+Third2S(codon )

Definition at line 580 of file RedundancyCom95.cc.

◆ L2V_vals()

double Sequence::RedundancyCom95::L2V_vals ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met
Note
the return value = First2V(codon )+Third2V(codon )

Definition at line 603 of file RedundancyCom95.cc.

◆ L4_vals()

double Sequence::RedundancyCom95::L4_vals ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met
Note
the return value = ThirdFour(codon )

Definition at line 626 of file RedundancyCom95.cc.

◆ Third2S()

double Sequence::RedundancyCom95::Third2S ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 513 of file RedundancyCom95.cc.

◆ Third2V()

double Sequence::RedundancyCom95::Third2V ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 535 of file RedundancyCom95.cc.

◆ ThirdFour()

double Sequence::RedundancyCom95::ThirdFour ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 491 of file RedundancyCom95.cc.

◆ ThirdNon()

double Sequence::RedundancyCom95::ThirdNon ( const std::string &  codon) const
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
std::runtime_errorif precondition is not met

Definition at line 469 of file RedundancyCom95.cc.


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