bpp-seq3  3.0.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 override=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 std::unique_ptr< SequenceAnnotationgetPartAnnotation (size_t pos, size_t len) const =0
 
virtual bool isRemovable () const =0
 
virtual bool isShared () const =0
 
virtual void beforeSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void afterSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0
 
virtual void beforeSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void afterSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0
 
virtual void beforeSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void afterSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0
 
virtual void beforeSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 
virtual void afterSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0
 

Detailed Description

Interface for sequence annotations.

Definition at line 24 of file SequenceWithAnnotation.h.

Member Function Documentation

◆ afterSequenceChanged()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::afterSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
pure virtualinherited

◆ afterSequenceDeleted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::afterSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
pure virtualinherited

◆ afterSequenceInserted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::afterSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
pure virtualinherited

◆ afterSequenceSubstituted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::afterSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
pure virtualinherited

◆ beforeSequenceChanged()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::beforeSequenceChanged ( const CoreSymbolListEditionEvent< T > &  event)
pure virtualinherited

◆ beforeSequenceDeleted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::beforeSequenceDeleted ( const CoreSymbolListDeletionEvent< T > &  event)
pure virtualinherited

◆ beforeSequenceInserted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::beforeSequenceInserted ( const CoreSymbolListInsertionEvent< T > &  event)
pure virtualinherited

◆ beforeSequenceSubstituted()

template<class T >
virtual void bpp::CoreSymbolListListener< T >::beforeSequenceSubstituted ( const CoreSymbolListSubstitutionEvent< T > &  event)
pure virtualinherited

◆ clone()

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

◆ getPartAnnotation()

virtual std::unique_ptr<SequenceAnnotation> bpp::SequenceAnnotation::getPartAnnotation ( size_t  pos,
size_t  len 
) const
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::annotation(), 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.

◆ isRemovable()

template<class T >
virtual bool bpp::CoreSymbolListListener< T >::isRemovable ( ) const
pure virtualinherited

◆ isShared()

template<class T >
virtual bool bpp::CoreSymbolListListener< T >::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 compliant 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 successful.

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


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