bpp-seq
2.2.0
|
This class provides some common tools for applications. More...
#include <Bpp/Seq/App/SequenceApplicationTools.h>
Public Member Functions | |
SequenceApplicationTools () | |
virtual | ~SequenceApplicationTools () |
Static Public Member Functions | |
static Alphabet * | getAlphabet (std::map< std::string, std::string > ¶ms, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, bool allowGeneric=false, int warn=1) throw (Exception) |
Build an Alphabet object according to options. More... | |
static GeneticCode * | getGeneticCode (const NucleicAlphabet *alphabet, const std::string &description) throw (Exception) |
Build a GeneticCode object according to options. More... | |
static AlphabetIndex1 * | getAlphabetIndex1 (const Alphabet *alphabet, const std::string &description, const std::string &message="Alphabet distance:", bool verbose=true) throw (Exception) |
Build a AlphabetIndex1 object for a given alphabet. More... | |
static AlphabetIndex2 * | getAlphabetIndex2 (const Alphabet *alphabet, const std::string &description, const std::string &message="Alphabet distance:", bool verbose=true) throw (Exception) |
Build a AlphabetIndex2 object for a given alphabet. More... | |
static SequenceContainer * | getSequenceContainer (const Alphabet *alpha, std::map< std::string, std::string > ¶ms, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1) |
Build a SequenceContainer object according to options. More... | |
static VectorSiteContainer * | getSiteContainer (const Alphabet *alpha, std::map< std::string, std::string > ¶ms, const std::string &suffix="", bool suffixIsOptional=true, bool verbose=true, int warn=1) |
Build a SiteContainer object according to options. More... | |
static VectorSiteContainer * | getSitesToAnalyse (const SiteContainer &allSites, std::map< std::string, std::string > ¶ms, std::string suffix="", bool suffixIsOptional=true, bool gapAsUnknown=true, bool verbose=true, int warn=1) |
Retrieves sites suitable for the analysis. More... | |
static void | writeSequenceFile (const SequenceContainer &sequences, std::map< std::string, std::string > ¶ms, const std::string &suffix="", bool verbose=true, int warn=1) |
Write a sequence file according to options. More... | |
static void | writeAlignmentFile (const SiteContainer &sequences, std::map< std::string, std::string > ¶ms, const std::string &suffix="", bool verbose=true, int warn=1) |
Write a sequence alignment file according to options. More... | |
This class provides some common tools for applications.
The functions parse some option file, create corresponding objects and send a pointer toward it.
The option files are supposed to follow this simple format:
with one parameter per line.
Definition at line 70 of file SequenceApplicationTools.h.
|
inline |
Definition at line 73 of file SequenceApplicationTools.h.
|
inlinevirtual |
Definition at line 74 of file SequenceApplicationTools.h.
|
static |
Build an Alphabet object according to options.
Options used are:
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
suffixIsOptional | Tell if the suffix is absolutely required. |
verbose | Print some info to the 'message' output stream. |
allowGeneric | Tell if generic alphabets can be used. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 73 of file SequenceApplicationTools.cpp.
References bpp::AlphabetTools::isNucleicAlphabet().
|
static |
Build a AlphabetIndex1 object for a given alphabet.
alphabet | The alphabet to use. This is currently only used for assessing the type of distance allowed. |
description | Which distance to use. See the Bio++ Program Suite reference manual for a description of the syntax. |
message | To be displayed when parsing. |
verbose | Tell if some info should be displayed while parsing. |
Exception | in case of bad description. |
Definition at line 213 of file SequenceApplicationTools.cpp.
References bpp::BppOAlphabetIndex1Format::read().
|
static |
Build a AlphabetIndex2 object for a given alphabet.
alphabet | The alphabet to use. This is currently only used for assessing the type of distance allowed. |
description | Which distance to use. See the Bio++ Program Suite reference manual for a description of the syntax. |
message | To be displayed when parsing. |
verbose | Tell if some info should be displayed while parsing. |
Exception | in case of bad description. |
Definition at line 220 of file SequenceApplicationTools.cpp.
References bpp::BppOAlphabetIndex2Format::read().
|
static |
Build a GeneticCode object according to options.
alphabet | pointer to the NucleicAlphabet |
description | for the name of the GeneticCode: [EchinodermMitochondrialGeneticCode | InvertebrateMitochondrialGeneticCode | InvertebrateMitochondrialGeneticCode | StandardGeneticCode | VertebrateMitochondrialGeneticCode] |
Exception | in case of bad description. |
Definition at line 187 of file SequenceApplicationTools.cpp.
|
static |
Build a SequenceContainer object according to options.
The sequences do not have to be aligned. The supported sequence formats are Fasta, DCSE, Clustal, Mase, Phylip and GenBank.
See the Bio++ program suite manual for a full description of the syntax.
alpha | The alphabet to use in the container. |
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
suffixIsOptional | Tell if the suffix is absolutely required. |
verbose | Print some info to the 'message' output stream. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 228 of file SequenceApplicationTools.cpp.
References bpp::BppOSequenceReaderFormat::read().
|
static |
Build a SiteContainer object according to options.
Sequences in file must be aligned. The supported sequence formats are Fasta, DCSE, Clustal, Mase and Phylip.
See the Bio++ program suite manual for a full description of the syntax.
alpha | The alphabet to use in the container. |
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
suffixIsOptional | Tell if the suffix is absolutely required. |
verbose | Print some info to the 'message' output stream. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 252 of file SequenceApplicationTools.cpp.
References bpp::VectorSiteContainer::addSequence(), bpp::VectorSiteContainer::getNumberOfSequences(), bpp::VectorSiteContainer::getNumberOfSites(), bpp::MaseTools::getSelectedSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::VectorSiteContainer::getSequence(), bpp::BppOAlignmentReaderFormat::getUnparsedArguments(), bpp::AlphabetTools::isRNYAlphabet(), bpp::BppOAlignmentReaderFormat::read(), bpp::VectorSiteContainer::reindexSites(), and bpp::SequenceTools::RNYslice().
|
static |
Retrieves sites suitable for the analysis.
Options used are:
If the 'complete' option is used, only fully resolve site will be taken into account. If the 'nogap' option is used, only sites without gap will be taken into account. If 'gapAsUnknown' is set to true and the all option is selected, gaps will be changed to 'unknown' character is sequences.
allSites | The site container from which sites must be retrieved. |
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
suffixIsOptional | Tell if the suffix is absolutely required. |
gapAsUnknown | Convert gaps to unknown characters. |
verbose | Print some info to the 'message' output stream. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 386 of file SequenceApplicationTools.cpp.
References bpp::SiteContainerTools::changeGapsToUnknownCharacters(), bpp::SiteContainer::deleteSite(), bpp::SequenceContainer::getAlphabet(), bpp::SiteContainerTools::getCompleteSites(), bpp::SymbolListTools::getCounts(), bpp::SymbolListTools::getFrequencies(), bpp::CodonAlphabet::getNucleicAlphabet(), bpp::OrderedSequenceContainer::getNumberOfSequences(), bpp::SiteContainer::getNumberOfSites(), bpp::SiteContainer::getSite(), bpp::SiteContainerTools::getSitesWithoutGaps(), bpp::Alphabet::getSize(), and bpp::SiteContainerTools::removeStopCodonSites().
|
static |
Write a sequence alignment file according to options.
The supported sequence formats are Fasta, Mase and Phylip.
See the Bio++ program suite manual for a full description of the syntax.
sequences | The aligned sequences to write. |
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
verbose | Print some info to the 'message' output stream. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 577 of file SequenceApplicationTools.cpp.
References bpp::BppOAlignmentWriterFormat::read().
|
static |
Write a sequence file according to options.
The supported sequence formats are Fasta and Mase.
See the Bio++ program suite manual for a full description of the syntax.
sequences | The sequences to write. |
params | The attribute map where options may be found. |
suffix | A suffix to be applied to each attribute name. |
verbose | Print some info to the 'message' output stream. |
warn | Set the warning level (0: always display warnings, >0 display warnings on demand). |
Definition at line 554 of file SequenceApplicationTools.cpp.
References bpp::BppOSequenceWriterFormat::read().