-
Notifications
You must be signed in to change notification settings - Fork 8
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
[FEATURE] Switch methods to an enum vector and write own validator #64
[FEATURE] Switch methods to an enum vector and write own validator #64
Conversation
29ec950
to
51a4ce0
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.
I replied in the comment thread
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.
LGTM,
you can think about using enums instead of uint8_t throughout the code for the methods
86460ae
to
82fc4eb
Compare
82fc4eb
to
e3a9138
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.
Looks good to me. I have only a few small comments.
However, we should probably wait for seqan/seqan3#2394.
b932872
to
df8990f
Compare
src/detect_breakends.cpp
Outdated
// Check method selection uses not more than all methods. | ||
if (args.methods.size() > detecting_methods::SIZE) | ||
{ | ||
seqan3::debug_stream << "[Error] More methods were selected than exist. There may be duplications.\n"; |
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.
// Check method selection uses not more than all methods. | |
if (args.methods.size() > detecting_methods::SIZE) | |
{ | |
seqan3::debug_stream << "[Error] More methods were selected than exist. There may be duplications.\n"; | |
// Check that method selection contains no duplicates. | |
std::vector<detecting_methods> unique_methods{args.methods}; | |
std::ranges::sort(unique_methods); | |
unique_methods.erase(std::unique(unique_methods.begin(), unique_methods.end()), unique_methods.end()); | |
if (args.methods.size() > unique_methods.size()) | |
{ | |
seqan3::debug_stream << "[Error] The same detection method was selected multiple times.\n"; |
Otherwise, you can have duplications as long as you do not select more than 4.
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.
thanks you are of course right, that was lazy programming 😇
519dffe
to
e693900
Compare
bc239af
to
fbbeb03
Compare
@eldariont After a rebase, I saw that I missed some of your review comments. Now it should be fine.
And for the parameter description, I will open another PR. |
" Choose the detection method(s) to be used. Default:\n" | ||
" [cigar_string,split_read,read_pairs,read_depth]. Value must be one\n" | ||
" of\n" | ||
" [read_depth,read_depth,read_pairs,read_pairs,split_read,split_read,cigar_string,cigar_string].\n" |
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.
Why is each method included twice?
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.
We don't use the new Validator for the detection methods enum, because I got a bug in a test. I opened an issue which should solve this problem: #78.
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.
Thanks for addressing my comments. In my opinion, this PR can be merged.
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
fbbeb03
to
1791f7a
Compare
Signed-off-by: Lydia Buntrock <lydia.buntrock@fu-berlin.de>
1791f7a
to
616f42b
Compare
Resolves #59
and changes the method input parameter to an enum with an associated custom validator.
Was blocked by seqan/seqan3#2381
Was blocked by seqan/seqan3#2394