bpp-seq
2.2.0
|
Utilitary functions dealing with alphabets. More...
#include <Bpp/Seq/Alphabet/AlphabetTools.h>
Public Member Functions | |
AlphabetTools () | |
virtual | ~AlphabetTools () |
Static Public Member Functions | |
static int | getType (char state) |
Character identification method for sequence's alphabet identification. More... | |
static bool | checkAlphabetCodingSize (const Alphabet &alphabet) throw (AlphabetException) |
This checks that all characters in the alphabet are coded by a string of same length. More... | |
static bool | checkAlphabetCodingSize (const Alphabet *alphabet) throw (AlphabetException) |
This checks that all characters in the alphabet are coded by a string of same length. More... | |
static unsigned int | getAlphabetCodingSize (const Alphabet &alphabet) throw (AlphabetException) |
In case that all states in the given alphabet have a string description of same length, send this length; e.g. 3 for codon alphabets. More... | |
static unsigned int | getAlphabetCodingSize (const Alphabet *alphabet) throw (AlphabetException) |
In case that all states in the given alphabet have a string description of same length, send this length; e.g. 3 for codon alphabets. More... | |
static bool | isNucleicAlphabet (const Alphabet *alphabet) |
static bool | isDNAAlphabet (const Alphabet *alphabet) |
static bool | isRNAAlphabet (const Alphabet *alphabet) |
static bool | isProteicAlphabet (const Alphabet *alphabet) |
static bool | isCodonAlphabet (const Alphabet *alphabet) |
static bool | isWordAlphabet (const Alphabet *alphabet) |
static bool | isRNYAlphabet (const Alphabet *alphabet) |
static bool | isBinaryAlphabet (const Alphabet *alphabet) |
static bool | isDefaultAlphabet (const Alphabet *alphabet) |
static bool | match (const Alphabet *alphabet, int i, int j) |
Tell if two characters match according to a given alphabet. More... | |
Static Public Attributes | |
static const DNA | DNA_ALPHABET |
static const RNA | RNA_ALPHABET |
static const ProteicAlphabet | PROTEIN_ALPHABET |
static const DefaultAlphabet | DEFAULT_ALPHABET |
Static Private Member Functions | |
template<class Y > | |
static bool | alphabetInheritsFrom (const Alphabet *alphabet) |
Utilitary functions dealing with alphabets.
Definition at line 59 of file AlphabetTools.h.
|
inline |
Definition at line 68 of file AlphabetTools.h.
|
inlinevirtual |
Definition at line 69 of file AlphabetTools.h.
|
inlinestaticprivate |
Definition at line 215 of file AlphabetTools.h.
|
static |
This checks that all characters in the alphabet are coded by a string of same length.
This method is used when states are coded by more than one character, typically: codon alphabets.
alphabet | The alphabet to check. |
Definition at line 89 of file AlphabetTools.cpp.
|
static |
This checks that all characters in the alphabet are coded by a string of same length.
This function performs the same work as the previous one, but deals with pointers instead of reference. This may be more convenient since we often use pointers on alphabets.
alphabet | a pointer toward the alphabet to check. |
Definition at line 104 of file AlphabetTools.cpp.
|
static |
In case that all states in the given alphabet have a string description of same length, send this length; e.g. 3 for codon alphabets.
alphabet | The alphabet to analyse. |
Definition at line 111 of file AlphabetTools.cpp.
Referenced by bpp::StringSequenceTools::codeSequence().
|
static |
In case that all states in the given alphabet have a string description of same length, send this length; e.g. 3 for codon alphabets.
This function performs the same work as the previous one, but deals with pointers instead of reference. This may be more convenient since we often use pointers on alphabets.
alphabet | a pointer toward the alphabet to analyse. |
Definition at line 120 of file AlphabetTools.cpp.
|
static |
Character identification method for sequence's alphabet identification.
Return :
state | The character to test. |
Definition at line 60 of file AlphabetTools.cpp.
Referenced by bpp::StringSequenceTools::getAlphabetFromSequence().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 179 of file AlphabetTools.h.
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 161 of file AlphabetTools.h.
Referenced by bpp::CodonSiteTools::fixedDifferences(), bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant(), bpp::GeneticCode::getCodingSequence(), bpp::CodonSiteTools::hasGapOrStop(), bpp::CodonSiteTools::hasStop(), bpp::CodonSiteTools::isMonoSitePolymorphic(), bpp::CodonSiteTools::isSynonymousPolymorphic(), bpp::CodonSiteTools::meanNumberOfSynonymousPositions(), bpp::CodonSiteTools::numberOfNonSynonymousSubstitutions(), bpp::CodonSiteTools::numberOfSubsitutions(), bpp::CodonSiteTools::piNonSynonymous(), and bpp::CodonSiteTools::piSynonymous().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 185 of file AlphabetTools.h.
Referenced by bpp::SiteContainerTools::resolveDottedAlignment().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 143 of file AlphabetTools.h.
Referenced by bpp::RNY::RNY().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 137 of file AlphabetTools.h.
Referenced by bpp::SequenceApplicationTools::getAlphabet(), bpp::GeneticCode::getCodingSequence(), and bpp::RNY::getRNY().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 155 of file AlphabetTools.h.
Referenced by bpp::BppOAlphabetIndex1Format::read(), and bpp::BppOAlphabetIndex2Format::read().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 149 of file AlphabetTools.h.
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 173 of file AlphabetTools.h.
Referenced by bpp::SequenceApplicationTools::getSiteContainer().
|
inlinestatic |
alphabet | The alphabet to check. |
Definition at line 167 of file AlphabetTools.h.
|
inlinestatic |
Tell if two characters match according to a given alphabet.
Example (DNA):
* A,T: false * A,A: true * A,N: true * A,Y: false * N,Y: true * N,N: true *
alphabet | The alphabet to use. |
i | First character to check. |
j | Secondt character to check. |
Definition at line 205 of file AlphabetTools.h.
References bpp::Alphabet::getAlias().
Referenced by bpp::SequenceTools::findFirstOf().
|
static |
Definition at line 65 of file AlphabetTools.h.
Referenced by bpp::NexusIOSequence::appendAlignmentFromStream().
|
static |
Definition at line 62 of file AlphabetTools.h.
|
static |
Definition at line 64 of file AlphabetTools.h.
Referenced by bpp::AAMassIndex::getAlphabet(), bpp::AASEAInf10Index::getAlphabet(), bpp::AASEASup30Index::getAlphabet(), bpp::AASurfaceIndex::getAlphabet(), bpp::AASEA1030Index::getAlphabet(), bpp::AAChouFasmanBSheetIndex::getAlphabet(), bpp::AAChouFasmanTurnIndex::getAlphabet(), bpp::AAVolumeIndex::getAlphabet(), bpp::AAChouFasmanAHelixIndex::getAlphabet(), bpp::AAChenGuHuangHydrophobicityIndex::getAlphabet(), bpp::GranthamAAPolarityIndex::getAlphabet(), bpp::KleinAANetChargeIndex::getAlphabet(), bpp::GranthamAAVolumeIndex::getAlphabet(), bpp::AAChargeIndex::getAlphabet(), bpp::AASEA1030Index::getIndex(), bpp::AASEASup30Index::getIndex(), bpp::AASurfaceIndex::getIndex(), bpp::AAMassIndex::getIndex(), bpp::AASEAInf10Index::getIndex(), bpp::AAVolumeIndex::getIndex(), bpp::AAChouFasmanAHelixIndex::getIndex(), bpp::AAChouFasmanTurnIndex::getIndex(), bpp::AAChouFasmanBSheetIndex::getIndex(), bpp::AAChenGuHuangHydrophobicityIndex::getIndex(), bpp::GranthamAAPolarityIndex::getIndex(), bpp::KleinAANetChargeIndex::getIndex(), bpp::GranthamAAVolumeIndex::getIndex(), and bpp::AAChargeIndex::getIndex().
|
static |
Definition at line 63 of file AlphabetTools.h.