19 #ifndef OST_SEQUENCE_HH
20 #define OST_SEQUENCE_HH
28 #include <boost/shared_ptr.hpp>
40 namespace ost {
namespace seq {
namespace impl {
53 const String& sequence_string,
54 const String& role=
"UNKNOWN");
75 void Cut(
int start,
int n);
150 return seq_string_[index];
154 return seq_string_[index];
172 void ShiftsFromSequence();
175 int GetPosNoBounds(
int index)
const;
177 static bool IsSequenceStringSane(
const String& seq_string);
186 std::list<Shift> shifts_;
195 #if(OST_INFO_ENABLED)
base class for the implementation
void ShiftRegion(int start, int end, int amount)
int GetIndex(const String &substr) const
void SetRole(const String &role)
void SetString(const String &seq)
Set sequence String.
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
SequenceImplPtr Copy() const
create copy sequence
int GetLastNonGap() const
Get position of last non-gap character in sequence.
SequenceImpl(const String &seq_name, const String &sequence_string, const String &role)
Construct new sequence object from sequence_string.
void Replace(const String &str, int start, int end)
replace substring starting from start to end
static SequenceImplPtr FromString(const String &seq_name, const String &sequence_string, const String &role="UNKNOWN")
Construct new sequence object from sequence_string.
char & operator[](size_t index)
int GetLength() const
Get lenght of sequence, including gaps.
int GetPos(int residue_index) const
Get zero-based index for given residue number.
void SetOneLetterCode(int position, char new_char)
void Normalise()
Remove everything 'unusual' from sequence.
mol::EntityView GetAttachedView() const
get attached view. may be an invalid entity view
void SetName(const String &name)
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.
void Cut(int start, int n)
const String & GetString() const
const String & GetName() const
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
ImageStateConstModOPAlgorithm< ShiftFnc > Shift
pointer_it< T > end(const std::vector< T > &values)
std::vector< SequenceImplPtr > SequenceList
boost::shared_ptr< SequenceImpl > SequenceImplPtr
#define DLLEXPORT_OST_SEQ