17 #include <meta/meta.hpp> 126 template <
field ...fs>
137 static constexpr
size_t index_of(
field f)
139 for (
size_t i = 0; i <
sizeof...(fs); ++i)
140 if (as_array[i] == f)
146 static constexpr
bool contains(
field f)
148 return index_of(f) != npos;
151 static_assert([] () constexpr
153 for (
size_t i = 0; i < as_array.
size(); ++i)
154 for (
size_t j = i + 1; j < as_array.
size(); ++j)
155 if (as_array[i] == as_array[j])
159 } (),
"You may not include a field twice into fields<>.");
186 template <
typename field_types,
typename field_
ids>
187 struct record : detail::transfer_template_args_onto_t<field_types, std::tuple>
191 using base_type = detail::transfer_template_args_onto_t<field_types, std::tuple>;
204 using base_type::base_type;
208 "You must give as many IDs as types to seqan3::record.");
217 template <
size_t ...Is>
220 ((std::get<Is>(tup) = {}), ...);
234 template <
typename field_types,
typename field_
ids>
235 struct tuple_size<
seqan3::record<field_types, field_ids>>
238 static constexpr
size_t value = tuple_size_v<typename seqan3::record<field_types, field_ids>::base_type>;
246 template <
size_t elem_no,
typename field_types,
typename field_
ids>
247 struct tuple_element<elem_no,
seqan3::record<field_types, field_ids>>
250 using type = std::tuple_element_t<elem_no, typename seqan3::record<field_types, field_ids>::base_type>;
264 template <field f,
typename field_types,
typename field_
ids>
268 static_assert(field_ids::contains(f),
"The record does not contain the field you wish to retrieve.");
269 return std::get<field_ids::index_of(f)>(r);
273 template <field f,
typename field_types,
typename field_
ids>
276 static_assert(field_ids::contains(f),
"The record does not contain the field you wish to retrieve.");
277 return std::get<field_ids::index_of(f)>(r);
281 template <field f,
typename field_types,
typename field_
ids>
284 static_assert(field_ids::contains(f),
"The record does not contain the field you wish to retrieve.");
285 return std::get<field_ids::index_of(f)>(std::move(r));
289 template <field f,
typename field_types,
typename field_
ids>
292 static_assert(field_ids::contains(f),
"The record does not contain the field you wish to retrieve.");
293 return std::get<field_ids::index_of(f)>(std::move(r));
The (reference) "sequence" information, usually a range of nucleotides or amino acids.
~record()=default
Defaulted.
The "sequence", usually a range of nucleotides or amino acids.
Sequence and fixed interactions combined in one range.
Energy of a folded sequence, represented by one float number.
The (pairwise) alignment stored in an seqan3::alignment object.
The alignment flag (bit information), uint16_t value.
record()=default
Defaulted.
The class template that file records are based on; behaves like an std::tuple.
Definition: record.hpp:187
Provides seqan3::type_list and auxiliary type traits.
Comment field of arbitrary content, usually a string.
Identifier for user defined file formats and specialisations.
SeqAn specific customisations in the standard namespace.
Identifier for user defined file formats and specialisations.
::ranges::size size
Alias for ranges::size. Obtains the size of a range whose size can be calculated in constant time...
Definition: ranges:189
The main SeqAn3 namespace.
Identifier for user defined file formats and specialisations.
The qualities, usually in phred-score notation.
The e-value (length normalized bit score), double value.
Base pair probability matrix of interactions, usually a matrix of float numbers.
Sequence (REF_SEQ) relative start position (0-based), unsigned value.
A class template that holds a choice of seqan3::field.
Definition: record.hpp:127
Sequence and qualities combined in one range.
record & operator=(record const &)=default
Defaulted.
std::tuple_element_t< elem_no, typename seqan3::record< field_types, field_ids >::base_type > type
The member type. Delegates to same type on base_type.
Definition: record.hpp:250
Provides seqan3::type_list and auxiliary type traits.
Reactivity error values given in a vector corresponding to REACT.
Identifier for user defined file formats and specialisations.
Sequence (SEQ) relative start position (0-based), unsigned value.
The identifier, usually a string.
void clear()
(Re-)Initialise all tuple elements with {}.
Definition: record.hpp:211
The mate pair information given as a std::tuple of reference name, offset and template length...
Fixed interactions, usually a string of structure alphabet characters.
The identifier of the (reference) sequence that SEQ was aligned to.
A pointer to the seqan3::alignment_file_header object storing header information. ...
Identifier for user defined file formats and specialisations.
Identifier for user defined file formats and specialisations.
Identifier for user defined file formats and specialisations.
field
An enumerator for the fields used in file formats.Some of the fields are shared between formats...
Definition: record.hpp:63
The optional tags in the SAM format, stored in a dictionary.
detail::transfer_template_args_onto_t< field_types, std::tuple > base_type
A specialisation of std::tuple.
Definition: record.hpp:191
Identifier for user defined file formats and specialisations.
Identifier for user defined file formats and specialisations.
Reactivity values of the sequence characters given in a vector of float numbers.
The bit score (statistical significance indicator), unsigned value.
The mapping quality of the SEQ alignment, usually a ohred-scaled score.
Identifier for user defined file formats and specialisations.