bpp-seq-omics  2.4.1
bpp::MafBlock Class Reference

A synteny block data structure, the basic unit of a MAF alignement file. More...

#include <Bpp/Seq/Io/Maf/MafBlock.h>

+ Inheritance diagram for bpp::MafBlock:
+ Collaboration diagram for bpp::MafBlock:

Public Member Functions

 MafBlock ()
 
 MafBlock (const MafBlock &block)
 
MafBlockoperator= (const MafBlock &block)
 
MafBlockclone () const
 
virtual ~MafBlock ()
 
void setScore (double score)
 
void setPass (unsigned int pass)
 
double getScore () const
 
unsigned int getPass () const
 
AlignedSequenceContainergetAlignment ()
 
const AlignedSequenceContainergetAlignment () const
 
size_t getNumberOfSequences () const
 
size_t getNumberOfSites () const
 
void addSequence (const MafSequence &sequence)
 
bool hasSequence (const std::string &name) const
 
const MafSequencegetSequence (const std::string &name) const
 
const MafSequencegetSequence (size_t i) const
 
bool hasSequenceForSpecies (const std::string &species) const
 
const MafSequencegetSequenceForSpecies (const std::string &species) const
 
std::vector< const MafSequence * > getSequencesForSpecies (const std::string &species) const
 
std::vector< std::string > getSpeciesList () const
 
void removeCoordinatesFromSequence (size_t i)
 
std::string getDescription () const
 
bool hasProperty (const std::string &property) const
 
const ClonablegetProperty (const std::string &property) const
 Get the data associated to a query property. More...
 
void deleteProperty (const std::string &property)
 Delete the data associated to a query property. More...
 
void setProperty (const std::string &property, Clonable *data)
 Set the data associated to a query property. More...
 

Private Member Functions

void deleteProperties_ ()
 

Private Attributes

double score_
 
unsigned int pass_
 
AlignedSequenceContainer alignment_
 
std::map< std::string, Clonable * > properties_
 

Detailed Description

A synteny block data structure, the basic unit of a MAF alignement file.

This class basically contains a AlignedSequenceContainer made of MafSequence objects.

Definition at line 55 of file MafBlock.h.

Constructor & Destructor Documentation

◆ MafBlock() [1/2]

bpp::MafBlock::MafBlock ( )
inline

Definition at line 65 of file MafBlock.h.

Referenced by clone().

◆ MafBlock() [2/2]

bpp::MafBlock::MafBlock ( const MafBlock block)
inline

Definition at line 72 of file MafBlock.h.

References properties_.

◆ ~MafBlock()

virtual bpp::MafBlock::~MafBlock ( )
inlinevirtual

Definition at line 99 of file MafBlock.h.

References deleteProperties_().

Member Function Documentation

◆ addSequence()

◆ clone()

MafBlock* bpp::MafBlock::clone ( ) const
inlinevirtual

Implements bpp::Clonable.

Definition at line 97 of file MafBlock.h.

References MafBlock().

◆ deleteProperties_()

void bpp::MafBlock::deleteProperties_ ( )
inlineprivate

Definition at line 241 of file MafBlock.h.

References properties_.

Referenced by operator=(), and ~MafBlock().

◆ deleteProperty()

void bpp::MafBlock::deleteProperty ( const std::string &  property)
inline

Delete the data associated to a query property.

Parameters
propertyThe property to look for.
Exceptions
Exceptionif no data is associated to the given property.

Definition at line 214 of file MafBlock.h.

References properties_.

Referenced by setProperty().

◆ getAlignment() [1/2]

◆ getAlignment() [2/2]

const AlignedSequenceContainer& bpp::MafBlock::getAlignment ( ) const
inline

Definition at line 109 of file MafBlock.h.

References alignment_.

◆ getDescription()

◆ getNumberOfSequences()

◆ getNumberOfSites()

◆ getPass()

◆ getProperty()

const Clonable& bpp::MafBlock::getProperty ( const std::string &  property) const
inline

Get the data associated to a query property.

Parameters
propertyThe property to look for.
Returns
The data associated to the given property.
Exceptions
Exceptionif no data is associated to the given property.

Definition at line 200 of file MafBlock.h.

References properties_.

◆ getScore()

◆ getSequence() [1/2]

◆ getSequence() [2/2]

const MafSequence& bpp::MafBlock::getSequence ( size_t  i) const
inline

Definition at line 125 of file MafBlock.h.

References getAlignment(), and bpp::AlignedSequenceContainer::getSequence().

◆ getSequenceForSpecies()

◆ getSequencesForSpecies()

◆ getSpeciesList()

std::vector<std::string> bpp::MafBlock::getSpeciesList ( ) const
inline

◆ hasProperty()

bool bpp::MafBlock::hasProperty ( const std::string &  property) const
inline
Returns
True or False, if data are associated to the given property.
Parameters
propertyThe name of the property to look for.

Definition at line 187 of file MafBlock.h.

References properties_.

Referenced by setProperty().

◆ hasSequence()

bool bpp::MafBlock::hasSequence ( const std::string &  name) const
inline

Definition at line 117 of file MafBlock.h.

References getAlignment(), and bpp::AlignedSequenceContainer::hasSequence().

◆ hasSequenceForSpecies()

◆ operator=()

MafBlock& bpp::MafBlock::operator= ( const MafBlock block)
inline

Definition at line 84 of file MafBlock.h.

References alignment_, deleteProperties_(), pass_, properties_, and score_.

◆ removeCoordinatesFromSequence()

void bpp::MafBlock::removeCoordinatesFromSequence ( size_t  i)
inline

Definition at line 170 of file MafBlock.h.

References getSequence().

Referenced by bpp::FullGapFilterMafIterator::analyseCurrentBlock_().

◆ setPass()

◆ setProperty()

void bpp::MafBlock::setProperty ( const std::string &  property,
Clonable data 
)
inline

Set the data associated to a query property.

An existing data associated to this property will be deleted and replaced by the new one.

Parameters
propertyThe property to look for.
dataThe data to associate to this property.
Exceptions
Exceptionif the pointer toward the input data is NULL.

Definition at line 231 of file MafBlock.h.

References deleteProperty(), hasProperty(), and properties_.

◆ setScore()

Member Data Documentation

◆ alignment_

AlignedSequenceContainer bpp::MafBlock::alignment_
private

◆ pass_

unsigned int bpp::MafBlock::pass_
private

Definition at line 60 of file MafBlock.h.

Referenced by getPass(), operator=(), and setPass().

◆ properties_

std::map<std::string, Clonable*> bpp::MafBlock::properties_
private

◆ score_

double bpp::MafBlock::score_
private

Definition at line 59 of file MafBlock.h.

Referenced by getScore(), operator=(), and setScore().


The documentation for this class was generated from the following file: