19 #ifndef OST_SEQ_SEQUENCE_HANDLE_HH
20 #define OST_SEQ_SEQUENCE_HANDLE_HH
39 namespace ost {
namespace seq {
42 class AlignmentHandle;
146 void CheckValidity()
const;
305 void CheckValidity()
const;
311 const String& role=
"UNKNOWN");
312 #if(OST_INFO_ENABLED)
base class for the handler classes
base class for the implementation
representation of a multiple sequence alignemnt consisting of two or more sequences
int GetIndex(const String &substr) const
get index of substring
SequenceHandle Copy() const
create copy sequence The newly created sequence has the same attached view.
char operator[](int index) const
String::const_iterator iterator
int GetFirstNonGap() const
Get position of first non-gap character in sequence.
int GetOffset() const
Get sequence offset from N-terminus.
bool HasAttachedView() const
whether the sequence has an attached view
bool operator!=(const ConstSequenceHandle &rhs) const
ConstSequenceHandle(const impl::SequenceImplPtr &impl)
int GetLastNonGap() const
Get position of last non-gap character in sequence.
impl::SequenceImplPtr & Impl() const
int GetLength() const
Get lenght of sequence, including gaps.
int GetPos(int residue_index) const
Get zero-based index for given residue number.
GenericPropContainerImpl * GpImpl()
ConstSequenceHandle()
create invalid sequence handle
mol::EntityView GetAttachedView() const
get attached view. may be an invalid entity view
bool operator==(const ConstSequenceHandle &rhs) const
bool IsValid() const
whether the sequence is valid
const GenericPropContainerImpl * GpImpl() const
int GetResidueIndex(int pos) const
Get residue index corresponding to given sequence position.
const String & GetString() const
get sequence as a string, including all the gaps
const String & GetName() const
Get name of sequence.
const String & GetRole() const
char GetOneLetterCode(int position) const
get one letter code of residue at position
String GetGaplessString() const
Get sequence as string ignoring gaps.
mol::ResidueView GetResidue(int position) const
get residue at position
list of immutable sequences.
int GetIndex(const String &substr) const
get index of substring
SequenceHandle Copy() const
create copy sequence The newly created sequence has the same attached view.
bool operator==(const SequenceHandle &rhs) const
void SetString(const String &seq)
Set sequence String.
String::const_iterator iterator
int GetFirstNonGap() const
Get position of first non-gap character in sequence.
int GetOffset() const
Get sequence offset from N-terminus.
bool HasAttachedView() const
whether the sequence has an attached view
char operator[](size_t index) const
SequenceHandle()
create invalid sequence handle
bool operator!=(const SequenceHandle &rhs) const
int GetLastNonGap() const
Get position of last non-gap character in sequence.
impl::SequenceImplPtr & Impl() const
int GetLength() const
Get lenght of sequence, including gaps.
void SetRole(const String &role) const
SequenceHandle(const impl::SequenceImplPtr &impl)
int GetPos(int residue_index) const
Get zero-based index for given residue number.
void SetOneLetterCode(int position, char new_char)
GenericPropContainerImpl * GpImpl()
void Normalise()
remove '.', '-' as gaps and make sequence all-uppercase Changes happen in place.
mol::EntityView GetAttachedView() const
get attached view. may be an invalid entity view
bool IsValid() const
whether the sequence is valid
const GenericPropContainerImpl * GpImpl() const
void SetName(const String &name)
set name of sequence
void AttachView(const mol::EntityView &view)
attach entity view to sequence
int GetResidueIndex(int pos) const
Get residue index corresponding to given sequence position.
void SetOffset(int offset)
Set sequence offset.
const String & GetString() const
get sequence as a string, including all the gaps
const String & GetName() const
Get name of sequence.
void AttachView(const mol::EntityView &view, const String &chain_name)
attach entity view to sequence
const String & GetRole() const
char GetOneLetterCode(int position) const
get one letter code of residue at position
String GetGaplessString() const
Get sequence as string ignoring gaps.
mol::ResidueView GetResidue(int position) const
get residue at position
boost::shared_ptr< SequenceImpl > SequenceImplPtr
SequenceHandle DLLEXPORT_OST_SEQ CreateSequence(const String &name, const String &seq, const String &role="UNKNOWN")
bool DLLEXPORT_OST_SEQ Match(const ConstSequenceHandle &s1, const ConstSequenceHandle &s2)
DLLEXPORT_OST_SEQ std::ostream & operator<<(std::ostream &os, const AlignedColumn &col)
#define DLLEXPORT_OST_SEQ