template<std::ranges::viewable_range fst_sequence_t, std::ranges::viewable_range sec_sequence_t>
class seqan3::detail::aligned_sequence_builder< fst_sequence_t, sec_sequence_t >
Builds the alignment for a given pair of sequences and the respective trace.
- Template Parameters
-
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.
template<std::ranges::viewable_range fst_sequence_t, std::ranges::viewable_range sec_sequence_t>
template<typename reverse_traces_t , typename fst_aligned_t , typename sec_aligned_t >
void seqan3::detail::aligned_sequence_builder< fst_sequence_t, sec_sequence_t >::fill_aligned_sequence |
( |
reverse_traces_t && |
rev_traces, |
|
|
fst_aligned_t & |
fst_aligned, |
|
|
sec_aligned_t & |
sec_aligned |
|
) |
| const |
|
inlineprivate |
Fills the sequences with gaps according to the given trace segments.
- Template Parameters
-
reverse_traces_t | The type storing the reverse trace. |
- Parameters
-
[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. |
template<std::ranges::viewable_range fst_sequence_t, std::ranges::viewable_range sec_sequence_t>
template<std::ranges::input_range trace_path_t>
Builds the aligned sequences from the given trace path.
- Template Parameters
-
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>, seqan::detail::trace_directions> must evaluate to true . |
- Parameters
-
[in] | trace_path | The trace path. |
- Returns
- seqan3::detail::aligned_sequence_builder::result_type with the built alignment.
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.