bpp-seq
2.2.0
|
Utilitary methods that deal with the Mase format. More...
#include <Bpp/Seq/Io/MaseTools.h>
Static Public Member Functions | |
static SiteSelection | getSiteSet (const Comments &maseFileHeader, const std::string &setName) throw (IOException) |
Get a site selection from a Mase+ header file. More... | |
static SequenceSelection | getSequenceSet (const Comments &maseFileHeader, const std::string &setName) throw (IOException) |
Get a sequence selection from a Mase+ header file. More... | |
static SiteContainer * | getSelectedSites (const SiteContainer &sequences, const std::string &setName) throw (IOException) |
Create a new container corresponding to a site set given in the mase+ format. More... | |
static SequenceContainer * | getSelectedSequences (const OrderedSequenceContainer &sequences, const std::string &setName) throw (IOException) |
Create a new container corresponding to a site set given in the mase+ format. More... | |
static std::map< std::string, size_t > | getAvailableSiteSelections (const Comments &maseHeader) |
Get a list of all available site selections. More... | |
static std::map< std::string, size_t > | getAvailableSequenceSelections (const Comments &maseHeader) |
Get a list of all available sequences selections. More... | |
static size_t | getPhase (const Comments &maseFileHeader, const std::string &setName) throw (Exception) |
Get the phase of a given coding region from a mase+ header. More... | |
Utilitary methods that deal with the Mase format.
This class particularily covers the Mase+ format, which allows site and sequence selection. Mase+ tags are in the header of the mase file, which is stored in the 'general comment' section of sequence containers. Most of the methods here hence work on the general comments associated to a container.
Definition at line 63 of file MaseTools.h.
|
static |
Get a list of all available sequences selections.
maseHeader | Comments as described in the Mase+ format specification. |
Definition at line 243 of file MaseTools.cpp.
|
static |
Get a list of all available site selections.
maseHeader | Comments as described in the Mase+ format specification. |
Definition at line 196 of file MaseTools.cpp.
|
static |
Get the phase of a given coding region from a mase+ header.
Look for a /codon_start tag with a phase indice and a site selection with name setName.
maseFileHeader | Comments in Mase+ format. |
setName | a cds site selection name. |
Exception | If no corresponding tag found in file. |
Definition at line 269 of file MaseTools.cpp.
|
static |
Create a new container corresponding to a site set given in the mase+ format.
A new VectorSequenceContainer is created, whose destruction is up to the user. The container passed as argument must have 'general comments' in the mase+ format. This function calls the getSequenceSet() function on the comments and then calls for SiteContainerTools::getSelectedSequences() on the selection.
sequences | The container to get the sequence from. |
setName | The name of the set to retrieve. |
IOException | If the specified set is not found. |
Definition at line 184 of file MaseTools.cpp.
|
static |
Create a new container corresponding to a site set given in the mase+ format.
A new VectorSiteContainer is created, whose destruction is up to the user. The container passed as argument must have 'general comments' in the mase+ format. This function calls the getSiteSet() function on the comments and then calls for SiteContainerTools::getSelectedSites() on the selection.
sequences | The container to get the sites from. |
setName | The name of the set to retrieve. |
IOException | If the specified set is not found. |
Definition at line 151 of file MaseTools.cpp.
Referenced by bpp::SequenceApplicationTools::getSiteContainer().
|
static |
Get a sequence selection from a Mase+ header file.
maseFileHeader | The header of the mase+ file as comments lines. |
setName | The name of the set to retrieve. |
IOException | If the specified set is not found. |
Definition at line 104 of file MaseTools.cpp.
|
static |
Get a site selection from a Mase+ header file.
maseFileHeader | The header of the mase+ file as comments lines. |
setName | The name of the set to retrieve. |
IOException | If the specified set is not found. |
Definition at line 52 of file MaseTools.cpp.