28 template <
typename id_t,
33 struct alignment_result_value_type
40 back_coord_t back_coordinate{};
42 front_coord_t front_coordinate{};
44 alignment_t alignment{};
51 alignment_result_value_type()
53 -> alignment_result_value_type<std::nullopt_t *, std::nullopt_t *>;
56 template <
typename id_t,
typename score_t>
57 alignment_result_value_type(id_t, score_t)
58 -> alignment_result_value_type<id_t, score_t>;
61 template <
typename id_t,
typename score_t,
typename back_coord_t>
62 alignment_result_value_type(id_t, score_t, back_coord_t)
63 -> alignment_result_value_type<id_t, score_t, back_coord_t>;
66 template <
typename id_t,
typename score_t,
typename back_coord_t,
typename front_coord_t>
67 alignment_result_value_type(id_t, score_t, back_coord_t, front_coord_t)
68 -> alignment_result_value_type<id_t, score_t, back_coord_t, front_coord_t>;
71 template <
typename id_t,
typename score_t,
typename back_coord_t,
typename front_coord_t,
typename alignment_t>
72 alignment_result_value_type(id_t, score_t, back_coord_t, front_coord_t, alignment_t)
73 -> alignment_result_value_type<id_t, score_t, back_coord_t, front_coord_t, alignment_t>;
93 template <
typename alignment_result_traits>
95 requires detail::is_type_specialisation_of_v<alignment_result_traits, detail::alignment_result_value_type>
101 alignment_result_traits data;
107 using id_t = decltype(data.id);
110 using score_t = decltype(data.score);
112 using back_coord_t = decltype(data.back_coordinate);
114 using front_coord_t = decltype(data.front_coordinate);
116 using alignment_t = decltype(data.alignment);
146 constexpr id_t
id() const noexcept
148 static_assert(!std::is_same_v<id_t, std::nullopt_t *>,
149 "Failed to access the identifier.");
157 constexpr score_t
score() const noexcept
159 static_assert(!std::is_same_v<score_t, std::nullopt_t *>,
160 "Failed to access the score.");
171 static_assert(!std::is_same_v<back_coord_t, std::nullopt_t *>,
172 "Trying to access the back coordinate, although it was not requested in the alignment " 174 return data.back_coordinate;
185 static_assert(!std::is_same_v<front_coord_t, std::nullopt_t *>,
186 "Trying to access the front coordinate, although it was not requested in the alignment " 188 return data.front_coordinate;
196 constexpr alignment_t
const &
alignment() const noexcept
198 static_assert(!std::is_same_v<alignment_t, std::nullopt_t *>,
199 "Trying to access the alignment, although it was not requested in the alignment configuration.");
200 return data.alignment;
constexpr id_t id() const noexcept
Returns the alignment identifier.
Definition: alignment_result.hpp:146
constexpr back_coord_t const & back_coordinate() const noexcept
Returns the back coordinate of the alignment.
Definition: alignment_result.hpp:169
Provides seqan3::type_list and auxiliary type traits.
The main SeqAn3 namespace.
Stores the alignment results and gives access to score, alignment and the front and back coordinates...
Definition: alignment_result.hpp:97
alignment_result & operator=(alignment_result const &)=default
Defaulted.
~alignment_result()=default
Definition: aligned_sequence_concept.hpp:35
alignment_result()=default
Defaulted.
constexpr front_coord_t const & front_coordinate() const noexcept
Returns the front coordinate of the alignment.
Definition: alignment_result.hpp:183
constexpr score_t score() const noexcept
Returns the alignment score.
Definition: alignment_result.hpp:157
constexpr alignment_t const & alignment() const noexcept
Returns the actual alignment, i.e. the base pair matching.
Definition: alignment_result.hpp:196
alignment_result(alignment_result_traits value)
Constructs a seqan3::alignment_result from an alignment_result_traits object.
Definition: alignment_result.hpp:127