Provides seqan3::aligned_sequence, as well as various ranges that model it.
More...
|
template<typename char_t , typename alignment_t > |
| seqan3::requires (detail::debug_streamable_tuple< alignment_t > &&detail::all_model_aligned_seq< detail::tuple_type_list_t< std::remove_cvref_t< alignment_t >>>) inline debug_stream_type< char_t > &operator<<(debug_stream_type< char_t > &stream |
| Stream operator for alignments, which are represented as tuples of aligned sequences. More...
|
|
|
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> |
requires detail::is_gapped_alphabet< std::iter_value_t< 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> |
requires detail::is_gapped_alphabet< std::iter_value_t< 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> |
requires detail::is_gapped_alphabet< std::iter_value_t< 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> |
requires detail::is_gapped_alphabet< std::iter_value_t< 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> |
requires detail::is_gapped_alphabet< std::iter_value_t< aligned_seq_t > > &&weakly_assignable_from< std::ranges::range_reference_t< aligned_seq_t >, std::ranges::range_reference_t< 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...
|
|
Provides seqan3::aligned_sequence, as well as various ranges that model it.
- See also
- Alignment
◆ assign_unaligned()
template<sequence_container aligned_seq_t, std::ranges::forward_range unaligned_sequence_type>
requires detail::is_gapped_alphabet< std::iter_value_t< aligned_seq_t > > &&weakly_assignable_from< std::ranges::range_reference_t< aligned_seq_t >, std::ranges::range_reference_t< unaligned_sequence_type > > void assign_unaligned |
( |
aligned_seq_t & |
aligned_seq, |
|
|
unaligned_sequence_type && |
unaligned_seq |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::assign_unaligned_sequence for sequence containers.
- Template Parameters
-
aligned_seq_t | Type of the container to reassign; must model seqan3::sequence_container; the value type must be a seqan3::gapped alphabet. |
unaligned_seq_t | Type of the container to assign from; must model std::ranges::forward_range. |
- Parameters
-
[in,out] | aligned_seq | The gapped sequence container to assign to. |
[in,out] | unaligned_seq | The unaligned sequence container to assign from. |
This function clears the content of the gapped
container and reassigns the content of the unaligned
container by using std::copy.
Performance
Linear in the size of unaligned_seq.
Exceptions
Strong exception guarantee.
◆ erase_gap() [1/4]
template<sequence_container aligned_seq_t>
requires detail::is_gapped_alphabet< std::iter_value_t< 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 |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::erase_gap for sequence containers.
- Template Parameters
-
- Parameters
-
[in,out] | aligned_seq | The aligned container to modify. |
[in] | first | The iterator pointing to the position where to start erasing gaps. |
[in] | last | The 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
-
This function delegates to the member function erase(iterator, iterator)
of the container. Before delegating, the function checks if the range [first
, last
) contains only seqan3::gap symbols.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ erase_gap() [2/4]
template<sequence_container aligned_seq_t>
requires detail::is_gapped_alphabet< std::iter_value_t< aligned_seq_t > > aligned_seq_t::iterator erase_gap |
( |
aligned_seq_t & |
aligned_seq, |
|
|
typename aligned_seq_t::const_iterator |
pos_it |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::erase_gap for sequence containers.
- Template Parameters
-
- Parameters
-
[in,out] | aligned_seq | The aligned container to modify. |
[in] | pos_it | The 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
-
This function delegates to the member function erase(iterator)
of the container. Before delegating, the function checks if the position pointed to by pos_it
is an actual seqan3::gap and throws an exception if not.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ erase_gap() [3/4]
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 |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for ranges with the corresponding member function insert_gap(it, size).
- Template Parameters
-
range_type | Type of the range to modify; must have an insert_gap(it, size) member function. |
- Parameters
-
[in,out] | rng | The range to modify. |
[in] | pos_it | The iterator pointing to the position where to start inserting gaps. |
[in] | size | The number of gaps to insert as an optional argument, default is 1. |
- Returns
- An iterator pointing to the first inserted gap or
pos_it
if size == 0
.
This function delegates to the member function insert(iterator, size)
of the range.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ erase_gap() [4/4]
std::ranges::iterator_t< range_type > erase_gap |
( |
range_type & |
rng, |
|
|
std::ranges::iterator_t< range_type > const |
pos_it |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for ranges with the corresponding member function insert_gap(it, size).
- Template Parameters
-
range_type | Type of the range to modify; must have an insert_gap(it, size) member function. |
- Parameters
-
[in,out] | rng | The range to modify. |
[in] | pos_it | The iterator pointing to the position where to start inserting gaps. |
[in] | size | The number of gaps to insert as an optional argument, default is 1. |
- Returns
- An iterator pointing to the first inserted gap or
pos_it
if size == 0
.
This function delegates to the member function insert(iterator, size)
of the range.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ insert_gap() [1/3]
template<sequence_container aligned_seq_t>
requires detail::is_gapped_alphabet< std::iter_value_t< aligned_seq_t > > aligned_seq_t::iterator insert_gap |
( |
aligned_seq_t & |
aligned_seq, |
|
|
typename aligned_seq_t::const_iterator |
pos_it |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for sequence containers.
- Template Parameters
-
- Parameters
-
[in,out] | aligned_seq | The aligned container to modify. |
[in] | pos_it | The iterator pointing to the position where to insert a gap. |
- Returns
- An iterator pointing to the inserted gap.
This function delegates to the member function insert(iterator, value)
of the container.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ insert_gap() [2/3]
template<sequence_container aligned_seq_t>
requires detail::is_gapped_alphabet< std::iter_value_t< 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 |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for sequence containers.
- Template Parameters
-
- Parameters
-
[in,out] | aligned_seq | The aligned container to modify. |
[in] | pos_it | The iterator pointing to the position where to insert gaps. |
[in] | size | The 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
.
This function delegates to the member function insert(iterator,
size,
value)
of the container.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ insert_gap() [3/3]
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 |
|
) |
| |
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for ranges with the corresponding member function insert_gap(it, size).
- Template Parameters
-
range_type | Type of the range to modify; must have an insert_gap(it, size) member function. |
- Parameters
-
[in,out] | rng | The range to modify. |
[in] | pos_it | The iterator pointing to the position where to start inserting gaps. |
[in] | size | The number of gaps to insert as an optional argument, default is 1. |
- Returns
- An iterator pointing to the first inserted gap or
pos_it
if size == 0
.
This function delegates to the member function insert(iterator, size)
of the range.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.
◆ requires() [1/2]
template<typename char_t , typename alignment_t >
seqan3::requires |
( |
detail::debug_streamable_tuple< alignment_t > &&detail::all_model_aligned_seq< detail::tuple_type_list_t< std::remove_cvref_t< alignment_t >>> |
| ) |
& |
Stream operator for alignments, which are represented as tuples of aligned sequences.
- Template Parameters
-
alignment_t | The alignment type, must satisfy tuple_like and its size must be at least 2. |
- Parameters
-
[in,out] | stream | The target stream for the formatted output. |
[in] | alignment | The alignment that shall be formatted. All sequences must be equally long. |
- Returns
- The given stream to which the alignment representation is appended.
◆ requires() [2/2]
template<typename range_type >
requires requires |
( |
range_type |
v | ) |
|
|
related |
An implementation of seqan3::writable_aligned_sequence::insert_gap for ranges with the corresponding member function insert_gap(it, size).
- Template Parameters
-
range_type | Type of the range to modify; must have an insert_gap(it, size) member function. |
- Parameters
-
[in,out] | rng | The range to modify. |
[in] | pos_it | The iterator pointing to the position where to start inserting gaps. |
[in] | size | The number of gaps to insert as an optional argument, default is 1. |
- Returns
- An iterator pointing to the first inserted gap or
pos_it
if size == 0
.
This function delegates to the member function insert(iterator, size)
of the range.
- Note
- This may cause reallocations and thus invalidates all iterators and references. Use the returned iterator.