bpp-seq3
3.0.0
CodonSiteTools.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: The Bio++ Development Group
2
//
3
// SPDX-License-Identifier: CECILL-2.1
4
5
#ifndef BPP_SEQ_CODONSITETOOLS_H
6
#define BPP_SEQ_CODONSITETOOLS_H
7
8
#include <
Bpp/Exceptions.h
>
9
10
#include "
Alphabet/CodonAlphabet.h
"
11
#include "
GeneticCode/GeneticCode.h
"
12
#include "
Site.h
"
13
#include "
SymbolListTools.h
"
14
15
// From the STL:
16
#include <map>
17
18
namespace
bpp
19
{
24
class
CodonSiteTools
:
25
public
SymbolListTools
26
{
27
public
:
28
CodonSiteTools
() {}
29
virtual
~CodonSiteTools
() {}
30
31
public
:
38
static
bool
hasGapOrStop
(
const
Site
& site,
const
GeneticCode
& gCode);
39
46
static
bool
hasStop
(
const
Site
& site,
const
GeneticCode
& gCode);
47
53
static
bool
isMonoSitePolymorphic
(
const
Site
& site);
54
61
static
bool
isSynonymousPolymorphic
(
const
Site
& site,
const
GeneticCode
& gCode);
62
75
static
std::unique_ptr<Site>
generateCodonSiteWithoutRareVariant
(
const
Site
& site,
const
GeneticCode
& gCode,
double
freqmin);
76
84
static
size_t
numberOfDifferences
(
int
i,
int
j,
const
CodonAlphabet
& ca);
85
98
static
double
numberOfSynonymousDifferences
(
int
i,
int
j,
const
GeneticCode
& gCode,
bool
minchange =
false
);
99
118
static
double
piSynonymous
(
const
Site
& site,
const
GeneticCode
& gCode,
bool
minchange =
false
);
119
137
static
double
piNonSynonymous
(
const
Site
& site,
const
GeneticCode
& gCode,
bool
minchange =
false
);
138
151
static
double
numberOfSynonymousPositions
(
int
i,
const
GeneticCode
& gCode,
double
ratio = 1.0);
152
166
static
double
meanNumberOfSynonymousPositions
(
const
Site
& site,
const
GeneticCode
& gCode,
double
ratio = 1);
167
192
static
size_t
numberOfSubstitutions
(
const
Site
& site,
const
GeneticCode
& gCode,
double
freqmin = 0.);
193
208
static
size_t
numberOfNonSynonymousSubstitutions
(
const
Site
& site,
const
GeneticCode
& gCode,
double
freqmin = 0.);
209
243
static
std::vector<size_t>
fixedDifferences
(
const
Site
& siteIn,
const
Site
& siteOut,
int
i,
int
j,
const
GeneticCode
& gCode);
244
252
static
bool
isFourFoldDegenerated
(
const
Site
& site,
const
GeneticCode
& gCode);
253
};
254
}
// end of namespace bpp.
255
#endif
// BPP_SEQ_CODONSITETOOLS_H
CodonAlphabet.h
Exceptions.h
GeneticCode.h
Site.h
SymbolListTools.h
bpp::CodonAlphabet
Codon alphabet class.
Definition:
CodonAlphabet.h:31
bpp::CodonSiteTools
Utilitary functions for codon sites.
Definition:
CodonSiteTools.h:26
bpp::CodonSiteTools::piNonSynonymous
static double piNonSynonymous(const Site &site, const GeneticCode &gCode, bool minchange=false)
Compute the non-synonymous pi per codon site.
Definition:
CodonSiteTools.cpp:459
bpp::CodonSiteTools::numberOfSynonymousPositions
static double numberOfSynonymousPositions(int i, const GeneticCode &gCode, double ratio=1.0)
Return the number of synonymous positions of a codon.
Definition:
CodonSiteTools.cpp:496
bpp::CodonSiteTools::hasGapOrStop
static bool hasGapOrStop(const Site &site, const GeneticCode &gCode)
Method to know if a codon site contains gap(s) or stop codons.
Definition:
CodonSiteTools.cpp:26
bpp::CodonSiteTools::piSynonymous
static double piSynonymous(const Site &site, const GeneticCode &gCode, bool minchange=false)
Compute the synonymous pi per codon site.
Definition:
CodonSiteTools.cpp:427
bpp::CodonSiteTools::isFourFoldDegenerated
static bool isFourFoldDegenerated(const Site &site, const GeneticCode &gCode)
Definition:
CodonSiteTools.cpp:792
bpp::CodonSiteTools::isSynonymousPolymorphic
static bool isSynonymousPolymorphic(const Site &site, const GeneticCode &gCode)
Method to know if polymorphism at a codon site is synonymous.
Definition:
CodonSiteTools.cpp:94
bpp::CodonSiteTools::fixedDifferences
static std::vector< size_t > fixedDifferences(const Site &siteIn, const Site &siteOut, int i, int j, const GeneticCode &gCode)
Return a vector with the number of fixed synonymous and non-synonymous differences per codon site.
Definition:
CodonSiteTools.cpp:661
bpp::CodonSiteTools::numberOfSubstitutions
static size_t numberOfSubstitutions(const Site &site, const GeneticCode &gCode, double freqmin=0.)
Return the number of substitutions per codon site.
Definition:
CodonSiteTools.cpp:571
bpp::CodonSiteTools::numberOfSynonymousDifferences
static double numberOfSynonymousDifferences(int i, int j, const GeneticCode &gCode, bool minchange=false)
Compute the number of synonymous differences between two codons.
Definition:
CodonSiteTools.cpp:205
bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant
static std::unique_ptr< Site > generateCodonSiteWithoutRareVariant(const Site &site, const GeneticCode &gCode, double freqmin)
generate a codon site without rare variants
Definition:
CodonSiteTools.cpp:129
bpp::CodonSiteTools::numberOfDifferences
static size_t numberOfDifferences(int i, int j, const CodonAlphabet &ca)
Compute the number of differences between two codons.
Definition:
CodonSiteTools.cpp:191
bpp::CodonSiteTools::CodonSiteTools
CodonSiteTools()
Definition:
CodonSiteTools.h:28
bpp::CodonSiteTools::hasStop
static bool hasStop(const Site &site, const GeneticCode &gCode)
Method to know if a codon site contains stop codon or not.
Definition:
CodonSiteTools.cpp:41
bpp::CodonSiteTools::meanNumberOfSynonymousPositions
static double meanNumberOfSynonymousPositions(const Site &site, const GeneticCode &gCode, double ratio=1)
Return the mean number of synonymous positions per codon site.
Definition:
CodonSiteTools.cpp:537
bpp::CodonSiteTools::numberOfNonSynonymousSubstitutions
static size_t numberOfNonSynonymousSubstitutions(const Site &site, const GeneticCode &gCode, double freqmin=0.)
Return the number of Non Synonymous substitutions per codon site.
Definition:
CodonSiteTools.cpp:614
bpp::CodonSiteTools::isMonoSitePolymorphic
static bool isMonoSitePolymorphic(const Site &site)
Method to know if a polymorphic codon site is polymorphic at only one site.
Definition:
CodonSiteTools.cpp:56
bpp::CodonSiteTools::~CodonSiteTools
virtual ~CodonSiteTools()
Definition:
CodonSiteTools.h:29
bpp::GeneticCode
Partial implementation of the Transliterator interface for genetic code object.
Definition:
GeneticCode.h:50
bpp::Site
The Site class.
Definition:
Site.h:73
bpp::SymbolListTools
Utilitary functions dealing with both sites and sequences.
Definition:
SymbolListTools.h:23
bpp
This alphabet is used to deal NumericAlphabet.
Bpp
Seq
CodonSiteTools.h
Generated on Fri Jul 19 2024 12:16:01 for bpp-seq3 by
1.9.1