-
Notifications
You must be signed in to change notification settings - Fork 82
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
Alignment configuration free end gaps #2032
Alignment configuration free end gaps #2032
Conversation
8fcd6e4
to
c4186c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇 For this very Ren[n]e like PR 🦺 👷♂️
This is just the first round, I have some problem to find the important changes. Even some https://www.youtube.com/watch?v=DU2bgWOln64 couldn't help me xD
I'll go commit-by-commit again, tomorrow.
Is this a follow-up PR of other changes that I'm maybe unaware of?
The global alignment can be further refined by initialising the configuration element with | ||
the free end gap specifiers. They specify whether or not gaps at the end of the sequences are penalised. | ||
In SeqAn you can configure this behaviour for every end, namely | ||
for leading and trailing gaps of the first and second sequence. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reflow this section to make use of the 120 chars?
@@ -299,19 +277,26 @@ To make the configuration easier, we added a shortcut called seqan3::align_cfg:: | |||
\snippet doc/tutorial/pairwise_alignment/configurations.cpp include_edit | |||
\snippet doc/tutorial/pairwise_alignment/configurations.cpp edit | |||
|
|||
The `edit_scheme` still has to be combined with an alignment method. When combining it | |||
with the seqan3::align_cfg::method_global configuration element, the edit distance algorithm | |||
can be further refined with free end gaps (see section `Global and semi-global alignment`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there away to inter-reference this with doxygen?
Using any other free end gap configuration will | ||
disable the edit distance and fall back to the standard pairwise alignment and will not use the fast bitvector | ||
algorithm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reflow this section
### Refine edit distance | ||
|
||
The edit distance can be further refined using seqan3::align_cfg::aligned_ends to also compute a semi-global alignment | ||
and the seqan3::align_cfg::max_error configuration to give an upper limit of the allowed number of edits. If the | ||
The edit distance can be further refined using the seqan3::align_cfg::max_error configuration to give an upper limit of the allowed number of edits. If the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really long all of a sudden?
!(method_global_cfg.free_end_gaps_sequence2_leading.get() || | ||
method_global_cfg.free_end_gaps_sequence2_trailing.get()) && | ||
(method_global_cfg.free_end_gaps_sequence1_leading.get() == | ||
method_global_cfg.free_end_gaps_sequence1_trailing.get())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, why is it .get in method_global_cfg.free_end_gaps_sequence1_leading.get()
?
We said in the google docs that we want to have:
global.free_end_gaps_sequence1_leading = true/ false;
global.free_end_gaps_sequence2_leading = true/ false;
global.free_end_gaps_sequence1_trailing = true/ false;
global.free_end_gaps_sequence2_trailing = true/ false;
I don't find where you added these members in this PR, I must be blind.
EDIT:
AH these are strong-types, thus the .get()
. Ah I thought that we internally only use the bools, since the member names already convey the meaning. But we didn't specify clearly what type global.free_end_gaps_sequence1_leading
should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you are right. Um, I just assumed to also use strong types but I have no strong feelings. Shall I change them to boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should be changed.
{ | ||
invalid_band |= (upper_diagonal < 0 || lower_diagonal > 0); | ||
error_cause += " The first cell of the matrix is not enclosed by the band."; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -100,23 +100,20 @@ class policy_alignment_matrix | |||
|
|||
bool invalid_band = upper_diagonal < lower_diagonal; | |||
std::string error_cause = (invalid_band) ? " The upper diagonal is smaller than the lower diagonal." : ""; | |||
if constexpr (traits_t::with_free_end_gaps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Is every single commit "buildable"? If so could we split this PR into multiple ones, this would make it easier on the reviewers (I would review all of them, because I now know somehow what this big PR is about). |
I did my best.
Yes sorry, it is the second part of seqan/product_backlog/issues/96, following PR #1938
Yes
Actually the commits do belong together quite strongly. In the first part in PR #1938
So I already tried to split this in commits although it is basically the single task of "replace aligned_ends with method_global". |
… end configuration. Instead of the aligned_ends configuration.
7ece39f
to
e8ed941
Compare
superseeded by separate PRs |
Resolves seqan/product_backlog/issues/96
The alignment_configurator adaption is probably not the smartest move but it is part of the old alignment and will be deleted anyway.