Skip to content
Snippets Groups Projects
Commit 7bd977ae authored by marco's avatar marco
Browse files

added indexing access to ConstSequenceHandle, SetSequenceName for

AlignmentHandle


git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1913 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 3613ad2e
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,8 @@ void export_sequence()
.def("GetPos", &ConstSequenceHandle::GetPos)
.def("GetLength", &ConstSequenceHandle::GetLength)
.def("GetResidue", &ConstSequenceHandle::GetResidue)
.def("GetOneLetterCode", &ConstSequenceHandle::GetOneLetterCode)
.def("GetOneLetterCode", &ConstSequenceHandle::GetOneLetterCode)
.def("__getitem__", &ConstSequenceHandle::GetOneLetterCode)
.def("GetSequenceOffset", &ConstSequenceHandle::GetSequenceOffset)
.def("Copy", &ConstSequenceHandle::Copy)
.def("GetFirstNonGap", &ConstSequenceHandle::GetFirstNonGap)
......@@ -158,6 +159,7 @@ void export_sequence()
.def("Copy", &AlignmentHandle::Copy)
.def("ToString", &AlignmentHandle::ToString)
.def("GetLength", &AlignmentHandle::GetLength)
.def("__len__", &AlignmentHandle::GetLength)
.def("GetSequences", &AlignmentHandle::GetSequences)
.def("AttachView", attach_view_a)
.def("AttachView", attach_view_b)
......@@ -167,6 +169,7 @@ void export_sequence()
.def("__getitem__", &AlignmentHandle::operator[])
.def("__iter__", iterator<AlignmentHandle>())
.add_property("sequences", &AlignmentHandle::GetSequences)
.def("SetSequenceName", &AlignmentHandle::SetSequenceName)
;
class_<AlignedColumn>("AlignedColumn", no_init)
.def("GetIndex", &AlignedColumn::GetIndex)
......
......@@ -49,8 +49,10 @@ public:
void SetMaster(int master);
/// \brief delete interval and update length of AlignedRegion
void Delete();
///\brief replace region with content of AlignedRegion and set length to length of \p aln_r
/// \brief replace region with content of AlignedRegion and set length to
/// length of \p aln_r
void Replace(const AlignedRegion& aln_r);
/// \brief shift the aligned region of the master sequence to the left by
/// n characters.
void ShiftLeft(int n);
......
......@@ -231,4 +231,11 @@ AlignedColumn AlignmentHandle::operator[](int index)
return AlignedColumn(*this, index);
}
void AlignmentHandle::SetSequenceName(int seq_index, const String& name)
{
this->CheckValidity();
impl_->GetSequence(seq_index)->SetName(name);
}
}}
......@@ -104,7 +104,10 @@ public:
/// \sa SequenceHandle::AttachView(const mol::EntityView&, const String&)
void AttachView(int seq_index, const mol::EntityView& view,
const String& chain_name);
/// \brief set name of sequence
void SetSequenceName(int seq_index, const String& name);
/// \brief Get list of sequences (read-only)
ConstSequenceList GetSequences() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment