Skip to content

Commit

Permalink
Merge pull request #3128 from eseiler/fix/relax
Browse files Browse the repository at this point in the history
[FIX] Relax sequence_file_input_traits
  • Loading branch information
eseiler committed Apr 25, 2023
2 parents aa502ef + 11dc477 commit eb907b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions include/seqan3/io/sequence_file/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ namespace seqan3
* \brief Alphabet of the characters for the seqan3::field::seq; must satisfy seqan3::alphabet.
*/
/*!\typedef using sequence_legal_alphabet
* \brief Intermediate alphabet for seqan3::field::seq; must satisfy seqan3::alphabet and be convertible to
* `sequence_alphabet`.
* \brief Intermediate alphabet for seqan3::field::seq; must satisfy seqan3::alphabet and be either convertible to
* `sequence_alphabet` or a character type.
*
* \details
*
Expand Down Expand Up @@ -99,7 +99,8 @@ concept sequence_file_input_traits =
requires (t v) {
requires writable_alphabet<typename t::sequence_alphabet>;
requires writable_alphabet<typename t::sequence_legal_alphabet>;
requires explicitly_convertible_to<typename t::sequence_legal_alphabet, typename t::sequence_alphabet>;
requires detail::is_char_adaptation_v<typename t::sequence_alphabet>
|| explicitly_convertible_to<typename t::sequence_legal_alphabet, typename t::sequence_alphabet>;
requires sequence_container<typename t::template sequence_container<typename t::sequence_alphabet>>;

requires writable_alphabet<typename t::id_alphabet>;
Expand Down Expand Up @@ -228,7 +229,8 @@ class sequence_file_input
using field_ids = fields<field::seq, field::id, field::qual>;

static_assert(
[]() constexpr {
[]() constexpr
{
for (field f : selected_field_ids::as_array)
if (!field_ids::contains(f))
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ TEST_F(read, whitespace_in_seq)
struct char_traits : public seqan3::sequence_file_input_default_traits_dna
{
using sequence_alphabet = char;
using sequence_legal_alphabet = char;
using sequence_legal_alphabet = seqan3::dna4;
};
using sequence_file_type = seqan3::sequence_file_input<char_traits,
seqan3::fields<seqan3::field::id, seqan3::field::seq>,
Expand Down

1 comment on commit eb907b8

@vercel
Copy link

@vercel vercel bot commented on eb907b8 Apr 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

seqan3 – ./

seqan3-git-master-seqan.vercel.app
seqan3-seqan.vercel.app
seqan3.vercel.app

Please sign in to comment.