SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
writable_aligned_sequence Interface Reference

The generic concept for an aligned sequence that is writable. More...

#include <seqan3/alignment/aligned_sequence/aligned_sequence_concept.hpp>

+ Inheritance diagram for writable_aligned_sequence:

Related Functions

(Note that these are not member functions.)

Requirements for seqan3::writable_aligned_sequence

You can expect these functions on all types that model seqan3::writable_aligned_sequence.

std::ranges::iterator_t< aligned_seq_t > insert_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it)
 Insert a seqan3::gap into an aligned sequence. More...
 
std::ranges::iterator_t< aligned_seq_t > insert_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it, typename aligned_seq_t::size_type size)
 Insert multiple seqan3::gap into an aligned sequence. More...
 
std::ranges::iterator_t< aligned_seq_t > erase_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it)
 Erase a seqan3::gap from an aligned sequence. More...
 
std::ranges::iterator_t< aligned_seq_t > erase_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator first, typename aligned_seq_t::const_iterator last)
 Erase multiple seqan3::gap from an aligned sequence. More...
 
void assign_unaligned (aligned_seq_t &aligned_seq, unaligned_sequence_type &&unaligned_seq)
 Assign an ungapped sequence to a gapped sequence. More...
 
Aligned sequence interface for containers over the seqan3::gapped alphabet

Enables containers to model seqan3::writable_aligned_sequence if they model seqan3::sequence_container and have a value type of the seqan3::gapped alphabet.

template<sequence_container aligned_seq_t>
aligned_seq_t::iterator insert_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it)
 An implementation of seqan3::writable_aligned_sequence::insert_gap for sequence containers. More...
 
template<sequence_container aligned_seq_t>
aligned_seq_t::iterator insert_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it, typename aligned_seq_t::size_type size)
 An implementation of seqan3::writable_aligned_sequence::insert_gap for sequence containers. More...
 
template<sequence_container aligned_seq_t>
aligned_seq_t::iterator erase_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator pos_it)
 An implementation of seqan3::writable_aligned_sequence::erase_gap for sequence containers. More...
 
template<sequence_container aligned_seq_t>
aligned_seq_t::iterator erase_gap (aligned_seq_t &aligned_seq, typename aligned_seq_t::const_iterator first, typename aligned_seq_t::const_iterator last)
 An implementation of seqan3::writable_aligned_sequence::erase_gap for sequence containers. More...
 
template<sequence_container aligned_seq_t, std::ranges::forward_range unaligned_sequence_type>
void assign_unaligned (aligned_seq_t &aligned_seq, unaligned_sequence_type &&unaligned_seq)
 An implementation of seqan3::writable_aligned_sequence::assign_unaligned_sequence for sequence containers. More...
 
Aligned sequence interface for ranges that have the corresponding member functions.

Enables ranges to model seqan3::aligned_sequence if they have the member functions insert_gap() and erase_gap().

template<typename range_type >
std::ranges::iterator_t< range_type > insert_gap (range_type &rng, std::ranges::iterator_t< range_type > const pos_it, typename range_type::size_type const size=1)
 An implementation of seqan3::writable_aligned_sequence::insert_gap for ranges with the corresponding member function insert_gap(it, size). More...
 
template<typename range_type >
std::ranges::iterator_t< range_type > erase_gap (range_type &rng, std::ranges::iterator_t< range_type > const pos_it)
 An implementation of seqan3::writable_aligned_sequence::erase_gap for ranges with the corresponding member function erase_gap(it). More...
 
template<typename range_type >
std::ranges::iterator_t< range_type > erase_gap (range_type &rng, std::ranges::iterator_t< range_type > const first, std::ranges::iterator_t< range_type > const last)
 An implementation of seqan3::writable_aligned_sequence::erase_gap for ranges with the corresponding member function erase_gap(first, last). More...
 

Detailed Description

The generic concept for an aligned sequence that is writable.

This concept describes the requirements a sequence must fulfill in order to be used inside of the alignment algorithm to store the final alignment.

Concepts and doxygen

The requirements for this concept are given as related functions and type traits. Types that model this concept are shown as "implementing this interface".

Friends And Related Function Documentation

◆ assign_unaligned()

void assign_unaligned ( aligned_seq_t &  aligned_seq,
unaligned_sequence_type &&  unaligned_seq 
)
related

Assign an ungapped sequence to a gapped sequence.

Template Parameters
aligned_seq_tType of the container to reassign; must model seqan3::writable_aligned_sequence.
unaligned_seq_tType of the container to assign from; must correspond to the aligned type without gap information (see details.)
Parameters
[in,out]aligned_seqThe gapped sequence container to assign to.
[in,out]unaligned_seqThe unaligned sequence container to assign from.

An aligned sequence has to be assignable from its unaligned counter part. For example a std::vector<seqan3::gapped<seqan3::dna4>> as well as a seqan3::gap_decorator<std::vector<seqan3::dna4>> can be assigned from s std::vector<seqan3::dna4> via seqan3::assign_unaligned.

Attention
This is a concept requirement, not an actual function (however types modelling this concept will provide an implementation).

◆ erase_gap() [1/2]

std::ranges::iterator_t< aligned_seq_t > erase_gap ( aligned_seq_t &  aligned_seq,
typename aligned_seq_t::const_iterator  first,
typename aligned_seq_t::const_iterator  last 
)
related

Erase multiple seqan3::gap from an aligned sequence.

Template Parameters
aligned_seq_tType of the range to modify; must model seqan3::writable_aligned_sequence.
Parameters
[in,out]aligned_seqThe aligned sequence to modify.
[in]firstThe iterator pointing to the position where to start erasing gaps.
[in]lastThe iterator pointing to the position where to stop erasing gaps.
Returns
An iterator following the last removed element. If the iterator last refers to the last element, the std::ranges::end() iterator is returned.
Exceptions
seqan3::gap_erase_failureif one of the characters in [first, last) no seqan3::gap.
Note
This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
Attention
This is a concept requirement, not an actual function (however types modelling this concept will provide an implementation).

◆ erase_gap() [2/2]

std::ranges::iterator_t< aligned_seq_t > erase_gap ( aligned_seq_t &  aligned_seq,
typename aligned_seq_t::const_iterator  pos_it 
)
related

Erase a seqan3::gap from an aligned sequence.

Template Parameters
aligned_seq_tType of the range to modify; must model seqan3::writable_aligned_sequence.
Parameters
[in,out]aligned_seqThe aligned sequence to modify.
[in]pos_itThe iterator pointing to the position where to erase a gap.
Returns
An iterator following the removed element. If the iterator pos_it refers to the last element, the std::ranges::end() iterator is returned.
Exceptions
seqan3::gap_erase_failureif there is no seqan3::gap at pos_it.
Note
This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
Attention
This is a concept requirement, not an actual function (however types modelling this concept will provide an implementation).

◆ insert_gap() [1/2]

std::ranges::iterator_t< aligned_seq_t > insert_gap ( aligned_seq_t &  aligned_seq,
typename aligned_seq_t::const_iterator  pos_it 
)
related

Insert a seqan3::gap into an aligned sequence.

Template Parameters
aligned_seq_tType of the range to modify; must model seqan3::writable_aligned_sequence.
Parameters
[in,out]aligned_seqThe aligned sequence to modify.
[in]pos_itThe iterator pointing to the position where to insert a gap.
Returns
An iterator pointing to the inserted gap.
Note
This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
Attention
This is a concept requirement, not an actual function (however types modeling this concept will provide an implementation).

◆ insert_gap() [2/2]

std::ranges::iterator_t< aligned_seq_t > insert_gap ( aligned_seq_t &  aligned_seq,
typename aligned_seq_t::const_iterator  pos_it,
typename aligned_seq_t::size_type  size 
)
related

Insert multiple seqan3::gap into an aligned sequence.

Template Parameters
aligned_seq_tType of the range to modify; must model seqan3::writable_aligned_sequence.
Parameters
[in,out]aligned_seqThe aligned sequence to modify.
[in]pos_itThe iterator pointing to the position where to insert a gaps.
[in]sizeThe number of gap symbols to insert (will result in a gap of length size).
Returns
An iterator pointing to the first inserted gap or pos_it if size == 0.
Note
This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
Attention
This is a concept requirement, not an actual function (however types modelling this concept will provide an implementation).

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