-
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
[FIX] 3 minor changes in alignment IO #1110
Conversation
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.
One question.
I don't think that 3
is an API break, but not too sure.
Codecov Report
@@ Coverage Diff @@
## master #1110 +/- ##
==========================================
+ Coverage 96.42% 96.45% +0.02%
==========================================
Files 196 196
Lines 7757 7749 -8
==========================================
- Hits 7480 7474 -6
+ Misses 277 275 -2
Continue to review full report at Codecov.
|
Why would anything
In general all the static assert could/should be moved to the file, or not? They are the same for all formats anyway, because all formats are instantiated with all parameters. The dynamic asserts via exceptions are format specific and should be with the format... |
Yes you are right. Shall I do this in this PR or another? |
However you like! |
bc32256
to
5d3eb9a
Compare
5d3eb9a
to
c68a316
Compare
d10fd89
to
0bd1703
Compare
0bd1703
to
7856b91
Compare
35c5d44
to
ba7b872
Compare
@@ -39,7 +39,7 @@ constexpr std::array<out_t, alphabet_size<in_t>> convert_through_char_representa | |||
[] () constexpr | |||
{ | |||
std::array<out_t, alphabet_size<in_t>> ret{}; | |||
for (typename in_t::rank_type i = 0; i < alphabet_size<in_t>; ++i) | |||
for (detail::min_viable_uint_t<alphabet_size<in_t>> i = 0; i < alphabet_size<in_t>; ++i) |
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 (detail::min_viable_uint_t<alphabet_size<in_t>> i = 0; i < alphabet_size<in_t>; ++i) | |
for (decltype(alphabet_size<in_t>) i = 0; i < alphabet_size<in_t>; ++i) |
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 thought these are eqivalent
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.
If I make that change, the bam test compiles forever 😱
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 (auto i = decltype(alphabet_size<in_t>){0}; i < alphabet_size<in_t>; ++i)
funktioniert wieder ^^
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.
If I make that change, the bam test compiles forever scream
It should actually be faster. Keep in mind that detail::min_viable_uint_t<
instantiates a type, whereas decltype does not.
for (auto i = decltype(alphabet_size<in_t>){0}; i < alphabet_size<in_t>; ++i)
whut?
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 dunno 🤷♀️
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 still weird and it is not guaranteed that the min_viable_uint_type is the correct type. Just because we decide to do that doesn't mean other alphabets don't use size_t
so this will result in conversion. I don't understand why decltype should cause problems here. If it does, please document it in the code.
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.
hm if decltype is more correct, i can use the second version?
for (auto i = decltype(alphabet_size<in_t>){0}; i < alphabet_size<in_t>; ++i)
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
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.
alright. I changed it and made a comment that it does not work the other way
ba7b872
to
38c6901
Compare
38c6901
to
ea9b447
Compare
…ge this and it is required in BAM.
ea9b447
to
4b63d48
Compare
Jenkins says 100% passed but still shows a failure 🤷♀️ |
BAM needs to write
*\0
for empty read ids (not\0
like right now, which did not impede our files since they are equivalent but for samtools those are not equivalent)SAM should not have requirements on types it does not use. (This way you could also pass std::ignore to the file)
The read id alphabet should not be modifiable by the traits object since there is no use case other than
char
(container is modifiable) and char is required by BAM. (Is this an API break?)