Skip to content

Commit

Permalink
[MISC] Restrict the id alphabet to char. There is no use case to chan…
Browse files Browse the repository at this point in the history
…ge this and it is required in BAM.
  • Loading branch information
smehringer committed Jun 27, 2019
1 parent 5f9bf1d commit d6ba9e2
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions include/seqan3/io/alignment_file/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,8 @@ namespace seqan3
* \brief Type template of the seqan3::field::SEQ, a container template over `sequence_alphabet`;
* must model seqan3::SequenceContainer.
*/
/*!\typedef using id_alphabet
* \brief Alphabet of the characters for the seqan3::field::ID; must model seqan3::Alphabet.
*/
/*!\typedef using id_container
* \brief Type template of the seqan3::field::ID, a container template over `id_alphabet`;
* \brief Type template of the seqan3::field::ID, a container template over `char`;
* must model seqan3::SequenceContainer.
*/
/*!\typedef using quality_alphabet
Expand Down Expand Up @@ -122,8 +119,7 @@ SEQAN3_CONCEPT AlignmentFileInputTraits = requires (t v)
requires SequenceContainer<typename t::template sequence_container<typename t::sequence_alphabet>>;

// field::ID
requires WritableAlphabet<typename t::id_alphabet>;
requires SequenceContainer<typename t::template id_container<typename t::id_alphabet>>;
requires SequenceContainer<typename t::template id_container<char>>;

// field::QUAL
requires WritableQualityAlphabet<typename t::quality_alphabet>;
Expand Down Expand Up @@ -200,9 +196,6 @@ struct alignment_file_input_default_traits
template <typename _sequence_alphabet>
using sequence_container = std::vector<_sequence_alphabet>;

//!\brief The alphabet for an identifier string is char.
using id_alphabet = char;

//!\brief The string type for an identifier is std::basic_string.
template <typename _id_alphabet>
using id_container = std::basic_string<_id_alphabet>;
Expand Down Expand Up @@ -417,8 +410,7 @@ class alignment_file_input
using sequence_type = typename traits_type::template sequence_container<
typename traits_type::sequence_alphabet>;
//!\brief The type of field::ID (default std::string by default).
using id_type = typename traits_type::template id_container<
typename traits_type::id_alphabet>;
using id_type = typename traits_type::template id_container<char>;
//!\brief The type of field::OFFSET is fixed to int32_t.
using offset_type = int32_t;
/*!\brief The type of field::REF_SEQ (default depends on construction).
Expand Down

0 comments on commit d6ba9e2

Please sign in to comment.