SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
input_format_concept.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
14 #pragma once
15 
16 #include <fstream>
17 #include <string>
18 #include <vector>
19 
25 
26 namespace seqan3::detail
27 {
28 
30 template <typename format_tag>
31 class sequence_file_input_format
32 {};
33 
34 } // namespace seqan3::detail
35 
36 namespace seqan3
37 {
38 
49 template <typename t>
51 SEQAN3_CONCEPT SequenceFileInputFormat = requires (detail::sequence_file_input_format<t> & v,
52  std::ifstream & f,
53  sequence_file_input_options<dna5, false> & options,
54  dna5_vector & seq,
55  std::string & id,
56  std::vector<phred42> & qual,
57  std::vector<dna5q> & seq_qual)
58 {
59  t::file_extensions;
60 
61  { v.read(f, options, seq, id, qual) } -> void;
62  { v.read(f, options, seq_qual, id, seq_qual) } -> void;
63  { v.read(f, options, std::ignore, std::ignore, std::ignore) } -> void;
64 };
66 
104 
106 } // namespace seqan3
107 
108 namespace seqan3::detail
109 {
110 
116 template <typename t>
117 constexpr bool is_type_list_of_sequence_file_input_formats_v = false;
118 
124 template <typename ... ts>
125 constexpr bool is_type_list_of_sequence_file_input_formats_v<type_list<ts...>> =
126  (SequenceFileInputFormat<ts> && ...);
127 
133 template <typename t>
134 SEQAN3_CONCEPT TypeListOfSequenceFileInputFormats = is_type_list_of_sequence_file_input_formats_v<t>;
135 } // namespace seqan3::detail
constexpr sequenced_policy seq
Global execution policy object for sequenced execution policy.
Definition: execution.hpp:54
The main SeqAn3 namespace.
Provides seqan3::dna5, container aliases and string literals.
Provides seqan3::type_list and auxiliary type traits.
Definition: aligned_sequence_concept.hpp:35
Provides seqan3::phred42 quality scores.
meta::list< types... > type_list
Type that contains multiple types, an alias for meta::list.
Definition: type_list.hpp:27
Provides seqan3::sequence_file_input_options.
Provides aliases for qualified.