30namespace seqan3::detail
34struct view_equality_fn
37 template <std::ranges::forward_range rng1_type, std::ranges::forward_range rng2_type>
38 constexpr bool operator()(rng1_type && rng1, rng2_type && rng2)
const
51inline void update_alignment_lengths(int32_t & ref_length,
53 char const cigar_operation,
54 uint32_t
const cigar_count)
56 switch (cigar_operation)
61 ref_length += cigar_count, seq_length += cigar_count;
65 ref_length += cigar_count;
68 seq_length += cigar_count;
75 throw format_error{
"Illegal cigar operation: " +
std::string{cigar_operation}};
93template <
typename cigar_input_type>
98 char cigar_operation{};
99 uint32_t cigar_count{};
100 int32_t ref_length{}, seq_length{};
114 throw format_error{
"Corrupted cigar string encountered"};
116 update_alignment_lengths(ref_length, seq_length, cigar_operation, cigar_count);
120 return {operations, ref_length, seq_length};
132 [&result](
auto & cig)
172template <seqan3::aligned_sequence ref_seq_type, seqan3::aligned_sequence query_seq_type>
173[[nodiscard]]
inline std::string get_cigar_string(ref_seq_type && ref_seq,
174 query_seq_type && query_seq,
175 uint32_t
const query_start_pos = 0,
176 uint32_t
const query_end_pos = 0,
177 bool const extended_cigar =
false)
179 return get_cigar_string(
std::tie(ref_seq, query_seq), query_start_pos, query_end_pos, extended_cigar);
184struct access_restrictor_fn
187 template <
typename chr_t>
188 [[noreturn]] chr_t operator()(chr_t)
const
190 throw std::logic_error{
"Access is not allowed because there is no sequence information."};
Provides the seqan3::cigar alphabet.
The <charconv> header from C++17's standard library.
constexpr derived_type & assign_char(char_type const chr) noexcept
Assign from a character, implicitly converts invalid characters.
Definition: alphabet_base.hpp:163
exposition_only::cigar_operation operation
The (extended) cigar operation alphabet of M,D,I,H,N,P,S,X,=.
Definition: alphabet/cigar/cigar.hpp:96
constexpr auto is_digit
Checks whether c is a digital character.
Definition: predicate.hpp:262
constexpr auto single_pass_input
A view adapter that decays most of the range properties and adds single pass behavior.
Definition: single_pass_input.hpp:348
Provides seqan3::detail::pairwise_alignment and seqan3::detail::writable_pairwise_alignment.
Provides character predicates for tokenisation.
Provides seqan3::views::take_until and seqan3::views::take_until_or_throw.
Auxiliary for pretty printing of exception messages.
Provides seqan3::tuple_like.
Provides seqan3::views::zip.