-
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
[MISC] Move parse_cigar
from format_sam_base
into cigar
.
#2502
[MISC] Move parse_cigar
from format_sam_base
into cigar
.
#2502
Conversation
Signed-off-by: Lydia Buntrock <[email protected]>
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/seqan/seqan3/UyjfeBYSUBVkrN1LoQHFHmaoq1H6 |
Codecov Report
@@ Coverage Diff @@
## master #2502 +/- ##
=======================================
Coverage 98.22% 98.22%
=======================================
Files 269 269
Lines 10510 10517 +7
=======================================
+ Hits 10323 10330 +7
Misses 187 187
Continue to review full report at Codecov.
|
@@ -95,11 +95,6 @@ class format_sam_base | |||
header_type & header, | |||
ref_seqs_type & /*tag*/); | |||
|
|||
static void update_alignment_lengths(int32_t & ref_length, |
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 static void does not appear in the include/seqan3/io/sam_file/detail/cigar.hpp
. Is it just unnecessary ? :)
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.
As the function is not in a class
anymore, I think the static
is not necessary.
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.
A static
member of a class would mean that the member (in this case a member function) is independent of the actual object. Maybe think of it as "there is one (global) instance of this member" and the member exists without any instance of the class existing.
It also means that you do not need an instance of the format_sam_base
(or any derived) class to invoke this function. You can use format_sam_base::update_alignment_lengths
instead of some_instance.update_alignment_lengths
.
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 the explanation. Looks good :)
Resolves first part of seqan/iGenVar#85
We decided to move
parse_cigar
fromseqan3::detail::format_sam_base
intoseqan3/io/sam_file/detail/cigar.hpp
.This is still detail, but now you normaly just need to include one header. Apon this, it is also easier to get everything to do with
cigar
out ofdetail
later.