LocARNA-1.8.11
Public Types | Public Member Functions | List of all members
LocARNA::MultipleAlignment::SeqEntry Class Reference

A row in a multiple alignment. More...

#include <multiple_alignment.hh>

Public Types

typedef MultipleAlignment::size_type size_type
 size type
 
typedef std::pair< pos_type, pos_typepos_pair_t
 pair of positions
 

Public Member Functions

 SeqEntry (const std::string &name, const std::string &seq)
 Construct from strings name and seq. More...
 
 SeqEntry (const std::string &name, const string1 &seq)
 Construct from strings name and 1-based string seq. More...
 
 SeqEntry (const std::string &name, const std::string &description, const std::string &seq)
 Construct from strings name, description and seq. More...
 
 SeqEntry (const std::string &name, const std::string &description, const string1 &seq)
 Construct from strings name, description and 1-based string seq. More...
 
const std::string & name () const
 (read-only) access to name
 
const std::string & description () const
 (read-only) access to description
 
const string1seq () const
 (read-only) access to seq
 
size_type length_wogaps () const
 length without gaps
 
pos_type pos_to_col (pos_type pos) const
 map sequence position -> alignment column. More...
 
pos_pair_t col_to_pos (pos_type col) const
 
void reverse ()
 reverse sequence
 
void push_back (char c)
 append character to sequence More...
 
void set_seq (const string1 &seq)
 write access to seq
 

Detailed Description

A row in a multiple alignment.

pair of a name string and a sequence string; support projections

See also
MultipleAlignment

Constructor & Destructor Documentation

LocARNA::MultipleAlignment::SeqEntry::SeqEntry ( const std::string &  name,
const std::string &  seq 
)
inline

Construct from strings name and seq.

Parameters
nameSequence name
seqSequence string
Note
empty description
LocARNA::MultipleAlignment::SeqEntry::SeqEntry ( const std::string &  name,
const string1 seq 
)
inline

Construct from strings name and 1-based string seq.

Parameters
nameSequence name
seqSequence string
Note
empty description
LocARNA::MultipleAlignment::SeqEntry::SeqEntry ( const std::string &  name,
const std::string &  description,
const std::string &  seq 
)
inline

Construct from strings name, description and seq.

Parameters
nameSequence name
descriptionSequence description
seqSequence string
LocARNA::MultipleAlignment::SeqEntry::SeqEntry ( const std::string &  name,
const std::string &  description,
const string1 seq 
)
inline

Construct from strings name, description and 1-based string seq.

Parameters
nameSequence name
descriptionSequence description
seqSequence string

Member Function Documentation

MultipleAlignment::SeqEntry::pos_pair_t LocARNA::MultipleAlignment::SeqEntry::col_to_pos ( pos_type  col) const

map alignment column -> sequence positions

Note
time O(len)
Parameters
colcolumn index in aligmnent
Returns
pair of positions (pos1,pos2) if column col contains a non-gap, then pos1=pos2 is the position of the gap if column col contains a gap, then pos1 is the sequence position left of the gap or 0 and pos2 the position right of the gap or sequence length+1
size_type LocARNA::MultipleAlignment::SeqEntry::pos_to_col ( pos_type  pos) const

map sequence position -> alignment column.

Note
time O(len)
Parameters
posposition in sequence (without gaps) as marginal cases: pos 0 maps to 0 and a too large position maps to length+1
void LocARNA::MultipleAlignment::SeqEntry::push_back ( char  c)
inline

append character to sequence

Parameters
ccharacter

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