146 template <
typename _sequence_alphabet>
153 template <
typename _
id_alphabet>
160 template <
typename _quality_alphabet>
232 for (
field f : selected_field_ids::as_array)
237 "You selected a field that is not valid for sequence files, please refer to the documentation "
238 "of sequence_file_input::field_ids for the accepted values.");
248 using id_type =
typename traits_type::template id_container<typename traits_type::id_alphabet>;
250 using quality_type =
typename traits_type::template quality_container<typename traits_type::quality_alphabet>;
319 ->open(filename, std::ios_base::in | std::ios::binary);
322 throw file_open_error{
"Could not open file " + filename.
string() +
" for reading."};
328 using format_variant_t =
329 typename detail::variant_from_tags<valid_formats, detail::sequence_file_input_format_exposer>::type;
330 format_variant_t format_variant{};
334 [&](
auto && selected_format)
337 format = std::make_unique<selected_sequence_format<format_t>>();
362 template <input_stream stream_t, sequence_file_input_format file_format>
363 requires std::same_as<typename std::remove_reference_t<stream_t>::char_type,
stream_char_type>
365 file_format
const & SEQAN3_DOXYGEN_ONLY(format_tag),
368 format{std::make_unique<selected_sequence_format<file_format>>()}
370 static_assert(list_traits::contains<file_format, valid_formats>,
371 "You selected a format that is not in the valid_formats of this file.");
378 template <input_stream stream_t, sequence_file_input_format file_format>
379 requires std::same_as<typename std::remove_reference_t<stream_t>::char_type,
stream_char_type>
381 file_format
const & SEQAN3_DOXYGEN_ONLY(format_tag),
384 format{std::make_unique<selected_sequence_format<file_format>>()}
386 static_assert(list_traits::contains<file_format, valid_formats>,
387 "You selected a format that is not in the valid_formats of this file.");
584 template <
typename format_t>
632template <input_stream stream_type, sequence_file_input_format file_format>
640template <input_stream stream_type, sequence_file_input_format file_format>
648template <input_stream stream_type,
659template <input_stream stream_type,
Provides seqan3::aa27, container aliases and string literals.
Provides alphabet adaptations for standard char types.
The twenty-seven letter amino acid alphabet..
Definition: aa27.hpp:46
Input iterator necessary for providing a range-like interface in input file.
Definition: in_file_iterator.hpp:41
The 15 letter DNA alphabet, containing all IUPAC smybols minus the gap..
Definition: dna15.hpp:51
The five letter DNA alphabet of A,C,G,T and the unknown character N..
Definition: dna5.hpp:51
Quality type for traditional Sanger and modern Illumina Phred scores..
Definition: phred42.hpp:47
Auxiliary concept that checks whether a type is a specialisation of seqan3::fields.
Definition: record.hpp:35
Provides auxiliary data structures and functions for seqan3::record and seqan3::fields.
Provides seqan3::dna15, container aliases and string literals.
Provides seqan3::dna5, container aliases and string literals.
field
An enumerator for the fields used in file formats.
Definition: record.hpp:63
void set_format(format_variant_type &format, std::filesystem::path const &file_name)
Sets the file format according to the file name extension.
Definition: misc.hpp:68
auto make_secondary_istream(std::basic_istream< char_t > &primary_stream, std::filesystem::path &filename) -> std::unique_ptr< std::basic_istream< char_t >, std::function< void(std::basic_istream< char_t > *)> >
Depending on the magic bytes of the given stream, return a decompression stream or forward the primar...
Definition: misc_input.hpp:80
Provides the seqan3::detail::in_file_iterator class template.
Checks whether from can be explicitly converted to to.
A more refined container concept than seqan3::container.
Refines seqan3::alphabet and adds assignability.
A concept that indicates whether a writable alphabet represents quality scores.
Provides exceptions used in the I/O module.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::phred42 quality scores.
Provides quality alphabet composites.
Provides seqan3::sequence_record.
A class template that holds a choice of seqan3::field.
Definition: record.hpp:128
static constexpr bool contains(field f)
Whether a field is contained in the parameter pack.
Definition: record.hpp:149
void clear() noexcept(noexcept(std::apply(expander, std::declval< record & >())))
Clears containers that provide .clear() and (re-)initialises all other elements with = {}.
Definition: record.hpp:237
Type that contains multiple types.
Definition: type_list.hpp:29
Provides traits for seqan3::type_list.