Loading...
Searching...
No Matches
align_result_selector.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <optional>
#include <ranges>
#include <type_traits>
#include <seqan3/alignment/configuration/align_config_debug.hpp>
#include <seqan3/alignment/decorator/gap_decorator.hpp>
#include <seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp>
#include <seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp>
#include <seqan3/alignment/matrix/detail/trace_directions.hpp>
#include <seqan3/alignment/matrix/detail/two_dimensional_matrix.hpp>
#include <seqan3/alignment/pairwise/detail/type_traits.hpp>
#include <seqan3/alphabet/gap/gapped.hpp>
#include <seqan3/core/configuration/configuration.hpp>
#include <seqan3/core/detail/template_inspection.hpp>
#include <seqan3/core/range/type_traits.hpp>
#include <seqan3/utility/type_traits/basic.hpp>
#include <seqan3/utility/type_traits/detail/transformation_trait_or.hpp>
#include <seqan3/utility/type_traits/lazy_conditional.hpp>
namespace seqan3::detail
{
template <std::ranges::forward_range first_range_t, std::ranges::forward_range second_range_t, typename configuration_t>
requires is_type_specialisation_of_v<std::remove_cvref_t<configuration_t>, configuration>
struct align_result_selector
{
private:
using traits_type = alignment_configuration_traits<configuration_t>;
using score_type =
typename alignment_configuration_traits<std::remove_reference_t<configuration_t>>::original_score_type;
using disabled_type = std::nullopt_t *;
using debug_score_matrix_type = two_dimensional_matrix<std::optional<score_type>,
std::allocator<std::optional<score_type>>,
matrix_major_order::column>;
using debug_trace_matrix_type = two_dimensional_matrix<std::optional<trace_directions>,
std::allocator<std::optional<trace_directions>>,
matrix_major_order::column>;
using configured_score_type = std::conditional_t<traits_type::compute_score, score_type, disabled_type>;
using configured_end_position_type = std::conditional_t<traits_type::compute_end_positions,
seqan3::detail::advanceable_alignment_coordinate<>,
disabled_type>;
using configured_begin_position_type = std::conditional_t<traits_type::compute_begin_positions,
seqan3::detail::advanceable_alignment_coordinate<>,
disabled_type>;
using configured_alignment_type =
typename lazy_conditional_t<traits_type::compute_sequence_alignment,
lazy<make_pairwise_alignment_type, first_range_t &, second_range_t &>,
std::type_identity<disabled_type>>::type;
using configured_sequence1_id_type = std::conditional_t<traits_type::output_sequence1_id, uint32_t, disabled_type>;
using configured_sequence2_id_type = std::conditional_t<traits_type::output_sequence2_id, uint32_t, disabled_type>;
using configured_debug_score_matrix_type =
std::conditional_t<traits_type::is_debug, debug_score_matrix_type, disabled_type>;
using configured_debug_trace_matrix_type =
std::conditional_t<traits_type::is_debug && traits_type::compute_sequence_alignment,
debug_trace_matrix_type,
disabled_type>;
public:
using type = alignment_result_value_type<configured_sequence1_id_type,
configured_sequence2_id_type,
configured_score_type,
configured_end_position_type,
configured_begin_position_type,
configured_alignment_type,
configured_debug_score_matrix_type,
configured_debug_trace_matrix_type>;
};
} // namespace seqan3::detail
advanceable_alignment_coordinate.hpp
Provides seqan3::detail::advanceable_alignment_coordinate.
align_config_debug.hpp
Provides seqan3::align_cfg::detail::debug.
aligned_sequence_builder.hpp
Provides seqan3::detail::aligned_sequence_builder.
type_traits.hpp
Provides helper type traits for the configuration and execution of the alignment algorithm.
basic.hpp
Provides various type traits on generic types.
seqan3::configuration::configuration
configuration(config_t) -> configuration< config_t >
Deduces the correct configuration element type from the passed seqan3::pipeable_config_element.
configuration.hpp
Provides seqan3::configuration and utility functions.
type_traits.hpp
Provides various transformation traits used by the range module.
gap_decorator.hpp
Provides seqan3::gap_decorator.
gapped.hpp
Provides seqan3::gapped.
lazy_conditional.hpp
Provides lazy template instantiation traits.
optional
template_inspection.hpp
Provides type traits for working with templates.
trace_directions.hpp
Provides the declaration of seqan3::detail::trace_directions.
transformation_trait_or.hpp
Provides seqan3::detail::transformation_trait_or.
two_dimensional_matrix.hpp
Provides seqan3::detail::two_dimensional_matrix.
type_traits
Hide me