OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )
inline

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

Definition at line 294 of file profile_handle.hh.

Member Function Documentation

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

Definition at line 334 of file profile_handle.hh.

ProfileColumn& at ( size_t  index)
inline

Definition at line 351 of file profile_handle.hh.

const ProfileColumn& at ( size_t  index) const
inline

Definition at line 353 of file profile_handle.hh.

ProfileColumn& back ( )
inline

Definition at line 355 of file profile_handle.hh.

const ProfileColumn& back ( ) const
inline

Definition at line 357 of file profile_handle.hh.

void clear ( )
inline

Definition at line 341 of file profile_handle.hh.

ProfileColumnList::iterator columns_begin ( )
inline

Definition at line 369 of file profile_handle.hh.

ProfileColumnList::const_iterator columns_begin ( ) const
inline

Definition at line 371 of file profile_handle.hh.

ProfileColumnList::iterator columns_end ( )
inline

Definition at line 370 of file profile_handle.hh.

ProfileColumnList::const_iterator columns_end ( ) const
inline

Definition at line 374 of file profile_handle.hh.

bool empty ( ) const
inline

Definition at line 345 of file profile_handle.hh.

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().
Real GetAverageEntropy ( ) const

Compute average entropy over all columns.

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()

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

Definition at line 298 of file profile_handle.hh.

Real GetNeff ( ) const
inline

Definition at line 316 of file profile_handle.hh.

const ProfileColumn& GetNullModel ( ) const
inline

Definition at line 300 of file profile_handle.hh.

String GetSequence ( ) const
inline

Definition at line 306 of file profile_handle.hh.

bool operator!= ( const ProfileHandle other) const
inline

Definition at line 365 of file profile_handle.hh.

bool operator== ( const ProfileHandle other) const
inline

Definition at line 359 of file profile_handle.hh.

ProfileColumn& operator[] ( size_t  index)
inline

Definition at line 347 of file profile_handle.hh.

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

Definition at line 349 of file profile_handle.hh.

void SetNeff ( Real  neff)
inline

Definition at line 318 of file profile_handle.hh.

void SetNullModel ( const ProfileColumn null_model)
inline

Definition at line 302 of file profile_handle.hh.

void SetSequence ( const String seq)
inline

Definition at line 308 of file profile_handle.hh.

size_t size ( ) const
inline

Definition at line 343 of file profile_handle.hh.

Friends And Related Function Documentation

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

Definition at line 381 of file profile_handle.hh.

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: