MDA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Friends | List of all members
MDAT::DomainArchitecture Class Reference

Represents a set of domains. More...

#include <DomainArchitecture.hpp>

Public Member Functions

void add_domain (const Domain &domain)
 Appends a Domain to the architecture. More...
 
size_t size () const
 
void resize (size_t new_size)
 
size_t length () const
 
Domainoperator[] (unsigned int index)
 
const Domainoperator[] (unsigned int index) const
 
int id () const
 Returns the id architecture. More...
 
void id (int id)
 Sets the id of the architecture. More...
 
size_t n_members () const
 Returns the number of sequences with this architecture. More...
 
void n_members (size_t value)
 Sets the number of sequences having this architecture. More...
 
void clean_up (unsigned char options)
 solves several problems of a domain architecture. More...
 
void sort ()
 Sorts the domains in the architecture according to their start. More...
 
void insert_gaps (std::string edit_string)
 Inserts a GapDomain at the given positions. More...
 
void collapse_repeats ()
 Merges repeats to together.
 
Constructores & Destructors
 DomainArchitecture ()
 Creates an empty DomainArchitecture.
 
virtual ~DomainArchitecture ()
 Destructor.
 

Friends

bool operator== (const DomainArchitecture &dom1, const DomainArchitecture &dom2)
 Checks if to architectures are the same. More...
 
bool operator!= (DomainArchitecture &dom1, DomainArchitecture &dom2)
 Checks if to architectures are different. More...
 
std::ostream & operator<< (std::ostream &out, const DomainArchitecture &archi)
 

Detailed Description

Represents a set of domains.

Member Function Documentation

void MDAT::DomainArchitecture::add_domain ( const Domain domain)
inline

Appends a Domain to the architecture.

Parameters
domainThe domain
void MDAT::DomainArchitecture::clean_up ( unsigned char  options)

solves several problems of a domain architecture.

Function to solve conflicting domains.

Several problems can appear when

Parameters
optionsThe options to be used (
See Also
CleanupOptions);

This function can solve several problems which appear after domain annotation, this includes nested domains, overlapping domains and split domains

Parameters
optionsDetermines which problem(s) have to be solved.
int MDAT::DomainArchitecture::id ( ) const
inline

Returns the id architecture.

Returns
The id of the architecture.
void MDAT::DomainArchitecture::id ( int  id)
inline

Sets the id of the architecture.

Parameters
idThe id of the architecture.
void MDAT::DomainArchitecture::insert_gaps ( std::string  edit_string)

Inserts a GapDomain at the given positions.

The edit_string has to be of the form "m-mm-" where '-' denote the gaps to introduce.

Parameters
edit_stringString noting gap positions.
size_t MDAT::DomainArchitecture::length ( ) const
inline

Length of the architecture.

Returns
The number of domains in the architecture.
size_t MDAT::DomainArchitecture::n_members ( ) const
inline

Returns the number of sequences with this architecture.

Returns
The number of sequences with this architecture.
void MDAT::DomainArchitecture::n_members ( size_t  value)
inline

Sets the number of sequences having this architecture.

Parameters
valueThe number of sequences having this architecture.
const Domain& MDAT::DomainArchitecture::operator[] ( unsigned int  index) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

size_t MDAT::DomainArchitecture::size ( ) const
inline

Length of the architecture.

Returns
The number of domains in the architecture.
void MDAT::DomainArchitecture::sort ( )

Sorts the domains in the architecture according to their start.

Sorts the Domain architectures by domain start.

Friends And Related Function Documentation

bool operator!= ( DomainArchitecture dom1,
DomainArchitecture dom2 
)
friend

Checks if to architectures are different.

Parameters
dom1The first architecture.
dom2The second architecture.
Returns
True if the two architectures are different else false.
bool operator== ( const DomainArchitecture dom1,
const DomainArchitecture dom2 
)
friend

Checks if to architectures are the same.

Parameters
dom1The first architecture.
dom2The second architecture.
Returns
True if the two architectures are the same else false.