bpp-seq  2.2.0
bpp::SequenceAnnotation Class Referenceabstract

Interface for sequence annotations. More...

#include <Bpp/Seq/SequenceWithAnnotation.h>

+ Inheritance diagram for bpp::SequenceAnnotation:
+ Collaboration diagram for bpp::SequenceAnnotation:

Public Member Functions

virtual SequenceAnnotationclone () const =0
 
virtual void init (const Sequence &seq)=0
 
virtual const std::string & getType () const =0
 
virtual bool isValidWith (const SequenceWithAnnotation &sequence, bool throwException=true) const =0
 Test is the annotation is valid for a given sequence. More...
 
virtual bool merge (const SequenceAnnotation &anno)=0
 Merge the input annotation with the current one. More...
 
virtual SequenceAnnotationgetPartAnnotation (size_t pos, size_t len) const =0 throw (Exception)
 
virtual bool isRemovable () const =0
 
virtual bool isShared () const =0
 
virtual void beforeSequenceChanged (const SymbolListEditionEvent &event)=0
 
virtual void afterSequenceChanged (const SymbolListEditionEvent &event)=0
 
virtual void beforeSequenceInserted (const SymbolListInsertionEvent &event)=0
 
virtual void afterSequenceInserted (const SymbolListInsertionEvent &event)=0
 
virtual void beforeSequenceDeleted (const SymbolListDeletionEvent &event)=0
 
virtual void afterSequenceDeleted (const SymbolListDeletionEvent &event)=0
 
virtual void beforeSequenceSubstituted (const SymbolListSubstitutionEvent &event)=0
 
virtual void afterSequenceSubstituted (const SymbolListSubstitutionEvent &event)=0
 

Detailed Description

Interface for sequence annotations.

Definition at line 57 of file SequenceWithAnnotation.h.

Member Function Documentation

◆ afterSequenceChanged()

virtual void bpp::SymbolListListener::afterSequenceChanged ( const SymbolListEditionEvent event)
pure virtualinherited

◆ afterSequenceDeleted()

virtual void bpp::SymbolListListener::afterSequenceDeleted ( const SymbolListDeletionEvent event)
pure virtualinherited

◆ afterSequenceInserted()

virtual void bpp::SymbolListListener::afterSequenceInserted ( const SymbolListInsertionEvent event)
pure virtualinherited

◆ afterSequenceSubstituted()

virtual void bpp::SymbolListListener::afterSequenceSubstituted ( const SymbolListSubstitutionEvent event)
pure virtualinherited

◆ beforeSequenceChanged()

virtual void bpp::SymbolListListener::beforeSequenceChanged ( const SymbolListEditionEvent event)
pure virtualinherited

◆ beforeSequenceDeleted()

virtual void bpp::SymbolListListener::beforeSequenceDeleted ( const SymbolListDeletionEvent event)
pure virtualinherited

◆ beforeSequenceInserted()

virtual void bpp::SymbolListListener::beforeSequenceInserted ( const SymbolListInsertionEvent event)
pure virtualinherited

◆ beforeSequenceSubstituted()

virtual void bpp::SymbolListListener::beforeSequenceSubstituted ( const SymbolListSubstitutionEvent event)
pure virtualinherited

◆ clone()

virtual SequenceAnnotation* bpp::SequenceAnnotation::clone ( ) const
pure virtual

◆ getPartAnnotation()

virtual SequenceAnnotation* bpp::SequenceAnnotation::getPartAnnotation ( size_t  pos,
size_t  len 
) const
throw (Exception
)
pure virtual
Returns
A new annotation corresponding to a part of the sequence. The implementation of this highly depends on the annotation type, and might not be supported.
Parameters
posStarting point of the region.
lenThe length of the region, in number of positions.

Implemented in bpp::SequenceQuality, and bpp::SequenceMask.

◆ getType()

virtual const std::string& bpp::SequenceAnnotation::getType ( ) const
pure virtual
Returns
The type of the annotation. This is used for querying annotations.

Implemented in bpp::SequenceQuality, and bpp::SequenceMask.

Referenced by bpp::SequenceWithAnnotation::getAnnotation(), bpp::SequenceWithAnnotation::getAnnotationTypes(), and bpp::SequenceWithAnnotation::hasAnnotation().

◆ init()

virtual void bpp::SequenceAnnotation::init ( const Sequence seq)
pure virtual

Creates a default annotation according to a given sequence.

Parameters
seqThe template sequence (typically the one with which the annotation will be attached).

Implemented in bpp::SequenceQuality, and bpp::SequenceMask.

Referenced by bpp::SequenceWithAnnotation::merge().

◆ isRemovable()

virtual bool bpp::SymbolListListener::isRemovable ( ) const
pure virtualinherited

◆ isShared()

virtual bool bpp::SymbolListListener::isShared ( ) const
pure virtualinherited

◆ isValidWith()

virtual bool bpp::SequenceAnnotation::isValidWith ( const SequenceWithAnnotation sequence,
bool  throwException = true 
) const
pure virtual

Test is the annotation is valid for a given sequence.

Parameters
sequenceThe sequence to be validated against.
throwExceptionIf set to yes, throw an exception if the sequence is not valid.
Returns
true if this annotation is complient with the given sequence.

Implemented in bpp::SequenceQuality, and bpp::SequenceMask.

◆ merge()

virtual bool bpp::SequenceAnnotation::merge ( const SequenceAnnotation anno)
pure virtual

Merge the input annotation with the current one.

Parameters
annoThe annotation to fuse.
Returns
true if the fusion was possible and succesful.

Implemented in bpp::SequenceQuality, and bpp::SequenceMask.

Referenced by bpp::SequenceWithAnnotation::merge().


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