25 mask_.insert(mask_.begin() +
static_cast<ptrdiff_t
>(event.
getPosition()),
33 mask_.erase(mask_.begin() +
static_cast<ptrdiff_t
>(event.
getPosition()),
41 auto cma = dynamic_pointer_cast<const CaseMaskedAlphabet>(seq.
getAlphabet());
46 vector<bool> mask(seq.
size());
47 for (
size_t i = 0; i < seq.
size(); ++i)
49 mask[i] = cma->isMasked(seq[i]);
51 seqa->addAnnotation(make_shared<SequenceMask>(mask));
56 throw AlphabetException(
"SequenceWithAnnotationTools::createMaskAnnotation. Alphabet should be a CaseMaskedAlphabet.", seq.
getAlphabet());
const std::string & getName() const override
Get the name of this sequence.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to the list.
size_t size() const override
Get the number of elements in the list.
The alphabet exception base class.
virtual size_t getPosition() const
virtual size_t getLength() const
virtual TemplateCoreSymbolListInterface< T > * getCoreSymbolList()
virtual size_t getPosition() const
virtual size_t getLength() const
void afterSequenceChanged(const IntSymbolListEditionEvent &event) override
void afterSequenceInserted(const IntSymbolListInsertionEvent &event) override
static const std::string MASK
void afterSequenceDeleted(const IntSymbolListDeletionEvent &event) override
A basic implementation of the Sequence interface.
std::string toString() const override
Convert the list as a string.
This alphabet is used to deal NumericAlphabet.