OpenStructure
Public Member Functions | Friends
ProfileHandle Class Reference

#include <profile_handle.hh>

Public Member Functions

 ProfileHandle ()
 
const std::vector< ProfileColumn > & GetColumns () const
 
const ProfileColumnGetNullModel () const
 
void SetNullModel (const ProfileColumn &null_model)
 
String GetSequence () const
 
void SetSequence (const String &seq)
 
Real GetNeff () const
 
void SetNeff (Real neff)
 
ProfileHandlePtr Extract (uint from, uint to) const
 
Real GetAverageEntropy () const
 
Real GetAverageScore (const ProfileHandle &other, uint offset=0) const
 
void AddColumn (const ProfileColumn &c, char olc='X')
 
void clear ()
 
size_t size () const
 
bool empty () const
 
ProfileColumnoperator[] (size_t index)
 
const ProfileColumnoperator[] (size_t index) const
 
ProfileColumnat (size_t index)
 
const ProfileColumnat (size_t index) const
 
ProfileColumnback ()
 
const ProfileColumnback () const
 
bool operator== (const ProfileHandle &other) const
 
bool operator!= (const ProfileHandle &other) const
 
ProfileColumnList::iterator columns_begin ()
 
ProfileColumnList::iterator columns_end ()
 
ProfileColumnList::const_iterator columns_begin () const
 
ProfileColumnList::const_iterator columns_end () const
 

Friends

std::ofstream & operator<< (std::ofstream &os, ProfileHandle &prof)
 
std::ifstream & operator>> (std::ifstream &is, ProfileHandle &prof)
 

Detailed Description

Provides a profile for a sequence.

Properties:

Definition at line 291 of file profile_handle.hh.

Constructor & Destructor Documentation

◆ ProfileHandle()

ProfileHandle ( )
inline

Constructs an empty profile handle (sequence = '', 0 columns).

Definition at line 294 of file profile_handle.hh.

Member Function Documentation

◆ AddColumn()

void AddColumn ( const ProfileColumn c,
char  olc = 'X' 
)
inline

Definition at line 334 of file profile_handle.hh.

◆ at() [1/2]

ProfileColumn& at ( size_t  index)
inline

Definition at line 351 of file profile_handle.hh.

◆ at() [2/2]

const ProfileColumn& at ( size_t  index) const
inline

Definition at line 353 of file profile_handle.hh.

◆ back() [1/2]

ProfileColumn& back ( )
inline

Definition at line 355 of file profile_handle.hh.

◆ back() [2/2]

const ProfileColumn& back ( ) const
inline

Definition at line 357 of file profile_handle.hh.

◆ clear()

void clear ( )
inline

Definition at line 341 of file profile_handle.hh.

◆ columns_begin() [1/2]

ProfileColumnList::iterator columns_begin ( )
inline

Definition at line 369 of file profile_handle.hh.

◆ columns_begin() [2/2]

ProfileColumnList::const_iterator columns_begin ( ) const
inline

Definition at line 371 of file profile_handle.hh.

◆ columns_end() [1/2]

ProfileColumnList::iterator columns_end ( )
inline

Definition at line 370 of file profile_handle.hh.

◆ columns_end() [2/2]

ProfileColumnList::const_iterator columns_end ( ) const
inline

Definition at line 374 of file profile_handle.hh.

◆ empty()

bool empty ( ) const
inline

Definition at line 345 of file profile_handle.hh.

◆ Extract()

ProfileHandlePtr Extract ( uint  from,
uint  to 
) const

Extract subset of profile for columns from until to-1 (0-indexing). Null model is copied from this profile.

Exceptions
Errorif to <= from or to > size().

◆ GetAverageEntropy()

Real GetAverageEntropy ( ) const

Compute average entropy over all columns.

◆ GetAverageScore()

Real GetAverageScore ( const ProfileHandle other,
uint  offset = 0 
) const

Compute score comparing columns other[i] and this->at(i+offset) Column score as in Soeding-2005, null model of this object used, result normalized by other.size()

◆ GetColumns()

const std::vector<ProfileColumn>& GetColumns ( ) const
inline

Definition at line 298 of file profile_handle.hh.

◆ GetNeff()

Real GetNeff ( ) const
inline

Definition at line 316 of file profile_handle.hh.

◆ GetNullModel()

const ProfileColumn& GetNullModel ( ) const
inline

Definition at line 300 of file profile_handle.hh.

◆ GetSequence()

String GetSequence ( ) const
inline

Definition at line 306 of file profile_handle.hh.

◆ operator!=()

bool operator!= ( const ProfileHandle other) const
inline

Definition at line 365 of file profile_handle.hh.

◆ operator==()

bool operator== ( const ProfileHandle other) const
inline

Definition at line 359 of file profile_handle.hh.

◆ operator[]() [1/2]

ProfileColumn& operator[] ( size_t  index)
inline

Definition at line 347 of file profile_handle.hh.

◆ operator[]() [2/2]

const ProfileColumn& operator[] ( size_t  index) const
inline

Definition at line 349 of file profile_handle.hh.

◆ SetNeff()

void SetNeff ( Real  neff)
inline

Definition at line 318 of file profile_handle.hh.

◆ SetNullModel()

void SetNullModel ( const ProfileColumn null_model)
inline

Definition at line 302 of file profile_handle.hh.

◆ SetSequence()

void SetSequence ( const String seq)
inline

Definition at line 308 of file profile_handle.hh.

◆ size()

size_t size ( ) const
inline

Definition at line 343 of file profile_handle.hh.

Friends And Related Function Documentation

◆ operator<<

std::ofstream& operator<< ( std::ofstream &  os,
ProfileHandle prof 
)
friend

Definition at line 381 of file profile_handle.hh.

◆ operator>>

std::ifstream& operator>> ( std::ifstream &  is,
ProfileHandle prof 
)
friend

Definition at line 401 of file profile_handle.hh.


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