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 
13 #pragma once
14 
15 #include <fstream>
16 #include <string>
17 #include <vector>
18 
28 
29 namespace seqan3::detail
30 {
31 
33 template <typename t>
34 class alignment_file_input_format
35 {};
36 
37 } // namespace seqan3::detail
38 
39 namespace seqan3
40 {
41 
52 template <typename t>
54 SEQAN3_CONCEPT AlignmentFileInputFormat =
55  requires (detail::alignment_file_input_format<t> & v,
56  std::ifstream & stream,
57  alignment_file_input_options<dna5> & options,
58  std::vector<dna5_vector> & ref_sequences,
59  alignment_file_header<> & header,
60  dna5_vector & seq,
61  std::vector<phred42> & qual,
62  std::string & id,
63  int32_t & offset,
64  dna5_vector & ref_seq,
65  std::optional<int32_t> & ref_id,
66  std::optional<int32_t> & ref_offset,
67  std::pair<std::vector<gapped<dna4>>, std::vector<gapped<dna4>>> & align,
68  uint16_t & flag,
69  uint8_t & mapq,
71  sam_tag_dictionary & tag_dict,
72  double & e_value,
73  double & bit_score)
74 {
75  t::file_extensions;
76  // std::Same<decltype(t::file_extensions), std::vector<std::string>>;
77 
78  { v.read(stream,
79  options,
80  ref_sequences,
81  header,
82  seq,
83  qual,
84  id,
85  offset,
86  ref_seq,
87  ref_id,
88  ref_offset,
89  align,
90  flag,
91  mapq,
92  mate,
93  tag_dict,
94  e_value,
95  bit_score)};
96 
97  { v.read(stream,
98  options,
99  std::ignore,
100  header,
101  std::ignore,
102  std::ignore,
103  std::ignore,
104  std::ignore,
105  std::ignore,
106  std::ignore,
107  std::ignore,
108  std::ignore,
109  std::ignore,
110  std::ignore,
111  std::ignore,
112  std::ignore,
113  std::ignore,
114  std::ignore)};
115 };
117 
178 
180 } // namespace seqan3
181 
182 namespace seqan3::detail
183 {
184 
190 template <typename t>
191 constexpr bool is_type_list_of_alignment_file_input_formats_v = false;
192 
198 template <typename ... ts>
199 constexpr bool is_type_list_of_alignment_file_input_formats_v<type_list<ts...>> =
200  (AlignmentFileInputFormat<ts> && ...);
201 
207 template <typename t>
208 SEQAN3_CONCEPT TypeListOfAlignmentFileInputFormats = is_type_list_of_alignment_file_input_formats_v<t>;
209 
210 } // namespace seqan3::detail
constexpr sequenced_policy seq
Global execution policy object for sequenced execution policy.
Definition: execution.hpp:54
Provides the seqan3::sam_tag_dictionary class and auxiliaries.
The main SeqAn3 namespace.
Provides seqan3::dna5, container aliases and string literals.
Provides seqan3::type_list and auxiliary type traits.
Provides the seqan3::alignment_file_header class.
Provides seqan3::gapped.
Provides seqan3::alignment_file_input_options.
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::dna4, container aliases and string literals.
Provides aliases for qualified.