18 #include <range/v3/algorithm/for_each.hpp>
37 template <
typename char_t,
tuple_like alignment_t,
size_t ...idx>
41 size_t const alignment_size = get<0>(align).size();
44 for (
size_t begin_pos = 0; begin_pos < alignment_size; begin_pos += 50)
46 size_t const end_pos =
std::min(begin_pos + 50, alignment_size);
52 stream <<
std::setw(7) << begin_pos <<
' ';
53 for (
size_t pos = begin_pos + 1; pos <= end_pos; ++pos)
57 else if (pos % 5 == 0)
66 [&stream] (
char ch) { stream << ch; });
68 auto stream_f = [&] (
auto const & previous_seq,
auto const & aligned_seq)
73 [&stream] (
auto && ch) { stream << (get<0>(ch) == get<1>(ch) ?
'|' :
' '); });
78 [&stream] (
char ch) { stream << ch; });
80 (stream_f(get<idx>(align), get<idx + 1>(align)), ...);
98 template <
typename char_t,
typename alignment_t>
100 requires (detail::debug_streamable_tuple<alignment_t> &&
103 inline debug_stream_type<char_t> & operator<<(debug_stream_type<char_t> & stream, alignment_t && alignment)
105 constexpr
size_t sequence_count = std::tuple_size_v<std::remove_cvref_t<alignment_t>>;
107 static_assert(sequence_count >= 2,
"An alignment requires at least two sequences.");
Includes the aligned_sequence and the related insert_gap and erase_gap functions to enable stl contai...
A "pretty printer" for most SeqAn data structures and related types.
Definition: debug_stream_type.hpp:76
Provides seqan3::debug_stream and related types.
void stream_alignment(debug_stream_type< char_t > &stream, alignment_t const &align, std::index_sequence< idx... > const &)
Create the formatted alignment output and add it to the provided debug_stream.
Definition: debug_stream_alignment.hpp:38
constexpr void for_each(unary_function_t &&fn, pack_t &&...args)
Applies a function to each element of the given function parameter pack.
Definition: pack_algorithm.hpp:195
typename tuple_type_list< tuple_t >::type tuple_type_list_t
Helper type for seqan3::detail::tuple_type_list.
Definition: concept.hpp:116
auto const to_char
A view that calls seqan3::to_char() on each element in the input range.
Definition: to_char.hpp:65
auto const get
A view calling std::get on each element in a range.
Definition: get.hpp:66
constexpr auto slice
A view adaptor that returns a half-open interval on the underlying range.
Definition: slice.hpp:141
Whether a type behaves like a tuple.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
constexpr bool all_model_aligned_seq
True, if each type models seqan3::aligned_sequence; false otherwise.
Definition: aligned_sequence_concept.hpp:506
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::views::slice.
Provides seqan3::views::to_char.
Provides seqan3::tuple_like.
Provides seqan3::views::zip.