SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Builds the alignment for a given pair of sequences and the respective trace. More...
#include <seqan3/alignment/matrix/detail/aligned_sequence_builder.hpp>
Classes | |
struct | result_type |
The result type when building the aligned sequences. More... | |
Public Types | |
using | alignment_type = typename make_pairwise_alignment_type< fst_sequence_t, sec_sequence_t >::type |
The pairwise alignment type of the two sequences. | |
Public Member Functions | |
template<std::ranges::input_range trace_path_t> | |
result_type | operator() (trace_path_t &&trace_path) |
Builds the aligned sequences from the given trace path. | |
Constructors, destructor and assignment | |
constexpr | aligned_sequence_builder ()=default |
Defaulted. | |
constexpr | aligned_sequence_builder (aligned_sequence_builder const &)=default |
Defaulted. | |
constexpr | aligned_sequence_builder (aligned_sequence_builder &&)=default |
Defaulted. | |
constexpr aligned_sequence_builder & | operator= (aligned_sequence_builder const &)=default |
Defaulted. | |
constexpr aligned_sequence_builder & | operator= (aligned_sequence_builder &&)=default |
Defaulted. | |
~aligned_sequence_builder ()=default | |
Defaulted. | |
constexpr | aligned_sequence_builder (fst_sequence_t fst_rng, sec_sequence_t sec_rng) |
Construction from the underlying sequences. | |
Private Member Functions | |
template<typename reverse_traces_t , typename fst_aligned_t , typename sec_aligned_t > | |
void | fill_aligned_sequence (reverse_traces_t &&rev_traces, fst_aligned_t &fst_aligned, sec_aligned_t &sec_aligned) const |
Fills the sequences with gaps according to the given trace segments. | |
Private Attributes | |
type_reduce_t< fst_sequence_t > | fst_rng |
A view over the first range. | |
type_reduce_t< sec_sequence_t > | sec_rng |
A view over the second range. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Type deduction guides | |
template<std::ranges::viewable_range fst_sequence_t, std::ranges::viewable_range sec_sequence_t> | |
aligned_sequence_builder (fst_sequence_t &&, sec_sequence_t &&) -> aligned_sequence_builder< fst_sequence_t, sec_sequence_t > | |
Deduces the type from the passed constructor arguments. | |
Builds the alignment for a given pair of sequences and the respective trace.
fst_sequence_t | The first sequence of the pairwise alignment; must model std::ranges::viewable_range. |
sec_sequence_t | The second sequence of the pairwise alignment; must model std::ranges::viewable_range. |
This class builds the alignment from a given trace path over the specified sequences. Use the interface seqan3::detail::aligned_sequence_builder::operator() to get the actual alignment. The returned seqan3::writable_aligned_sequence type is determined by the input types fst_sequence_t
and sec_sequence_t
.
See the seqan3::detail::make_aligned_sequence_type transformation trait for more information about the selected type.
Depending on the used alignment algorithm the computed alignment might only cover a subrange over the original sequences. Accordingly, the returned alignment covers only the part of the sequences that are part of the given trace path. One can use the seqan3::detail::aligned_sequence_builder::result_type to access the build alignment and also to access the actual slice positions over which the alignment was built for the first sequence and respectively the second sequence.
|
inlineconstexpr |
Construction from the underlying sequences.
[in] | fst_rng | The first range to build the aligned sequence for. |
[in] | sec_rng | The second range to build the aligned sequence for. |
|
inlineprivate |
Fills the sequences with gaps according to the given trace segments.
reverse_traces_t | The type storing the reverse trace. |
[in] | rev_traces | The trace segments in order from source to sink in the trace matrix. |
[in,out] | fst_aligned | The first aligned sequence to insert gaps into. |
[in,out] | sec_aligned | The second aligned sequence to insert gaps into. |
|
inline |
Builds the aligned sequences from the given trace path.
trace_path_t | The type of the trace path; must model std::ranges::input_range and std::same_as<std::ranges::range_value_t<trace_path_t>, seqan3::detail::trace_directions> must evaluate to true . |
[in] | trace_path | The trace path. |
From the given trace path this function builds the aligned sequences for the first and the second target sequence. The return type seqan3::detail::aligned_sequence_builder::result_type is an aggregate type containing the begin and end coordinates with the respective sequence positions and the respective alignment over the sliced sequences.