libsequence
1.9.5
|
Ka and Ks by Comeron's (1995) method. More...
#include <Sequence/Comeron95.hpp>
Public Member Functions | |
Comeron95 (GeneticCodes code=GeneticCodes::UNIVERSAL) | |
Comeron95 (const Comeron95 &)=delete | |
Comeron95 & | operator= (const Comeron95 &)=delete |
Com95_t | operator() (const Sequence::Seq &seqa, const Sequence::Seq &seqb, int maxdiffs=3) |
Com95_t | operator() (const Sequence::Seq &seqa, const Sequence::Seq &seqb, const WeightingScheme2 *weights2, const WeightingScheme3 *weights3, int maxdiffs=3) |
Ka and Ks by Comeron's (1995) method.
A definition of an object to implement Comeron's (1995) method to calculate Ka and Ks The reference is: Comeron, J. (1995) J. Molecular Evolution, 41: 1152-1159. The object has a simple purpose, but it requires a lot of code to do it. The calculation depends upon the following classes:
Sequence::RedundancyCom95
Sequence::Sites
Sequence::SingleSub
Sequence::TwoSubs
Sequence::ThreeSubs
The calculation can be done on any objects of type Sequence::Seq *, or anything derived from there.
You should be warned that this class depends heavily on namespace Sequence (the libsequence library), and may throw any and all exceptions defined in that library, so you should see the documentation for that library.
auto_ptr<Comeron95>
, as illustrated in the example below. The reason to use auto_ptr
is to prevent resource leaks in case an exception is thrown. This class has strict requirements about the data it is passed, resulting in several places where exceptions can be thrown. Most of these situations are caught in the constructor, which will prevent most leaks. However, anything is possible, so use auto_ptr
Definition at line 125 of file Comeron95.hpp.
Com95_t Sequence::Comeron95::operator() | ( | const Sequence::Seq & | seqa, |
const Sequence::Seq & | seqb, | ||
int | max = 3 |
||
) |
Initialize and calculate synonymous and nonsynonymous distances between two sequence objects
seqa | an object of type or derived from type Sequence::Seq |
seqb | an object of type or derived from type Sequence::Seq |
max | maximum number of substitutions per codon to allow in the analysis |
code | genetic code, see Sequence::GeneticCodes |
_weights2 | a weighting scheme for codons differing at 2 positions. If NULL , Sequence::GranthamWeights2 is used |
_weights3 | a weighting scheme for codons differing at 3 positions. If NULL , Sequence::GranthamWeights3 is used |
Definition at line 157 of file Comeron95.cc.