seqan / seqan3

The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.
https://www.seqan.de
Other
409 stars 82 forks source link

[FIX] Relax sequence_file_input_traits #3128

Closed eseiler closed 1 year ago

eseiler commented 1 year ago

explicitly_convertible_to<typename t::sequence_legal_alphabet, typename t::sequence_alphabet> is meant for allowing, e.g.:

using sequence_alphabet = seqan3::dna4;
using sequence_legal_alphabet = seqan3::dna15; // or even seqan3::rna15

but not stuff like

using sequence_alphabet = seqan3::dna4;
using sequence_legal_alphabet = seqan3::aa27;

However, this constraint is also checked for using sequence_alphabet = char. Our alphabets are not (explicitly/implicitly) convertible to char. The rationale of the alphabets being compatible doesn't apply for sequence_alphabet = char, so we should just allow it.

using sequence_alphabet = char;
using sequence_legal_alphabet = seqan3::dna4;

means: Only allow characters of seqan3::dna4, but store them as char.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
seqan3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2023 10:30am
codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (aa502ef) 98.18% compared to head (11dc477) 98.18%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3128 +/- ## ======================================= Coverage 98.18% 98.18% ======================================= Files 276 276 Lines 12294 12294 ======================================= Hits 12071 12071 Misses 223 223 ``` | [Impacted Files](https://codecov.io/gh/seqan/seqan3/pull/3128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=seqan) | Coverage Δ | | |---|---|---| | [include/seqan3/io/sequence\_file/input.hpp](https://codecov.io/gh/seqan/seqan3/pull/3128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=seqan#diff-aW5jbHVkZS9zZXFhbjMvaW8vc2VxdWVuY2VfZmlsZS9pbnB1dC5ocHA=) | `100.00% <ø> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=seqan). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=seqan)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.