Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Fix alignment_result doc #3204

Merged
merged 3 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 53 additions & 25 deletions include/seqan3/alignment/pairwise/alignment_result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ template <typename sequence1_id_t,
typename trace_debug_matrix_t = std::nullopt_t *>
struct alignment_result_value_type
{
//! \brief The alignment identifier for the first sequence.
//!\brief The alignment identifier for the first sequence.
sequence1_id_t sequence1_id{};
//! \brief The alignment identifier for the second sequence.
//!\brief The alignment identifier for the second sequence.
sequence2_id_t sequence2_id{};
//! \brief The alignment score.
//!\brief The alignment score.
score_t score{};
//! \brief The end positions of the alignment.
//!\brief The end positions of the alignment.
end_positions_t end_positions{};
//! \brief The begin positions of the alignment.
//!\brief The begin positions of the alignment.
begin_positions_t begin_positions{};
//! \brief The alignment, i.e. the actual base pair matching.
//!\brief The alignment, i.e. the actual base pair matching.
alignment_t alignment{};

//!\brief The score matrix. Only accessible with seqan3::align_cfg::detail::debug.
Expand All @@ -72,20 +72,20 @@ struct alignment_result_value_type
* \brief Type deduction for the different combinations of result types.
* \{
*/
//! \brief Type deduction for an empty object. It will always fail the compilation, if any field is accessed.
//!\brief Type deduction for an empty object. It will always fail the compilation, if any field is accessed.
alignment_result_value_type()->alignment_result_value_type<std::nullopt_t *, std::nullopt_t *, std::nullopt_t *>;

//! \brief Type deduction for id and score only.
//!\brief Type deduction for id and score only.
template <typename sequence1_id_t, typename sequence2_id_t, typename score_t>
alignment_result_value_type(sequence1_id_t, sequence2_id_t, score_t)
-> alignment_result_value_type<sequence1_id_t, sequence2_id_t, score_t>;

//! \brief Type deduction for id, score and end positions.
//!\brief Type deduction for id, score and end positions.
template <typename sequence1_id_t, typename sequence2_id_t, typename score_t, typename end_positions_t>
alignment_result_value_type(sequence1_id_t, sequence2_id_t, score_t, end_positions_t)
-> alignment_result_value_type<sequence1_id_t, sequence2_id_t, score_t, end_positions_t>;

//! \brief Type deduction for id, score, end positions and begin positions.
//!\brief Type deduction for id, score, end positions and begin positions.
template <typename sequence1_id_t,
typename sequence2_id_t,
typename score_t,
Expand All @@ -94,7 +94,7 @@ template <typename sequence1_id_t,
alignment_result_value_type(sequence1_id_t, sequence2_id_t, score_t, end_positions_t, begin_positions_t)
-> alignment_result_value_type<sequence1_id_t, sequence2_id_t, score_t, end_positions_t, begin_positions_t>;

//! \brief Type deduction for id, score, end positions, begin positions and alignment.
//!\brief Type deduction for id, score, end positions, begin positions and alignment.
template <typename sequence1_id_t,
typename sequence2_id_t,
typename score_t,
Expand All @@ -119,7 +119,7 @@ struct alignment_result_value_type_accessor;
namespace seqan3
{

/*!\brief Stores the alignment results and gives access to score, alignment and the front and end positionss.
/*!\brief Stores the alignment results and gives access to score, alignment and the front and end positions.
* \ingroup alignment_pairwise
* \tparam alignment_result_value_t The underlying value type containing the information from the alignment computation.
*
Expand Down Expand Up @@ -147,24 +147,24 @@ template <typename alignment_result_value_t>
class alignment_result
{
private:
//! \brief Object that stores the computed alignment results.
//!\brief Object that stores the computed alignment results.
alignment_result_value_t data{};

/*!\name Member types
* \brief Local definition of the types contained in the `data` object.
* \{
*/
//! \brief The type for the alignment identifier for the first sequence.
//!\brief The type for the alignment identifier for the first sequence.
using sequence1_id_t = decltype(data.sequence1_id);
//! \brief The type for the alignment identifier for the second sequence.
//!\brief The type for the alignment identifier for the second sequence.
using sequence2_id_t = decltype(data.sequence2_id);
//! \brief The type for the resulting score.
//!\brief The type for the resulting score.
using score_t = decltype(data.score);
//! \brief The type for the end positions.
//!\brief The type for the end positions.
using end_positions_t = decltype(data.end_positions);
//! \brief The type for the begin positions.
//!\brief The type for the begin positions.
using begin_positions_t = decltype(data.begin_positions);
//! \brief The type for the alignment.
//!\brief The type for the alignment.
using alignment_t = decltype(data.alignment);
//!\}

Expand Down Expand Up @@ -233,7 +233,15 @@ class alignment_result
}

/*!\brief Returns the end position of the first sequence of the alignment.
* \return The calculated alignment end of sequence 1 (inclusive).
* \return The calculated alignment end of sequence 1 (exclusive).
* \details
*
* \if DEV
* The return type (default: `size_t`) is deduced from
* seqan3::detail::alignment_result_value_type::end_positions_t::first.
* \else
* The return type is `size_t`.
* \endif
*
* \note This function is only available if the end position of the first sequence was requested via the
* alignment configuration (see seqan3::align_cfg::output_end_position).
Expand All @@ -247,7 +255,15 @@ class alignment_result
}

/*!\brief Returns the end position of the second sequence of the alignment.
* \return A pair of positions in the respective sequences, where the calculated alignment ends (inclusive).
* \return The calculated alignment end of sequence 2 (exclusive).
* \details
*
* \if DEV
* The return type (default: `size_t`) is deduced from
* seqan3::detail::alignment_result_value_type::end_positions_t::second.
* \else
* The return type is `size_t`.
* \endif
*
* \note This function is only available if the end position of the second sequence was requested via the
* alignment configuration (see seqan3::align_cfg::output_end_position).
Expand All @@ -261,10 +277,16 @@ class alignment_result
}

/*!\brief Returns the begin position of the first sequence of the alignment.
* \return A pair of positions in the respective sequences, where the calculated alignment starts.
*
* \return The calculated alignment begin of sequence 1 (inclusive).
* \details
*
* \if DEV
* The return type (default: `size_t`) is deduced from
* seqan3::detail::alignment_result_value_type::begin_positions_t::first.
* \else
* The return type is `size_t`.
* \endif
*
* Guaranteed to be smaller than or equal to `sequence1_end_position()`.
*
* \note This function is only available if the begin position of the first sequence was requested via the
Expand All @@ -279,10 +301,16 @@ class alignment_result
}

/*!\brief Returns the begin position of the second sequence of the alignment.
* \return A pair of positions in the respective sequences, where the calculated alignment starts.
*
* \return The calculated alignment begin of sequence 2 (inclusive).
* \details
*
* \if DEV
* The return type (default: `size_t`) is deduced from
* seqan3::detail::alignment_result_value_type::begin_positions_t::second.
* \else
* The return type is `size_t`.
* \endif
*
* Guaranteed to be smaller than or equal to `sequence2_end_position()`.
*
* \note This function is only available if the begin position of the second sequence was requested via the
Expand Down
8 changes: 4 additions & 4 deletions test/documentation/DoxygenLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
<tab type="user" visible="yes" title="Contributing" url="\ref about_contributing" intro=""/>
</tab>
<tab type="topics" visible="yes" title="API Reference" intro=""/>
<tab type="usergroup" visible="${SEQAN3_SHOW_DEV_DOCS}" title="API Reference (details)" intro="">
<tab type="usergroup" visible="yes" title="API Reference (details)" intro="">
<tab type="modules" visible="no" title="" intro="">
<tab type="modulelist" visible="yes" title="" intro=""/>
<tab type="modulemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="${SEQAN3_SHOW_DEV_DOCS}" title="" intro=""/>
</tab>
<tab type="concepts" visible="yes" title="">
<tab type="concepts" visible="${SEQAN3_SHOW_DEV_DOCS}" title="">
</tab>
<tab type="interfaces" visible="no" title="">
<tab type="interfacelist" visible="yes" title="" intro=""/>
Expand All @@ -54,7 +54,7 @@
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="files" visible="${SEQAN3_SHOW_DEV_DOCS}" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
Expand Down
2 changes: 1 addition & 1 deletion test/documentation/seqan3_doxygen_cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ENABLED_SECTIONS = ${SEQAN3_DOXYGEN_ENABLED_SECTIONS}
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = ${SEQAN3_SHOW_DEV_DOCS}
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE = ${SEQAN3_DOXYGEN_OUTPUT_DIR}/DoxygenLayout.xml
CITE_BIB_FILES =
Expand Down