SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
output_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 
27 
28 namespace seqan3::detail
29 {
30 
32 template <typename t>
33 class alignment_file_output_format
34 {};
35 
36 } // namespace seqan3::detail
37 
38 namespace seqan3
39 {
40 
52 template <typename t>
54 SEQAN3_CONCEPT AlignmentFileOutputFormat =
55  requires (detail::alignment_file_output_format<t> & v,
56  std::ofstream & stream,
57  alignment_file_output_options & options,
58  alignment_file_header<> & header,
59  dna5_vector & seq,
60  std::vector<phred42> & qual,
61  std::string & id,
62  int32_t & offset,
63  dna5_vector & ref_seq,
64  std::optional<int32_t> & ref_id,
65  std::optional<int32_t> & ref_offset,
66  std::pair<std::vector<gapped<dna4>>, std::vector<gapped<dna4>>> & align,
67  uint16_t & flag,
68  uint8_t & mapq,
70  sam_tag_dictionary & tag_dict,
71  double & e_value,
72  double & bit_score)
73 {
74  t::file_extensions;
75 
76  { v.write(stream,
77  options,
78  header,
79  seq,
80  qual,
81  id,
82  offset,
83  ref_seq,
84  ref_id,
85  ref_offset,
86  align,
87  flag,
88  mapq,
89  mate,
90  tag_dict,
91  e_value,
92  bit_score
93  ) } -> void;
94 };
96 
160 
162 } // namespace seqan3
163 
164 namespace seqan3::detail
165 {
166 
172 template <typename t>
173 constexpr bool is_type_list_of_alignment_file_output_formats_v = false;
174 
180 template <typename ... ts>
181 constexpr bool is_type_list_of_alignment_file_output_formats_v<type_list<ts...>>
182  = (AlignmentFileOutputFormat<ts> && ...);
183 
189 template <typename t>
190 SEQAN3_CONCEPT TypeListOfAlignmentFileOutputFormats = is_type_list_of_alignment_file_output_formats_v<t>;
191 } // 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::alignment_file_output_options.
Provides seqan3::type_list and auxiliary type traits.
Provides the seqan3::alignment_file_header class.
Provides seqan3::gapped.
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 aliases for qualified.