bpp-phyl3
3.0.0
|
Frequencies set I/O in BppO format. More...
#include <Bpp/Phyl/Io/BppOFrequencySetFormat.h>
Public Member Functions | |
BppOFrequencySetFormat (unsigned char alphabetCode, bool verbose, int warn) | |
BppOFrequencySetFormat (const BppOFrequencySetFormat &format) | |
BppOFrequencySetFormat & | operator= (const BppOFrequencySetFormat &format) |
virtual | ~BppOFrequencySetFormat () |
const std::string | getFormatName () const override |
const std::string | getFormatDescription () const override |
void | setGeneticCode (std::shared_ptr< const GeneticCode > gCode) |
Set the genetic code to use in case a codon frequencies set should be built. More... | |
std::unique_ptr< FrequencySetInterface > | readFrequencySet (std::shared_ptr< const Alphabet > alphabet, const std::string &freqDescription, const std::map< size_t, std::shared_ptr< const AlignmentDataInterface >> &mData, size_t nData, bool parseArguments=true) override |
Read a frequencies set from a string. More... | |
const std::map< std::string, std::string > & | getUnparsedArguments () const override |
void | writeFrequencySet (const FrequencySetInterface &freqset, OutputStream &out, std::map< std::string, std::string > &globalAliases, std::vector< std::string > &writtenNames) const override |
Write a substitution model to a stream. More... | |
void | setVerbose (bool verbose) |
virtual const std::string | getDataType () const |
Static Public Attributes | |
static unsigned char | DNA = 1 |
static unsigned char | RNA = 2 |
static unsigned char | NUCLEOTIDE = 1 | 2 |
static unsigned char | PROTEIN = 4 |
static unsigned char | CODON = 8 |
static unsigned char | WORD = 16 |
static unsigned char | ALL = 1 | 2 | 4 | 8 | 16 |
Private Member Functions | |
void | initialize_ (FrequencySetInterface &freqSet, std::shared_ptr< const AlignmentDataInterface > data) |
Private Attributes | |
unsigned char | alphabetCode_ |
bool | verbose_ |
std::map< std::string, std::string > | unparsedArguments_ |
std::shared_ptr< const GeneticCode > | geneticCode_ |
int | warningLevel_ |
Frequencies set I/O in BppO format.
Allow to create a new frequencies set object according to model description syntax (see the Bio++ Program Suite manual for a detailed description of this syntax).
Definition at line 22 of file BppOFrequencySetFormat.h.
|
inline |
Definition at line 43 of file BppOFrequencySetFormat.h.
|
inline |
Definition at line 51 of file BppOFrequencySetFormat.h.
|
inlinevirtual |
Definition at line 69 of file BppOFrequencySetFormat.h.
|
inlinevirtualinherited |
Implements bpp::IOFormat.
Definition at line 32 of file IoFrequencySet.h.
|
inlineoverridevirtual |
Implements bpp::IOFormat.
Definition at line 74 of file BppOFrequencySetFormat.h.
|
inlineoverridevirtual |
Implements bpp::IOFormat.
Definition at line 72 of file BppOFrequencySetFormat.h.
|
inlineoverridevirtual |
Implements bpp::IFrequencySet.
Definition at line 93 of file BppOFrequencySetFormat.h.
References unparsedArguments_.
Referenced by bpp::PhylogeneticsApplicationTools::getFrequencySet(), bpp::PhylogeneticsApplicationTools::getRootFrequencySets(), readFrequencySet(), bpp::BppOSubstitutionModelFormat::readSubstitutionModel(), bpp::BppOTransitionModelFormat::readTransitionModel(), and bpp::BppOSubstitutionModelFormat::readWord_().
|
private |
Definition at line 821 of file BppOFrequencySetFormat.cpp.
References bpp::ApplicationTools::displayResult(), bpp::ApplicationTools::getDoubleParameter(), bpp::SequenceContainerTools::getFrequencies(), bpp::ParameterAliasable::getIndependentParameters(), bpp::StringTokenizer::hasMoreToken(), bpp::ParameterAliasable::matchParametersValues(), bpp::StringTokenizer::nextToken(), bpp::FrequencySetInterface::setFrequencies(), bpp::FrequencySetInterface::setFrequenciesFromAlphabetStatesFrequencies(), bpp::AutoParameter::setMessageHandler(), bpp::ParameterList::setParameter(), bpp::ParameterList::size(), bpp::TextTools::toDouble(), bpp::TextTools::toString(), and bpp::ApplicationTools::warning.
|
inline |
Definition at line 59 of file BppOFrequencySetFormat.h.
References alphabetCode_, geneticCode_, unparsedArguments_, verbose_, and warningLevel_.
|
overridevirtual |
Read a frequencies set from a string.
alphabet | The alphabet to use in the model. |
freqDescription | A string describing the frequencies set. |
mData | A map towards pointers of SiteContainer with the data to use to initialize frequency parameters |
nData | Number of the SiteContainer in the mData. Can be set to 0, if none assigned. |
parseArguments | Attempt to parse function arguments. If not, only store them and use default values instead. |
Exception | if an error occurred. |
Implements bpp::IFrequencySet.
Definition at line 44 of file BppOFrequencySetFormat.cpp.
References bpp::ApplicationTools::displayResult(), bpp::ApplicationTools::displayWarning(), bpp::CodonFrequencySetInterface::F0, bpp::CodonFrequencySetInterface::F1X4, bpp::CodonFrequencySetInterface::F3X4, bpp::CodonFrequencySetInterface::F61, bpp::CodonFrequencySetInterface::getFrequencySetForCodons(), getUnparsedArguments(), bpp::BppOSubstitutionModelFormat::getUnparsedArguments(), bpp::AlphabetTools::isCodonAlphabet(), bpp::TextTools::isDecimalInteger(), bpp::TextTools::isEmpty(), bpp::AlphabetTools::isNucleicAlphabet(), bpp::AlphabetTools::isProteicAlphabet(), bpp::AlphabetTools::isWordAlphabet(), bpp::KeyvalTools::parseProcedure(), readFrequencySet(), bpp::BppOTransitionModelFormat::readTransitionModel(), bpp::BppOSubstitutionModelFormat::setGeneticCode(), bpp::ParameterList::size(), bpp::TextTools::toInt(), and bpp::TextTools::toString().
Referenced by bpp::PhylogeneticsApplicationTools::getFrequencySet(), bpp::PhylogeneticsApplicationTools::getRootFrequencySets(), readFrequencySet(), bpp::BppOSubstitutionModelFormat::readSubstitutionModel(), bpp::BppOTransitionModelFormat::readTransitionModel(), and bpp::BppOSubstitutionModelFormat::readWord_().
|
inline |
Set the genetic code to use in case a codon frequencies set should be built.
gCode | The genetic code to use. |
Definition at line 81 of file BppOFrequencySetFormat.h.
References geneticCode_.
Referenced by bpp::PhylogeneticsApplicationTools::getFrequencySet(), bpp::PhylogeneticsApplicationTools::getRootFrequencySets(), bpp::BppOSubstitutionModelFormat::readSubstitutionModel(), bpp::BppOTransitionModelFormat::readTransitionModel(), and bpp::BppOSubstitutionModelFormat::readWord_().
|
inline |
Definition at line 104 of file BppOFrequencySetFormat.h.
References verbose_.
|
overridevirtual |
Write a substitution model to a stream.
pfreqset | A frequency set object; |
out | The output stream; |
globalAliases | parameters linked to global alias. The output will be "name=alias_name"; |
writtenNames | is the vector of the written parameters so far [in, out]; |
Implements bpp::OFrequencySet.
Definition at line 607 of file BppOFrequencySetFormat.cpp.
References bpp::BppOSubstitutionModelFormat::ALL, bpp::ParameterList::deleteParameter(), bpp::FrequencySetInterface::getFrequencies(), bpp::FullCodonFrequencySet::getMethod(), bpp::FrequencySetInterface::getName(), bpp::ParameterList::getParameterNames(), bpp::ParameterAliasable::getParameters(), bpp::OutputStream::getPrecision(), bpp::OutputStream::setPrecision(), bpp::ParameterList::size(), bpp::BppOSubstitutionModelFormat::write(), and bpp::BppOParametrizableFormat::write().
Referenced by bpp::LegacyPhylogeneticsApplicationTools::printParameters(), bpp::PhylogeneticsApplicationTools::printParameters(), and bpp::BppOSubstitutionModelFormat::write().
|
static |
Definition at line 33 of file BppOFrequencySetFormat.h.
Referenced by bpp::IOFrequencySetFactory::createReader(), bpp::IOFrequencySetFactory::createWriter(), bpp::PhylogeneticsApplicationTools::getFrequencySet(), bpp::PhylogeneticsApplicationTools::getRootFrequencySets(), bpp::LegacyPhylogeneticsApplicationTools::printParameters(), bpp::PhylogeneticsApplicationTools::printParameters(), bpp::BppOSubstitutionModelFormat::readSubstitutionModel(), and bpp::BppOTransitionModelFormat::readTransitionModel().
|
private |
Definition at line 36 of file BppOFrequencySetFormat.h.
Referenced by operator=().
|
static |
Definition at line 31 of file BppOFrequencySetFormat.h.
|
static |
Definition at line 27 of file BppOFrequencySetFormat.h.
|
private |
Definition at line 39 of file BppOFrequencySetFormat.h.
Referenced by operator=(), and setGeneticCode().
|
static |
Definition at line 29 of file BppOFrequencySetFormat.h.
|
static |
Definition at line 30 of file BppOFrequencySetFormat.h.
|
static |
Definition at line 28 of file BppOFrequencySetFormat.h.
|
private |
Definition at line 38 of file BppOFrequencySetFormat.h.
Referenced by getUnparsedArguments(), and operator=().
|
private |
Definition at line 37 of file BppOFrequencySetFormat.h.
Referenced by operator=(), and setVerbose().
|
private |
Definition at line 40 of file BppOFrequencySetFormat.h.
Referenced by operator=().
|
static |
Definition at line 32 of file BppOFrequencySetFormat.h.