Skip to content

Commit

Permalink
[MISC] Move aligned_ends to align_cg::detail.
Browse files Browse the repository at this point in the history
  • Loading branch information
smehringer committed Aug 18, 2020
1 parent 365e905 commit e8ed941
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// -----------------------------------------------------------------------------------------------------

/*!\file
* \brief Provides seqan3::align_cfg::aligned_ends.
* \brief Provides seqan3::align_cfg::detail::aligned_ends.
* \author Jörg Winkler <j.winkler AT fu-berlin.de>
* \author Rene Rahn <rene.rahn AT fu-berlin.de>
*/
Expand Down Expand Up @@ -512,7 +512,7 @@ inline constexpr end_gaps free_ends_second{front_end_first<std::false_type>{},
//!\}
} // namespace seqan3

namespace seqan3::align_cfg
namespace seqan3::align_cfg::detail
{

// ----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/alignment/configuration/detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ enum struct align_config_id : uint8_t
{
//!\brief ID for the \ref seqan3::align_cfg::alignment_result_capture "alignment_result_capture" option.
alignment_result_capture,
aligned_ends, //!< ID for the \ref seqan3::align_cfg::aligned_ends "aligned_ends" option.
aligned_ends, //!< ID for the \ref seqan3::align_cfg::detail::aligned_ends "aligned_ends" option.
band, //!< ID for the \ref seqan3::align_cfg::band_fixed_size "band" option.
debug, //!< ID for the \ref seqan3::align_cfg::debug "debug" option.
gap, //!< ID for the \ref seqan3::align_cfg::gap "gap" option.
Expand Down Expand Up @@ -54,7 +54,7 @@ inline constexpr std::array<std::array<bool, static_cast<uint8_t>(align_config_i
{
{ //0 1 2 3 4 5 6 7 8 9 10 11 12
{ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 0: alignment_result_capture
{ 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}, // 1: aligned_ends
{ 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1}, // 1: detail::aligned_ends
{ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 2: band
{ 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, // 3: debug
{ 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, // 4: gap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ constexpr function_wrapper_t alignment_configurator::configure_free_ends_initial
if constexpr (traits_t::is_global)
{
if (auto method_global_cfg = cfg.get_or(align_cfg::method_global{});
!config_t::template exists<seqan3::align_cfg::aligned_ends>() &&
!config_t::template exists<seqan3::detail::align_cfg::aligned_ends>() &&
(method_global_cfg.free_end_gaps_sequence1_leading ||
method_global_cfg.free_end_gaps_sequence1_trailing ||
method_global_cfg.free_end_gaps_sequence2_leading ||
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/alignment/pairwise/detail/type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct alignment_configuration_traits
static constexpr bool is_global =
configuration_t::template exists<seqan3::align_cfg::method_global>();
//!\brief Flag indicating whether global alignment mode with free ends is enabled.
static constexpr bool with_free_end_gaps = configuration_t::template exists<align_cfg::aligned_ends>();
static constexpr bool with_free_end_gaps = configuration_t::template exists<align_cfg::detail::aligned_ends>();
//!\brief Flag indicating whether local alignment mode is enabled.
static constexpr bool is_local = configuration_t::template exists<seqan3::detail::method_local_tag>();
//!\brief Flag indicating whether banded alignment mode is enabled.
Expand Down
11 changes: 6 additions & 5 deletions test/snippet/alignment/configuration/align_cfg_aligned_ends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
int main()
{
// Setup for overlap alignment.
seqan3::align_cfg::aligned_ends overlap{seqan3::free_ends_all};
seqan3::align_cfg::detail::aligned_ends overlap{seqan3::free_ends_all};

// Setup for global alignment.
seqan3::align_cfg::aligned_ends global{seqan3::free_ends_none};
seqan3::align_cfg::detail::aligned_ends global{seqan3::free_ends_none};

// Setup for semi-global alignment with free-end gaps in the first sequence.
seqan3::align_cfg::aligned_ends semi_seq1{seqan3::free_ends_first};
seqan3::align_cfg::detail::aligned_ends semi_seq1{seqan3::free_ends_first};

// Setup for semi-global alignment with free-end gaps in the second sequence.
seqan3::align_cfg::aligned_ends semi_seq2{seqan3::free_ends_second};
seqan3::align_cfg::detail::aligned_ends semi_seq2{seqan3::free_ends_second};

// Custom settings.
seqan3::align_cfg::aligned_ends custom{seqan3::end_gaps{seqan3::front_end_first{std::true_type{}}, seqan3::front_end_second{std::true_type{}}}};
seqan3::align_cfg::detail::aligned_ends custom{
seqan3::end_gaps{seqan3::front_end_first{std::true_type{}}, seqan3::front_end_second{std::true_type{}}}};
}

0 comments on commit e8ed941

Please sign in to comment.